{"record":{"id":"7bda98e22012eac1","repo":"zed-industries/zed","slug":"wasm-extension-channel-should-not-be-closed-yet-e","errorCode":null,"errorMessage":"wasm extension channel should not be closed yet, extension {} (id {})","messagePattern":"wasm extension channel should not be closed yet, extension (.+?) \\(id (.+?)\\)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/extension_host/src/wasm_host.rs","lineNumber":926,"sourceCode":"        })\n        .await\n    }\n\n    pub async fn call<T, Fn>(&self, f: Fn) -> Result<T>\n    where\n        T: 'static + Send,\n        Fn: 'static\n            + Send\n            + for<'a> FnOnce(&'a mut Extension, &'a mut Store<WasmState>) -> BoxFuture<'a, T>,\n    {\n        let (return_tx, return_rx) = oneshot::channel();\n        self.tx\n            .unbounded_send(Box::new(move |extension, store| {\n                async {\n                    let result = f(extension, store).await;\n                    return_tx.send(result).ok();\n                }\n                .boxed()\n            }))\n            .map_err(|_| {\n                anyhow!(\n                    \"wasm extension channel should not be closed yet, extension {} (id {})\",\n                    self.manifest.name,\n                    self.manifest.id,\n                )\n            })?;\n        return_rx.await.with_context(|| {\n            format!(\n                \"wasm extension channel, extension {} (id {})\",\n                self.manifest.name, self.manifest.id,\n            )\n        })\n    }\n}\n\nimpl WasmState {","sourceCodeStart":908,"sourceCodeEnd":944,"githubUrl":"https://github.com/zed-industries/zed/blob/5a9b9558db01a6b906cec2fb70a797affdc58cdd/crates/extension_host/src/wasm_host.rs#L908-L944","documentation":"ExtensionWorker::call tried to schedule a closure onto the extension's event loop but the unbounded channel to that extension's thread is already closed. This indicates the wasm extension's worker thread has shut down (crashed or the extension was unloaded) while the host still held a handle — the caller's request can never run, so it fails with this sentinel naming the extension and its id.","triggerScenarios":"Thrown at crates/extension_host/src/wasm_host.rs:889 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Treat the extension as dead: drop cached handles, mark it failed, and surface an 'extension crashed' state in UI","Reinstall or update the extension if its wasm code panics deterministically on load","Avoid keeping worker handles past unload — subscribe to extension lifecycle events to invalidate them"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5a9b9558db01a6b906cec2fb70a797affdc58cdd","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}