zed-industries/zed · error · anyhow::Error

extension no longer installed

Error message

extension no longer installed

What it means

prepare_remote_extension was asked to prepare an extension whose id is no longer in the extension index — the extension was uninstalled (or its files removed) between the request being queued and the preparation task running. This sentinel guard prevents operating on a vanished extension's directory.

Source

Thrown at crates/extension_host/src/extension_host.rs:1792

            .metadata(&extension_dir)
            .await?
            .with_context(|| format!("missing extension directory {extension_dir:?}"))?
            .is_symlink;

        let language_dir = extension_dir.join("languages");
        if let Ok(mut language_paths) = fs.read_dir(&language_dir).await {
            while let Some(language_path) = language_paths.next().await {
                let language_path = language_path
                    .with_context(|| format!("reading entries in language dir {language_dir:?}"))?;
                let Ok(relative_path) = language_path.strip_prefix(&extension_dir) else {
                    continue;
                };
                let Ok(Some(fs_metadata)) = fs.metadata(&language_path).await else {
                    continue;
                };
                if !fs_metadata.is_dir {
                    continue;
                }
                let config = {
                    let fs = fs.clone();
                    let language_config_path = language_path.join(LanguageConfig::FILE_NAME);
                    async move {
                        let config = fs.load(&language_config_path).await.with_context(|| {
                            format!("loading language config from {language_config_path:?}")
                        })?;
                        LanguageConfig::from_toml(&config).map_err(anyhow::Error::from)
                    }
                };
                let query_files = async {
                    Ok(discover_query_files(fs.clone(), &language_path)
                        .await
                        .log_err())
                };
                let (config, query_files) = futures::try_join!(config, query_files)?;

                let relative_path = relative_path.to_rel_path_buf()?;

View on GitHub (pinned to 9d272b0363)

Solutions

  1. Treat as benign cancellation: skip the remote preparation and clean up any partial tmp_dir state
  2. Reinstall the extension and retry if it was unintentionally removed
  3. Guard callers against stale queued requests after uninstall events
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/extension_host/src/extension_host.rs:1792 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-08-20). Data as JSON: /api/errors/1c574179ca1a8153. Report an issue: GitHub.