{"record":{"id":"3ba8d1d8dbcf7011","repo":"netbirdio/netbird","slug":"sync-response-is-not-available","errorCode":null,"errorMessage":"sync response is not available","messagePattern":"sync response is not available","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/internal/connect.go","lineNumber":531,"sourceCode":"\te = c.engine\n\tc.engineMutex.Unlock()\n\treturn e\n}\n\n// GetLatestSyncResponse returns the latest sync response from the engine.\nfunc (c *ConnectClient) GetLatestSyncResponse() (*mgmProto.SyncResponse, error) {\n\tengine := c.Engine()\n\tif engine == nil {\n\t\treturn nil, errors.New(\"engine is not initialized\")\n\t}\n\n\tsyncResponse, err := engine.GetLatestSyncResponse()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"get latest sync response: %w\", err)\n\t}\n\n\tif syncResponse == nil {\n\t\treturn nil, errors.New(\"sync response is not available\")\n\t}\n\n\treturn syncResponse, nil\n}\n\n// SetLogLevel sets the log level for the firewall manager if the engine is running.\nfunc (c *ConnectClient) SetLogLevel(level log.Level) {\n\tengine := c.Engine()\n\tif engine == nil {\n\t\treturn\n\t}\n\n\tfwManager := engine.GetFirewallManager()\n\tif fwManager != nil {\n\t\tfwManager.SetLogLevel(level)\n\t}\n}\n","sourceCodeStart":513,"sourceCodeEnd":549,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/internal/connect.go#L513-L549","documentation":"Inside authenticateWithSchemes (middleware.go:535): the middleware iterates config.Schemes and calls scheme.Authenticate(r); a returned error means the scheme could not even attempt authentication (infrastructure failure), so it logs 'authentication infrastructure error', marks OriginAuth, and short-circuits with 502. Credential failures are handled inside the schemes (empty token), not here.","triggerScenarios":"Any scheme's Authenticate erroring while probing the request: an OIDC scheme failing to build its authorize redirect (IdP discovery cached badly), a basic-auth scheme unable to reach its validator, or a tunnel/peer scheme whose validation backing service is down — triggered by simply requesting the domain's login path.","commonSituations":"IdP unreachable from the proxy pod; management gRPC down so dependent schemes cannot initialize; partial network partition between proxy and identity backends; a scheme added to a domain whose backing service was never deployed.","solutions":["Identify the failing scheme from the log line's 'scheme' field, then check that scheme's specific backend connectivity.","Verify the IdP issuer/management endpoint is reachable from the proxy process (not just from the operator's machine).","If a scheme's backend is permanently gone, remove the scheme from the domain registration so it stops poisoning the loop.","Restart the proxy after restoring backends to clear any cached broken provider state."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Pre-flight the scheme backends the domain relies on (IdP issuer reachable).\nclient := &http.Client{Timeout: 3 * time.Second}\nresp, err := client.Get(strings.TrimSuffix(issuer, \"/\") + \"/.well-known/openid-configuration\")\nif err != nil || resp.StatusCode != 200 {\n    return errors.New(\"IdP discovery unreachable; login will 502\")\n}","typeGuard":null,"tryCatchPattern":"resp, err := client.Get(loginURL)\nif err == nil && resp.StatusCode == http.StatusBadGateway {\n    // Auth infrastructure down: check the failing scheme in proxy logs,\n    // restore its backend, then retry the login. Backoff between attempts.\n}","preventionTips":["Probe IdP discovery and management endpoints from the proxy's network path, not your workstation.","Only register schemes whose backends are deployed and reachable.","Alert on 502s at the login step separately from per-user failures.","Restart the proxy after backend recovery to clear cached provider state."],"tags":["proxy","authentication","infrastructure","oidc","availability"],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}