wavetermdev/waveterm · error
error getting wave file: + resp.statusText
Error message
error getting wave file: + resp.statusText
What it means
After starting the conn controller, StartConnServer reads the first line of its output (the wsh version) via ReadLineWithTimeout with a 30-second budget. If no line arrives in time or the output stream errors, it cancels the context and returns this wrapped error. It signals the remote wsh connserver never produced its version banner, so the handshake cannot proceed.
Source
Thrown at frontend/app/store/global.ts:464
// when file is not found, returns {data: null, fileInfo: null}
async function fetchWaveFile(
zoneId: string,
fileName: string,
offset?: number
): Promise<{ data: Uint8Array; fileInfo: WaveFile }> {
const usp = new URLSearchParams();
usp.set("zoneid", zoneId);
usp.set("name", fileName);
if (offset != null) {
usp.set("offset", offset.toString());
}
const resp = await fetch(getWebServerEndpoint() + "/wave/file?" + usp.toString());
if (!resp.ok) {
if (resp.status === 404) {
return { data: null, fileInfo: null };
}
throw new Error("error getting wave file: " + resp.statusText);
}
if (resp.status == 204) {
return { data: null, fileInfo: null };
}
const fileInfo64 = resp.headers.get("X-ZoneFileInfo");
if (fileInfo64 == null) {
throw new Error(`missing zone file info for ${zoneId}:${fileName}`);
}
const fileInfo = JSON.parse(base64ToString(fileInfo64));
const data = await resp.arrayBuffer();
return { data: new Uint8Array(data), fileInfo };
}
function setNodeFocus(nodeId: string) {
const layoutModel = getLayoutModelForStaticTab();
layoutModel.focusNode(nodeId);
}
View on GitHub (pinned to a4447c1563)
Solutions
- Run `wsh connserver version` (or check the wsh version) inside the WSL distro and update wsh (`wsh update`) if stale
- Retry the connection — a slow WSL cold start can exceed the 30s window
- Check the remote side manually: start wsh connserver inside the distro and observe its output/errors
- Inspect the wrapped inner error (timeout vs read failure) to distinguish a hang from a crash
Example fix
// before started, _, _, err := conn.StartConnServer(ctx, false) // times out after 30s // after // first, inside the WSL distro: // wsh conn version -> confirm wsh installed and up to date // wsh update -> upgrade old wsh that never emits version line started, _, _, err := conn.StartConnServer(ctx, false)
Defensive patterns
Strategy: retry
Validate before calling
out, _, err := genconn.RunSimpleCommand(ctx, shell, genconn.CommandSpec{Cmd: "wsh conn version"})
if err != nil || strings.TrimSpace(out) == "" {
return fmt.Errorf("remote wsh not installed or too old: run 'wsh update' in the distro")
} Try / catch
started, _, _, err := conn.StartConnServer(ctx, false)
if err != nil && strings.Contains(err.Error(), "error reading wsh version") {
time.Sleep(5 * time.Second)
started, _, _, err = conn.StartConnServer(ctx, false) // retry after slow WSL boot
} Prevention
- Keep wsh up to date in all distros (`wsh update`); old versions may not emit the version line
- Allow extra warm-up time after WSL cold boot before connecting
- Test connserver startup manually inside the distro when handshakes stall
When it happens
Trigger: tryEnableWsh calls StartConnServer and ReadLineWithTimeout times out (30s) or the pipe read fails — remote wsh hung, crashed immediately, or output was never written.
Common situations: Old/incompatible wsh version on the WSL side that doesn't emit the version line; wsh crashed on startup inside the distro; very slow WSL boot exceeding 30s; network/transport stall between client and WSL.
Related errors
- no webcontents found with blockid ${data.blockid}
- unable to obtain client info: %w
- timeout waiting for connserver to register
- context timeout
- No tab view found for the given webContents id
AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01).
Data as JSON: /api/errors/351fdb0d57209beb.
Report an issue: GitHub.