{"record":{"id":"5ea4fcd72f53a95f","repo":"babalae/better-genshin-impact","slug":"error-5ea4fc","errorCode":null,"errorMessage":"根实例拒绝连接。","messagePattern":"根实例拒绝连接。","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/Service/Instance/InstanceBootstrap.cs","lineNumber":232,"sourceCode":"                        client,\n                        timeout.Token).ConfigureAwait(false);\n                    if (frame is null)\n                    {\n                        client.Dispose();\n                        continue;\n                    }\n\n                    var response = InstanceIpcProtocol.ReadJson(frame.Value);\n                    if (response.Operation != InstanceOperations.Response\n                        || response.RequestId != request.RequestId)\n                    {\n                        client.Dispose();\n                        continue;\n                    }\n                    if (response.Success != true)\n                    {\n                        client.Dispose();\n                        throw new InvalidOperationException(\n                            response.ErrorMessage ?? response.ErrorCode ?? \"根实例拒绝连接。\");\n                    }\n\n                    var openResponse =\n                        response.Data?.ToObject<ConnectionOpenResponse>(\n                            InstanceIpcProtocol.Serializer)\n                        ?? throw new InvalidDataException(\"根实例连接响应缺少数据。\");\n                    return new InitialRootConnection(client, openResponse);\n                }\n                catch\n                {\n                    client.Dispose();\n                    throw;\n                }\n            }\n            catch (Exception exception) when (exception is IOException\n                                              or UnauthorizedAccessException\n                                              or TimeoutException","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/Service/Instance/InstanceBootstrap.cs#L214-L250","documentation":"Thrown when the root BetterGI instance responds to a connection.open request with Success != true but both ErrorMessage and ErrorCode are null/empty, so the fallback literal message is used. It indicates the root instance actively refused the connection but failed to populate an error detail.","triggerScenarios":"The root instance's connection handler returned a Failure envelope with empty error fields, or a handler exception propagated without setting them. Possible causes: capacity limit reached, the request type is disallowed in the root's current state, or an internal handler bug.","commonSituations":"Root instance in a degraded state; a handler threw and the Failure was constructed without a message; concurrent instance limit; version skew where the root no longer understands the requested instance type.","solutions":["Restart the root BetterGI instance — a degraded root is the most common cause.","Check the root instance's logs for the handler exception that produced the empty error.","Ensure both instances are the same BetterGI build to rule out protocol/handler mismatches."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try\n{\n    var connection = await TryOpenRootConnectionAsync(...);\n}\ncatch (InvalidOperationException ex)\n{\n    logger.LogError(ex, \"Root instance rejected connection: {Message}\", ex.Message);\n    // Suggest restarting the root instance.\n}","preventionTips":["Restart the root BetterGI instance when connection.open failures recur.","Keep both instances on the same build to avoid handler mismatches.","Ensure the root's connection handler always populates ErrorMessage/ErrorCode on failure for diagnosable errors."],"tags":["ipc","instance","connection","named-pipe"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}