{"record":{"id":"3a00875a295b53c0","repo":"MHSanaei/3x-ui","slug":"remote-returned-success-false-msg","errorCode":null,"errorMessage":"remote returned success=false: {msg}","messagePattern":"remote returned success=false: (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/web/service/node.go","lineNumber":1184,"sourceCode":"\t\t\t\tState    string `json:\"state\"`\n\t\t\t\tErrorMsg string `json:\"errorMsg\"`\n\t\t\t} `json:\"xray\"`\n\t\t\tPanelVersion string `json:\"panelVersion\"`\n\t\t\tPanelGuid    string `json:\"panelGuid\"`\n\t\t\tUptime       uint64 `json:\"uptime\"`\n\t\t\tNetIO        struct {\n\t\t\t\tUp   uint64 `json:\"up\"`\n\t\t\t\tDown uint64 `json:\"down\"`\n\t\t\t} `json:\"netIO\"`\n\t\t} `json:\"obj\"`\n\t}\n\tif err := json.NewDecoder(resp.Body).Decode(&envelope); err != nil {\n\t\tpatch.LastError = \"decode response: \" + err.Error()\n\t\treturn patch, err\n\t}\n\tif !envelope.Success || envelope.Obj == nil {\n\t\tpatch.LastError = \"remote returned success=false: \" + envelope.Msg\n\t\treturn patch, errors.New(patch.LastError)\n\t}\n\to := envelope.Obj\n\tpatch.CpuPct = o.CpuPct\n\tif o.Mem.Total > 0 {\n\t\tpatch.MemPct = float64(o.Mem.Current) * 100.0 / float64(o.Mem.Total)\n\t}\n\tpatch.XrayVersion = o.Xray.Version\n\tpatch.XrayState = o.Xray.State\n\tpatch.XrayError = o.Xray.ErrorMsg\n\tpatch.PanelVersion = o.PanelVersion\n\tpatch.Guid = o.PanelGuid\n\tpatch.UptimeSecs = o.Uptime\n\tpatch.NetUp = o.NetIO.Up\n\tpatch.NetDown = o.NetIO.Down\n\treturn patch, nil\n}\n\ntype ProbeResultUI struct {","sourceCodeStart":1166,"sourceCodeEnd":1202,"githubUrl":"https://github.com/MHSanaei/3x-ui/blob/ad32144c42455696ea9f14e12168beac3e25f5d2/internal/web/service/node.go#L1166-L1202","documentation":"The remote panel answered HTTP 200 but its JSON envelope reported success=false (or the obj payload was missing), so the probe treats the node as unhealthy and surfaces the remote's own msg. This is the remote panel's application-level error — most often an expired/invalid API token or a session error inside the remote — delivered inside a structurally valid response. The distinction matters: connectivity and TLS are fine; authorization at the remote is not.","triggerScenarios":"Remote panel restarted and generated a new token/guid while the manager still holds the old one; remote's server-status handler failing internally (its msg will say why); a proxy intercepting and returning its own success=false JSON.","commonSituations":"Post-restart token drift between nodes; remote panel version mismatch changing the envelope shape (success field absent decodes as false).","solutions":["Read the appended msg — it is the remote's own failure reason and usually names the fix","Re-share the API token from the remote and update the node record on the manager","Confirm both panels run compatible versions (envelope must include success:true and obj)","Re-run the health check after fixing; patch.LastError clears on the next successful probe"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"patch, err := probe(ctx, node)\nif err != nil && strings.Contains(err.Error(), \"success=false\") {\n    // application-level failure: read msg, fix auth/config on the remote, no point retrying blindly\n}","preventionTips":["Re-share the remote's API token after any remote restart/rotation","Keep manager and remote panel versions compatible so the envelope shape matches","Log patch.LastError verbatim — it carries the remote's own reason"],"tags":["node","sync","authentication","health-check"],"backgroundTag":null,"analyzedSha":"ad32144c42455696ea9f14e12168beac3e25f5d2","analyzedAt":"2026-08-15T11:13:23.905Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}