wavetermdev/waveterm · critical
cannot call ${methodName}: no web endpoint
Error message
cannot call ${methodName}: no web endpoint What it means
callBackendService is the generic POST transport for WaveObj backend service calls, building a URL from getWebServerEndpoint(). This error is thrown when that endpoint is null — the frontend has no web server base URL configured/discovered, so no backend HTTP call can be made. It typically means the app is running without a connection to the waveserver (or before the endpoint constant is set).
Source
Thrown at frontend/app/store/wos.ts:119
function callBackendService(service: string, method: string, args: any[], noUIContext?: boolean): Promise<any> {
const startTs = Date.now();
let uiContext: UIContext = null;
if (!noUIContext && globalThis.window != null) {
uiContext = globalStore.get(((window as any).globalAtoms as GlobalAtomsType).uiContext);
}
const waveCall: WebCallType = {
service: service,
method: method,
args: args,
uicontext: uiContext,
};
// usp is just for debugging (easier to filter URLs)
const methodName = `${service}.${method}`;
const usp = new URLSearchParams();
usp.set("service", service);
usp.set("method", method);
const webEndpoint = getWebServerEndpoint();
if (webEndpoint == null) throw new Error(`cannot call ${methodName}: no web endpoint`);
const url = webEndpoint + "/wave/service?" + usp.toString();
const fetchPromise = fetch(url, {
method: "POST",
body: JSON.stringify(waveCall),
});
const prtn = fetchPromise
.then((resp) => {
if (!resp.ok) {
throw new Error(`call ${methodName} failed: ${resp.status} ${resp.statusText}`);
}
return resp.json();
})
.then((respData: WebReturnType) => {
if (respData == null) {
return null;
}
if (respData.updates != null) {
updateWaveObjects(respData.updates);View on GitHub (pinned to a4447c1563)
Solutions
- Launch the app through the wave server so the web endpoint is established (waveserve / correct launcher flags)
- Verify getWebServerEndpoint()'s underlying constant is set before any backend call (await ensureInit / WS connect first)
- Check dev proxy config so /wave/service requests reach the backend
- Log the endpoint value at startup to catch initialization-order bugs
Example fix
// before
const webEndpoint = getWebServerEndpoint();
if (webEndpoint == null) throw new Error(`cannot call ${methodName}: no web endpoint`);
// after
await ensureInitialLoad();
const webEndpoint = getWebServerEndpoint();
if (webEndpoint == null) {
await waitForWebEndpoint(5000);
}
if (webEndpoint == null) throw new Error(`cannot call ${methodName}: no web endpoint`); Defensive patterns
Strategy: validation
Validate before calling
if (getWebServerEndpoint() == null) {
throw new Error("backend unavailable: launch via the wave server (waveserve) so the web endpoint is set");
} Type guard
function backendReachable(): boolean {
return typeof getWebServerEndpoint() === "string" && getWebServerEndpoint().length > 0;
} Try / catch
try {
const obj = await rpcService.Call(ctx, "waveobj", "GetObject", otype, oid);
} catch (e) {
if (String(e).includes("no web endpoint")) {
showBackendDisconnectedBanner();
return null;
}
throw e;
} Prevention
- Always launch the frontend through the wave server launcher, not the raw static files
- Await global init/WS connect before any service call
- Log getWebServerEndpoint() at boot to catch config-order bugs
- Verify dev proxy routes /wave/service to the backend
When it happens
Trigger: Any waveobj service call (e.g. GetObject) while getWebServerEndpoint() returns null: running in an environment where the endpoint was never initialized, or the build/runtime lost WS/web-server configuration.
Common situations: Opening the frontend without the waveserve wrapper (missing --web endpoint setup); misconfigured VITE dev proxy; calling backend services from a pure-web preview with no backend attached.
Related errors
- call ${methodName} failed: ${resp.status} ${resp.statusText}
- call ${methodName} error: ${respData.error}
- ai:endpoint is required
- wcloud endpoint not set
- wcloud ping endpoint not set
AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01).
Data as JSON: /api/errors/0429c52b3915ffe2.
Report an issue: GitHub.