{"record":{"id":"05174d4b7c1ad820","repo":"sipeed/picoclaw","slug":"failed-to-load-auth-store-w","errorCode":null,"errorMessage":"failed to load auth store: %w","messagePattern":"failed to load auth store: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/picoclaw/internal/auth/helpers.go","lineNumber":387,"sourceCode":"\n\tappCfg, err := internal.LoadConfig()\n\tif err == nil {\n\t\t// Clear all AuthMethods in ModelList\n\t\tfor i := range appCfg.ModelList {\n\t\t\tappCfg.ModelList[i].AuthMethod = \"\"\n\t\t}\n\t\tconfig.SaveConfig(internal.GetConfigPath(), appCfg)\n\t}\n\n\tfmt.Println(\"Logged out from all providers\")\n\n\treturn nil\n}\n\nfunc authStatusCmd() error {\n\tstore, err := auth.LoadStore()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to load auth store: %w\", err)\n\t}\n\n\tif len(store.Credentials) == 0 {\n\t\tfmt.Println(\"No authenticated providers.\")\n\t\tfmt.Println(\"Run: picoclaw auth login --provider <name>\")\n\t\treturn nil\n\t}\n\n\tfmt.Println(\"\\nAuthenticated Providers:\")\n\tfmt.Println(\"------------------------\")\n\tfor provider, cred := range store.Credentials {\n\t\tstatus := \"active\"\n\t\tif cred.IsExpired() {\n\t\t\tstatus = \"expired\"\n\t\t} else if cred.NeedsRefresh() {\n\t\t\tstatus = \"needs refresh\"\n\t\t}\n","sourceCodeStart":369,"sourceCodeEnd":405,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/cmd/picoclaw/internal/auth/helpers.go#L369-L405","documentation":"Context wrapper in authStatusCmd around auth.LoadStore: the persisted credentials store cannot be loaded at all, so auth status cannot be reported. Typically the store file is missing in an unexpected state, unreadable, or fails to deserialize; distinct from the 'no credentials' case, which is reported as a normal empty state.","triggerScenarios":"Thrown at cmd/picoclaw/internal/auth/helpers.go:387 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error to distinguish missing-file from parse errors","Restore or recreate the auth store file with correct permissions","Log in again to rebuild the store if it is corrupt"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","contentChangedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}