{"record":{"id":"cebc07f467a0a9b2","repo":"wavetermdev/waveterm","slug":"opening-secrets-ui-w","errorCode":null,"errorMessage":"opening secrets UI: %w","messagePattern":"opening secrets UI: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/wsh/cmd/wshcmd-secret.go","lineNumber":198,"sourceCode":"\tif tabId == \"\" {\n\t\treturn fmt.Errorf(\"no WAVETERM_TABID env var set\")\n\t}\n\n\twshCmd := &wshrpc.CommandCreateBlockData{\n\t\tTabId: tabId,\n\t\tBlockDef: &waveobj.BlockDef{\n\t\t\tMeta: map[string]interface{}{\n\t\t\t\twaveobj.MetaKey_View: \"waveconfig\",\n\t\t\t\twaveobj.MetaKey_File: \"secrets\",\n\t\t\t},\n\t\t},\n\t\tMagnified: secretUiMagnified,\n\t\tFocused:   true,\n\t}\n\n\t_, err := wshclient.CreateBlockCommand(RpcClient, *wshCmd, &wshrpc.RpcOpts{Timeout: 2000})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"opening secrets UI: %w\", err)\n\t}\n\treturn nil\n}","sourceCodeStart":180,"sourceCodeEnd":201,"githubUrl":"https://github.com/wavetermdev/waveterm/blob/a4447c1563b2df285ab89e76c82f91e1a1a49c1e/cmd/wsh/cmd/wshcmd-secret.go#L180-L201","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"tabId := os.Getenv(\"WAVETERM_TABID\")\nif tabId == \"\" { return errors.New(\"no tab id; run inside a Wave terminal block\") }","typeGuard":null,"tryCatchPattern":"err := wshclient.CreateBlockCommand(RpcClient, *wshCmd, &wshrpc.RpcOpts{Timeout: 2000})\nif err != nil {\n    if errors.Is(err, context.DeadlineExceeded) { time.Sleep(500 * time.Millisecond); err = wshclient.CreateBlockCommand(RpcClient, *wshCmd, &wshrpc.RpcOpts{Timeout: 5000}) }\n    if err != nil { return fmt.Errorf(\"opening secrets UI: %w\", err) }\n}","preventionTips":["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)."],"tags":["cli","rpc","wave-terminal","timeout"],"backgroundTag":"rpc-call-failed","analyzedSha":"a4447c1563b2df285ab89e76c82f91e1a1a49c1e","analyzedAt":"2026-09-01T15:26:23.972Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}