{"record":{"id":"938ea22a2d7ab470","repo":"egametang/ET","slug":"router-manager-address-is-empty","errorCode":null,"errorMessage":"router manager address is empty.","messagePattern":"router manager address is empty\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"Packages/cn.etetet.login/Scripts/Hotfix/Client/Login/ClientSenderComponentSystem.cs","lineNumber":46,"sourceCode":"            long fiberId = self.fiberId;\n            self.fiberId = 0;\n            await self.Fiber().RemoveFiber(fiberId);\n        }\n\n        public static async ETTask DisposeAsync(this ClientSenderComponent self)\n        {\n            EntityRef<ClientSenderComponent> selfRef = self;\n            await self.RemoveFiberAsync();\n            self = selfRef;\n            self?.Dispose();\n        }\n\n        public static async ETTask<long> LoginAsync(this ClientSenderComponent self, string address, string account, string password)\n        {\n            EntityRef<ClientSenderComponent> selfRef = self;\n            if (string.IsNullOrWhiteSpace(address))\n            {\n                throw new Exception(\"router manager address is empty.\");\n            }\n\n            self.fiberId = await self.Fiber().CreateFiber(SchedulerType.ThreadPool, IdGenerater.Instance.GenerateId(), SceneType.NetClient, \"NetClient\");\n            self = selfRef;\n            self.FiberInstanceId = new FiberInstanceId(self.fiberId);\n\n            Main2NetClient_Login main2NetClientLogin = Main2NetClient_Login.Create();\n            main2NetClientLogin.OwnerFiberId = self.Fiber().Id;\n            main2NetClientLogin.Account = account;\n            main2NetClientLogin.Password = password;\n            main2NetClientLogin.Address = address;\n            \n            NetClient2Main_Login response = await self.Root().GetComponent<ProcessInnerSender>().Call(self.FiberInstanceId, main2NetClientLogin) as NetClient2Main_Login;\n            \n            return response.PlayerId;\n        }\n\n        public static void Send(this ClientSenderComponent self, IMessage message)","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/egametang/ET/blob/5cab01f7a8bee5f49f4781eebe9e2b1c6d7ebe0f/Packages/cn.etetet.login/Scripts/Hotfix/Client/Login/ClientSenderComponentSystem.cs#L28-L64","documentation":"Thrown by ClientSenderComponentSystem.LoginAsync when the address parameter for the router manager is null, empty, or whitespace. The router manager address is required to create the NetClient fiber that handles the actual login connection.","triggerScenarios":"LoginAsync is called with an empty or whitespace-only address string. Typically the address comes from config or a UI input field; if that source is not populated, the guard fires.","commonSituations":"Router manager address not configured in the login config or start config. UI text field for server address was left blank by the user. Config deserialization failed silently and the address field defaulted to null/empty.","solutions":["Set the router manager address in the login configuration or pass a valid address to LoginAsync.","Validate the address is non-empty before calling LoginAsync — show a UI error if blank.","Check config loading logs to ensure the address field was deserialized correctly."],"exampleFix":"// before\nif (string.IsNullOrWhiteSpace(address))\n    throw new Exception(\"router manager address is empty.\");\n// caller validation before the call\nif (string.IsNullOrWhiteSpace(address))\n{\n    Log.Error(\"router manager address is empty\");\n    return 0;\n}","handlingStrategy":"validation","validationCode":"// Validate address before calling LoginAsync\nif (string.IsNullOrWhiteSpace(address))\n{\n    Log.Error(\"Router manager address is empty — check login config\");\n    // show user-facing error or use default address\n    return;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Populate the router manager address in config before attempting login.","Validate the address field in the UI layer and show a user-facing error if blank.","Log the address source (config key) at startup to trace misconfiguration."],"tags":["network","login","validation","config"],"backgroundTag":null,"analyzedSha":"5cab01f7a8bee5f49f4781eebe9e2b1c6d7ebe0f","analyzedAt":"2026-08-13T21:10:40.377Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}