{"record":{"id":"ea1f9923f45e041a","repo":"egametang/ET","slug":"service-discovery-incremental-register-response-mi","errorCode":null,"errorMessage":"service discovery incremental register response mismatch scene: {sceneName}, actual: {rawResponse?.GetType().Name}","messagePattern":"service discovery incremental register response mismatch scene: (.+?), actual: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"warning","filePath":"Packages/cn.etetet.servicediscovery/Scripts/Hotfix/Server/ServiceDiscoveryAgentSystem.cs","lineNumber":892,"sourceCode":"                }\n            }\n\n            try\n            {\n                TimerComponent timer = self.Root().TimerComponent;\n                ETTask<IResponse> registerTask = self.MessageSender.Call(targetActorId, request);\n                IResponse rawResponse = await registerTask;\n                self = selfRef;\n                if (self == null)\n                {\n                    (rawResponse as MessageObject)?.Dispose();\n                    return false;\n                }\n\n                if (rawResponse is not ServiceRegisterResponse response)\n                {\n                    (rawResponse as MessageObject)?.Dispose();\n                    throw new Exception(\n                        $\"service discovery incremental register response mismatch scene: {sceneName}, actual: {rawResponse?.GetType().Name}\");\n                }\n\n                if (response.Error != ErrorCode.ERR_Success)\n                {\n                    int error = response.Error;\n                    string message = response.Message;\n                    response.Dispose();\n                    throw new RpcException(error,\n                        $\"service discovery incremental register failed scene: {sceneName}, error: {error}, message: {message}\");\n                }\n\n                response.Dispose();\n                self.MarkPublishedSceneSynced(sceneName, version);\n                return true;\n            }\n            catch (Exception e)\n            {","sourceCodeStart":874,"sourceCodeEnd":910,"githubUrl":"https://github.com/egametang/ET/blob/5cab01f7a8bee5f49f4781eebe9e2b1c6d7ebe0f/Packages/cn.etetet.servicediscovery/Scripts/Hotfix/Server/ServiceDiscoveryAgentSystem.cs#L874-L910","documentation":"Thrown at line 892 in TrySyncRegisterSceneAsync (incremental scene registration): the master responded with a type that is not ServiceRegisterResponse. The raw response is disposed and an exception is thrown, which is then caught by the surrounding try and handled as an incremental-sync failure (HandleIncrementalSyncFailure). It indicates the response contract does not match the request.","triggerScenarios":"An incremental ServiceRegisterRequest is forwarded to the master, but the returned IResponse is not a ServiceRegisterResponse — e.g. an error/exception response, a mismatched response from an older/newer handler, or routing to the wrong actor. Caught and logged as a warning; triggers re-register.","commonSituations":"Version skew where master and agent disagree on ServiceRegisterResponse; the master returned a generic error response object; routing misconfiguration sending the register to the wrong handler.","solutions":["Deploy matching message/assembly versions across all processes.","Regenerate protocol definitions so ServiceRegisterResponse identity matches.","Inspect logs for the actual response type to identify routing/version drift."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"// Confirm response type identity matches across builds before relying on incremental sync.\nif (typeof(ServiceRegisterResponse).Assembly.Version != masterAssemblyVersion)\n{\n    Log.Error(\"discovery assembly version mismatch; incremental sync will fail\");\n}","typeGuard":"public static bool IsIncrementalRegisterResponse(IResponse r) => r is ServiceRegisterResponse;","tryCatchPattern":"// Already caught internally and logged as warning; re-register is triggered.\n// At the system level, monitor the warning rate and trigger a coordinated redeploy on mismatch.","preventionTips":["Keep master and agent on identical message assembly versions.","Regenerate proto definitions together.","Monitor incremental-sync warning rates."],"tags":["csharp","et-framework","service-discovery","rpc","serialization","versioning","type-mismatch"],"backgroundTag":null,"analyzedSha":"5cab01f7a8bee5f49f4781eebe9e2b1c6d7ebe0f","analyzedAt":"2026-08-13T21:10:40.377Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}