{"record":{"id":"0429c52b3915ffe2","repo":"wavetermdev/waveterm","slug":"cannot-call-methodname-no-web-endpoint","errorCode":null,"errorMessage":"cannot call ${methodName}: no web endpoint","messagePattern":"cannot call (.+?): no web endpoint","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"frontend/app/store/wos.ts","lineNumber":119,"sourceCode":"function callBackendService(service: string, method: string, args: any[], noUIContext?: boolean): Promise<any> {\n    const startTs = Date.now();\n    let uiContext: UIContext = null;\n    if (!noUIContext && globalThis.window != null) {\n        uiContext = globalStore.get(((window as any).globalAtoms as GlobalAtomsType).uiContext);\n    }\n    const waveCall: WebCallType = {\n        service: service,\n        method: method,\n        args: args,\n        uicontext: uiContext,\n    };\n    // usp is just for debugging (easier to filter URLs)\n    const methodName = `${service}.${method}`;\n    const usp = new URLSearchParams();\n    usp.set(\"service\", service);\n    usp.set(\"method\", method);\n    const webEndpoint = getWebServerEndpoint();\n    if (webEndpoint == null) throw new Error(`cannot call ${methodName}: no web endpoint`);\n    const url = webEndpoint + \"/wave/service?\" + usp.toString();\n    const fetchPromise = fetch(url, {\n        method: \"POST\",\n        body: JSON.stringify(waveCall),\n    });\n    const prtn = fetchPromise\n        .then((resp) => {\n            if (!resp.ok) {\n                throw new Error(`call ${methodName} failed: ${resp.status} ${resp.statusText}`);\n            }\n            return resp.json();\n        })\n        .then((respData: WebReturnType) => {\n            if (respData == null) {\n                return null;\n            }\n            if (respData.updates != null) {\n                updateWaveObjects(respData.updates);","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/wavetermdev/waveterm/blob/a4447c1563b2df285ab89e76c82f91e1a1a49c1e/frontend/app/store/wos.ts#L101-L137","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nconst webEndpoint = getWebServerEndpoint();\nif (webEndpoint == null) throw new Error(`cannot call ${methodName}: no web endpoint`);\n// after\nawait ensureInitialLoad();\nconst webEndpoint = getWebServerEndpoint();\nif (webEndpoint == null) {\n    await waitForWebEndpoint(5000);\n}\nif (webEndpoint == null) throw new Error(`cannot call ${methodName}: no web endpoint`);","handlingStrategy":"validation","validationCode":"if (getWebServerEndpoint() == null) {\n    throw new Error(\"backend unavailable: launch via the wave server (waveserve) so the web endpoint is set\");\n}","typeGuard":"function backendReachable(): boolean {\n    return typeof getWebServerEndpoint() === \"string\" && getWebServerEndpoint().length > 0;\n}","tryCatchPattern":"try {\n    const obj = await rpcService.Call(ctx, \"waveobj\", \"GetObject\", otype, oid);\n} catch (e) {\n    if (String(e).includes(\"no web endpoint\")) {\n        showBackendDisconnectedBanner();\n        return null;\n    }\n    throw e;\n}","preventionTips":["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"],"tags":["network","configuration","backend","wave"],"backgroundTag":"missing-endpoint-config","analyzedSha":"a4447c1563b2df285ab89e76c82f91e1a1a49c1e","analyzedAt":"2026-09-01T15:26:23.972Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}