{"record":{"id":"d2271afd11c91a0c","repo":"clockworklabs/SpacetimeDB","slug":"unknown-procedureid-id","errorCode":null,"errorMessage":"unknown procedureId ${id}","messagePattern":"unknown procedureId (.+?)","errorType":"exception","errorClass":"RangeError","httpStatus":null,"severity":"critical","filePath":"crates/bindings-typescript/src/server/runtime.ts","lineNumber":739,"sourceCode":"    for (let i = 0; i < this.#flatSubmodules.length; i++) {\n      const m = this.#flatSubmodules[i];\n      if (id < offset + m.procedureFns.length) {\n        return callProcedure(\n          m.procedureFns,\n          id - offset,\n          senderIdentity,\n          connId,\n          ts,\n          args,\n          () => this.#getSubmoduleDbView(i),\n          m.subDispatches,\n          m.namePrefix\n        );\n      }\n      offset += m.procedureFns.length;\n    }\n\n    throw new RangeError(`unknown procedureId ${id}`);\n  }\n\n  __call_http_handler__(\n    id: u32,\n    timestamp: bigint,\n    request: Uint8Array,\n    body: Uint8Array\n  ): [response: Uint8Array, body: Uint8Array] {\n    const moduleCtx = this.#schema;\n    const handler = moduleCtx.httpHandlers[id];\n    const ctx = new HandlerContextImpl(\n      new Timestamp(timestamp),\n      () => this.#dbView,\n      this.#schema.submoduleDispatchInfos\n    );\n    const requestMetadata = HttpRequest.deserialize(new BinaryReader(request));\n    const response = callUserFunction(\n      handler,","sourceCodeStart":721,"sourceCodeEnd":757,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/bindings-typescript/src/server/runtime.ts#L721-L757","documentation":"Procedures are dispatched by numeric id across the flattened procedureFns of the module and submodules (including nested sub-dispatches with name prefixes). When no submodule claims the id, the loop completes and dispatch throws RangeError('unknown procedureId <n>'): the host and the deployed module disagree about the procedure table.","triggerScenarios":"The host invokes a procedure id that does not exist in the deployed build: module redeployed with procedures removed/reordered while host state or generated callers reference old ids; submodule procedure sets changed between builds.","commonSituations":"Redeploying a module with changed procedures without regenerating callers; partial deploy or rollback leaving host and module out of sync; hosttools/SDK/server version mismatch.","solutions":["Redeploy the module and regenerate bindings so procedure ids are consistent","Append new procedures instead of reordering or removing existing ones between deploys","Align spacetimedb host, hosttools and SDK versions; verify the module hash after deploy","If it persists after a clean redeploy, report with module hash and host version"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Append procedures instead of reordering or removing them between deploys","Bundle binding regeneration with every module redeploy in CI","After rollback or partial deploy, verify the host's module hash matches the deployed build"],"tags":["dispatch","schema-mismatch","procedure","typescript"],"backgroundTag":"unknown-dispatch-id","analyzedSha":"524b4487d949b61a07d4f39c862d1290259dfd20","analyzedAt":"2026-08-16T23:58:54.611Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}