{"record":{"id":"90e2028719358148","repo":"zellij-org/zellij","slug":"plugin-is-not-stored-in-memory","errorCode":null,"errorMessage":"Plugin is not stored in memory","messagePattern":"Plugin is not stored in memory","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"zellij-server/src/plugins/plugin_loader.rs","lineNumber":165,"sourceCode":"        self.loading_indication.override_previous_error();\n        let wasm_bytes = self.plugin_config.resolve_wasm_bytes(&self.plugin_dir)?;\n        let timer = std::time::Instant::now();\n        let module = Module::new(&self.engine, &wasm_bytes)?;\n        log::info!(\n            \"Loaded plugin '{}' in {:?}\",\n            self.plugin_config.path.display(),\n            timer.elapsed()\n        );\n        Ok(module)\n    }\n    fn load_module_from_memory(&mut self) -> Result<Module> {\n        let module = self\n            .plugin_cache\n            .lock()\n            .unwrap()\n            .remove(&self.plugin_config.path) // TODO: do we still bring it back later?\n            // maybe we can forgo this dance?\n            .ok_or(anyhow!(\"Plugin is not stored in memory\"))?;\n        Ok(module)\n    }\n    fn load_plugin_instance(\n        &mut self,\n        mut store: Store<PluginEnv>,\n        instance: &Instance,\n    ) -> Result<()> {\n        let err_context = || format!(\"failed to load plugin from instance {instance:#?}\");\n        let main_user_instance = instance.clone();\n        let start_function = instance\n            .get_typed_func::<(), ()>(&mut store, \"_start\")\n            .with_context(err_context)?;\n        let load_function = instance\n            .get_typed_func::<(), ()>(&mut store, \"load\")\n            .with_context(err_context)?;\n        let mut workers = HashMap::new();\n        for function_name in instance\n            .exports(&mut store)","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/zellij-org/zellij/blob/5cb5df5cce4e16c5d1c57c7c062e4a90a7823c41/zellij-server/src/plugins/plugin_loader.rs#L147-L183","documentation":"Error \"Plugin is not stored in memory\" thrown in zellij-org/zellij.","triggerScenarios":"Occurs at zellij-server/src/plugins/plugin_loader.rs:165 when the operation fails: \"Plugin is not stored in memory\". Currently there is no defensive handling preventing or contextualizing this failure before it surfaces.","commonSituations":"Race between plugin unload and a pending message or command.","solutions":["Ensure the plugin is loaded/started before sending it messages.","Handle plugin unload events so no messages are sent to gone plugins."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5cb5df5cce4e16c5d1c57c7c062e4a90a7823c41","analyzedAt":"2026-08-19T07:42:58.758Z","contentChangedAt":"2026-08-19T07:42:58.758Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}