wavetermdev/waveterm · error
tabid and blockid are required
Error message
tabid and blockid are required
What it means
GetClientPlatformFromOsArchStr parses a pre-captured os/arch string (as produced by uname) and requires exactly two fields. Unlike GetClientPlatform it does not run a command; it only splits and normalizes the given string. This error means the supplied string did not split into exactly two whitespace-separated tokens.
Source
Thrown at emain/emain-wsh.ts:20
// SPDX-License-Identifier: Apache-2.0
import { WindowService } from "@/app/store/services";
import { RpcResponseHelper, WshClient } from "@/app/store/wshclient";
import { RpcApi } from "@/app/store/wshclientapi";
import { Notification, net, safeStorage, shell } from "electron";
import { getResolvedUpdateChannel } from "emain/updater";
import { unamePlatform } from "./emain-platform";
import { getWebContentsByBlockId, webGetSelector } from "./emain-web";
import { createBrowserWindow, getWaveWindowById, getWaveWindowByWorkspaceId } from "./emain-window";
export class ElectronWshClientType extends WshClient {
constructor() {
super("electron");
}
async handle_webselector(rh: RpcResponseHelper, data: CommandWebSelectorData): Promise<string[]> {
if (!data.tabid || !data.blockid || !data.workspaceid) {
throw new Error("tabid and blockid are required");
}
const ww = getWaveWindowByWorkspaceId(data.workspaceid);
if (ww == null) {
throw new Error(`no window found with workspace ${data.workspaceid}`);
}
const wc = await getWebContentsByBlockId(ww, data.tabid, data.blockid);
if (wc == null) {
throw new Error(`no webcontents found with blockid ${data.blockid}`);
}
const rtn = await webGetSelector(wc, data.selector, data.opts);
return rtn;
}
async handle_notify(rh: RpcResponseHelper, notificationOptions: WaveNotificationOptions) {
new Notification({
title: notificationOptions.title,
body: notificationOptions.body,
silent: notificationOptions.silent,View on GitHub (pinned to a4447c1563)
Solutions
- Log and inspect the exact osArchStr being passed before the call
- Re-acquire a fresh `uname -sm` output string instead of reusing a cached/stale value
- Trim and ensure the string is in the form "<os> <arch>" (e.g. "linux x86_64") before calling
- Use GetClientPlatform (which runs uname itself) if you don't have a reliable string
Example fix
// before os, arch, err := GetClientPlatformFromOsArchStr(ctx, cachedLine) // cachedLine may be a version string // after osArchStr := strings.TrimSpace(strings.Join(strings.Fields(unameOutput)[0:2], " ")) os, arch, err := GetClientPlatformFromOsArchStr(ctx, osArchStr)
Defensive patterns
Strategy: validation
Validate before calling
func validOsArchStr(s string) bool {
return len(strings.Fields(strings.TrimSpace(s))) == 2
} Type guard
func isTwoFields(s string) bool {
return len(strings.Fields(strings.TrimSpace(s))) == 2
} Try / catch
os, arch, err := wslconn.GetClientPlatformFromOsArchStr(ctx, osArchStr)
if err != nil && strings.Contains(err.Error(), "unexpected output") {
// re-acquire fresh uname output instead of the cached string
} Prevention
- Validate cached os/arch strings are two tokens before reuse
- Never pass version or banner lines where a uname line is expected
- Prefer GetClientPlatform (runs uname live) over cached strings when unsure
When it happens
Trigger: InstallWsh (or other callers) pass an osArchStr — e.g. one cached from a previous version query — that is empty, contains one token, or has extra tokens.
Common situations: Caching the osArchStr after it was truncated; passing a raw version line instead of the uname line; extra whitespace/format changes between versions of the conncontroller output.
Related errors
- User redirected to docsite to learn more about ARM64 transla
- results.error
- no window found with workspace ${data.workspaceid}
- No tab view found for the given webContents id
- no webcontents found with blockid ${data.blockid}
AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01).
Data as JSON: /api/errors/109487eb46ac6f4b.
Report an issue: GitHub.