wavetermdev/waveterm · error
opening secrets UI: %w
Error message
opening secrets UI: %w
What it means
This wraps a failure of the CreateBlockCommand RPC that opens the secrets UI block in the given tab. The tab id was found (WAVETERM_TABID set) but the app-side call to create the block failed — timeout beyond 2000ms, invalid target tab, or an app-side block-creation error.
Source
Thrown at cmd/wsh/cmd/wshcmd-secret.go:198
if tabId == "" {
return fmt.Errorf("no WAVETERM_TABID env var set")
}
wshCmd := &wshrpc.CommandCreateBlockData{
TabId: tabId,
BlockDef: &waveobj.BlockDef{
Meta: map[string]interface{}{
waveobj.MetaKey_View: "waveconfig",
waveobj.MetaKey_File: "secrets",
},
},
Magnified: secretUiMagnified,
Focused: true,
}
_, err := wshclient.CreateBlockCommand(RpcClient, *wshCmd, &wshrpc.RpcOpts{Timeout: 2000})
if err != nil {
return fmt.Errorf("opening secrets UI: %w", err)
}
return nil
}View on GitHub (pinned to a4447c1563)
Solutions
- Retry the command — transient slowness can exceed the 2000ms timeout.
- Confirm the tab still exists (the tab id from WAVETERM_TABID); run from a fresh Wave terminal block to get a current id.
- Ensure the wsh binary version matches the running Wave Terminal version (both bundled together).
- Restart Wave Terminal if the app is unresponsive to block creation RPCs.
Defensive patterns
Strategy: retry
Validate before calling
tabId := os.Getenv("WAVETERM_TABID")
if tabId == "" { return errors.New("no tab id; run inside a Wave terminal block") } Try / catch
err := wshclient.CreateBlockCommand(RpcClient, *wshCmd, &wshrpc.RpcOpts{Timeout: 2000})
if err != nil {
if errors.Is(err, context.DeadlineExceeded) { time.Sleep(500 * time.Millisecond); err = wshclient.CreateBlockCommand(RpcClient, *wshCmd, &wshrpc.RpcOpts{Timeout: 5000}) }
if err != nil { return fmt.Errorf("opening secrets UI: %w", err) }
} Prevention
- Retry once on timeout; Wave can be transiently slow.
- Run from a freshly opened Wave terminal block so the tab id is current.
- Keep the wsh binary and Wave app versions in sync (reinstall Wave if mismatched).
When it happens
Trigger: Running `wsh secret ui` when Wave is unresponsive (2s timeout), the tab referenced by WAVETERM_TABID was closed/stale, or the app rejects the BlockDef metadata for the secrets view.
Common situations: Wave busy rendering or frozen; stale WAVETERM_TABID after tab close; running wsh from a block in a tab that is being torn down; version mismatch between wsh binary and the running app.
Related errors
- reinstalling connection: %w
- disconnecting %q error: %w
- ensuring connection: %w
- create block failed: %v
- reading terminal output: %w
AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01).
Data as JSON: /api/errors/cebc07f467a0a9b2.
Report an issue: GitHub.