wavetermdev/waveterm · error
listing secrets: %w
Error message
listing secrets: %w
What it means
`wsh secret list` fetches all secret names via GetSecretsNamesCommand with a 2000ms timeout; any RPC failure — unreachable daemon, timeout, or server-side handler error — is surfaced wrapped in this message. Since there is no local validation on this path, essentially only connectivity or daemon-side store problems produce it.
Source
Thrown at cmd/wsh/cmd/wshcmd-secret.go:145
secrets := map[string]*string{name: &value}
err = wshclient.SetSecretsCommand(RpcClient, secrets, &wshrpc.RpcOpts{Timeout: 2000})
if err != nil {
return fmt.Errorf("setting secret: %w", err)
}
WriteStdout("secret set: %s\n", name)
return nil
}
func secretListRun(cmd *cobra.Command, args []string) (rtnErr error) {
defer func() {
sendActivity("secret", rtnErr == nil)
}()
names, err := wshclient.GetSecretsNamesCommand(RpcClient, &wshrpc.RpcOpts{Timeout: 2000})
if err != nil {
return fmt.Errorf("listing secrets: %w", err)
}
for _, name := range names {
WriteStdout("%s\n", name)
}
return nil
}
func secretDeleteRun(cmd *cobra.Command, args []string) (rtnErr error) {
defer func() {
sendActivity("secret", rtnErr == nil)
}()
name := args[0]
if !secretNameRegex.MatchString(name) {
return fmt.Errorf("invalid secret name: must start with a letter and contain only letters, numbers, and underscores")
}
View on GitHub (pinned to a4447c1563)
Solutions
- Confirm general wsh connectivity with another command (e.g. `wsh ls`); if all fail, start Wave Terminal or restart it to restore the daemon connection.
- If the wrapped error is a timeout, check whether your keyring service (gnome-keyring/kwallet/secret-service) is hung and restart it.
- Update Wave Terminal and wsh to the same version so the GetSecretsNames RPC exists on the daemon.
- If the store itself is failing, inspect the wrapped error for keyring/D-Bus details and repair the OS secret service before retrying.
Defensive patterns
Strategy: retry
Validate before calling
// Probe connectivity first:
// if err := exec.Command("wsh", "ls").Run(); err != nil { /* daemon not running */ } Try / catch
var names []string
var err error
for i := 0; i < 2; i++ {
names, err = wshclient.GetSecretsNamesCommand(RpcClient, &wshrpc.RpcOpts{Timeout: 2000})
if err == nil { break }
time.Sleep(500 * time.Millisecond) // single retry for transient RPC/keyring hiccups
}
if err != nil {
return fmt.Errorf("listing secrets: %w", err)
} Prevention
- Run wsh from a session where the Wave daemon is alive; restart Wave on stale connections
- Bump the RpcOpts timeout if your keyring is slow to respond
- Keep daemon and CLI versions aligned so the RPC exists
- Investigate keyring/D-Bus health on Linux if list reliably times out
When it happens
Trigger: Running `wsh secret list` when no Wave daemon is reachable (Wave not running, stale CLI connection), the RPC exceeds 2000ms, or the daemon errors reading the secret store (e.g. Linux keyring/D-Bus failure while enumerating entries).
Common situations: Running wsh over SSH into a box where Wave isn't running; keyring daemon hung so enumeration times out; version mismatch where the running daemon predates the secrets feature; corrupt or inaccessible secret store after OS upgrade.
Related errors
- failed to list workspaces: %v
- failed to list blocks from all %d workspace(s)
- running view command: %w
- writing file: %w
- getting secret: %w
AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01).
Data as JSON: /api/errors/61afc6fcd6162b3f.
Report an issue: GitHub.