wavetermdev/waveterm · error
getting variables: %w
Error message
getting variables: %w
What it means
getAllVariables wraps failures of the GetAllVarsCommand RPC (2s timeout) with this message (cmd/wshcmd-getvar.go:118). It is raised when the bulk variable dump RPC cannot be completed — transport failure, timeout, or server-side error — and is only reachable via `wsh getvar --all`.
Source
Thrown at cmd/wsh/cmd/wshcmd-getvar.go:118
}
WriteStdout("%s", resp.Val)
if shouldPrintNewline() {
WriteStdout("\n")
}
return nil
}
func getAllVariables(zoneId string) error {
commandData := wshrpc.CommandVarData{
ZoneId: zoneId,
FileName: getVarFileName,
}
vars, err := wshclient.GetAllVarsCommand(RpcClient, commandData, &wshrpc.RpcOpts{Timeout: 2000})
if err != nil {
return fmt.Errorf("getting variables: %w", err)
}
terminator := "\n"
if getVarNullTerminate {
terminator = "\x00"
}
for _, v := range vars {
WriteStdout("%s=%s%s", v.Key, v.Val, terminator)
}
return nil
}
View on GitHub (pinned to a4447c1563)
Solutions
- Confirm connectivity (Wave app running, connection up) and retry `wsh getvar --all`
- Re-resolve the target block — the OID may be stale if the block was closed
- If the environment is slow, note the fixed 2s timeout; ensure the machine is not overloaded
Example fix
// before wsh getvar --all --block <closed-blockid> # rpc fails // after wsh ls # find a live block id wsh getvar --all --block <live-blockid>
Defensive patterns
Strategy: try-catch
Validate before calling
wsh conn show || { echo 'no connection'; exit 1; } Try / catch
if ! wsh getvar --all >vars.txt 2>err.txt; then grep -qi 'timeout' err.txt && echo 'RPC timed out; retry when app is less busy' exit 1 fi
Prevention
- Verify the target block OID is still live before dumping vars
- Use a stable connection for scripted bulk reads
- Treat repeated failures as a connectivity problem, not a data problem
When it happens
Trigger: Running `wsh getvar --all` when the RPC to the resolved zone (block OID or client) fails or exceeds the 2000ms timeout.
Common situations: Remote/ssh session with a dropped Wave connection; targeting a stale block id; app busy so the 2s timeout expires; varfile name issues surfaced server-side.
Related errors
- failed to list workspaces: %v
- failed to list blocks from all %d workspace(s)
- getting variable: %w
- getting connected job ids: %w
- getting path: %w
AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01).
Data as JSON: /api/errors/36cde71efd55930f.
Report an issue: GitHub.