{"record":{"id":"85e0a8ae761cc7a6","repo":"wavetermdev/waveterm","slug":"error-getting-linux-storage-backend-w","errorCode":null,"errorMessage":"error getting linux storage backend: %w","messagePattern":"error getting linux storage backend: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/wshrpc/wshserver/wshserver.go","lineNumber":1517,"sourceCode":"\t\tif value == nil {\n\t\t\terr := secretstore.DeleteSecret(name)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error deleting secret %q: %w\", name, err)\n\t\t\t}\n\t\t} else {\n\t\t\terr := secretstore.SetSecret(name, *value)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error setting secret %q: %w\", name, err)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (ws *WshServer) GetSecretsLinuxStorageBackendCommand(ctx context.Context) (string, error) {\n\tbackend, err := secretstore.GetLinuxStorageBackend()\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"error getting linux storage backend: %w\", err)\n\t}\n\treturn backend, nil\n}\n\nfunc (ws *WshServer) JobCmdExitedCommand(ctx context.Context, data wshrpc.CommandJobCmdExitedData) error {\n\treturn jobcontroller.HandleCmdJobExited(ctx, data.JobId, data)\n}\n\nfunc (ws *WshServer) JobControllerListCommand(ctx context.Context) ([]*waveobj.Job, error) {\n\treturn wstore.DBGetAllObjsByType[*waveobj.Job](ctx, waveobj.OType_Job)\n}\n\nfunc (ws *WshServer) JobControllerDeleteJobCommand(ctx context.Context, jobId string) error {\n\treturn jobcontroller.DeleteJob(ctx, jobId)\n}\n\nfunc (ws *WshServer) JobControllerStartJobCommand(ctx context.Context, data wshrpc.CommandJobControllerStartJobData) (string, error) {\n\tparams := jobcontroller.StartJobParams{","sourceCodeStart":1499,"sourceCodeEnd":1535,"githubUrl":"https://github.com/wavetermdev/waveterm/blob/a4447c1563b2df285ab89e76c82f91e1a1a49c1e/pkg/wshrpc/wshserver/wshserver.go#L1499-L1535","documentation":"GetSecretsLinuxStorageBackendCommand reports which Linux secret-storage backend Wave would use (e.g. keyring/kwallet/file-based). GetLinuxStorageBackend probes the environment, and any failure to determine a usable backend is wrapped as \"error getting linux storage backend\". This command is only meaningful on Linux.","triggerScenarios":"Calling GetSecretsLinuxStorageBackendCommand on a Linux system with no detectable secret backend: no D-Bus session bus, no gnome-keyring/kwallet daemon, or the detection code itself errors.","commonSituations":"SSH sessions without a D-Bus session; minimal/headless servers or containers; desktop environments without any secrets provider installed.","solutions":["Verify a D-Bus session bus is available (DBUS_SESSION_BUS_ADDRESS set).","Install/start a secrets provider: gnome-keyring (Secret Service API) or KWallet.","If running headless is intentional, use Wave's non-keyring secret storage configuration instead of the keyring backend."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"if runtime.GOOS != \"linux\" {\n    // skip backend probe entirely on macOS/Windows\n    return nil\n}","typeGuard":null,"tryCatchPattern":"backend, err := wshclient.GetSecretsLinuxStorageBackendCommand(ctx)\nif err != nil {\n    log.Printf(\"no linux secret backend (%v); falling back to non-keyring storage\", err)\n}","preventionTips":["Only call this command on Linux; guard with runtime.GOOS.","Ensure DBUS_SESSION_BUS_ADDRESS is set in SSH/headless sessions (e.g. dbus-launch).","Install gnome-keyring or kwallet on minimal images before enabling secret features."],"tags":["secrets","linux","dbus"],"backgroundTag":"secret-backend-unavailable","analyzedSha":"a4447c1563b2df285ab89e76c82f91e1a1a49c1e","analyzedAt":"2026-09-01T15:26:23.972Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}