biomejs/biome · error

Scanning task to complete successfully

Error message

Scanning task to complete successfully

What it means

Error "Scanning task to complete successfully" thrown in biomejs/biome.

Source

Thrown at crates/biome_lsp/src/session.rs:439

            .map(|(_project_path, project_key)| *project_key)
    }

    /// Registers an open project with its root path and scans the folder.
    #[tracing::instrument(level = "debug", skip(self))]
    pub(crate) async fn insert_and_scan_project(
        self: &Arc<Self>,
        project_key: ProjectKey,
        path: BiomePath,
        scan_kind: ScanKind,
        force: bool,
    ) {
        self.projects.pin().insert(path.clone(), project_key);

        // Spawn the scan in the background, to avoid timing out the LSP request.
        let session = self.clone();
        spawn(async move { session.scan_project(project_key, scan_kind, force).await })
            .await
            .expect("Scanning task to complete successfully");
    }

    /// Get a [`Document`] matching the provided [`Uri`]
    ///
    /// If document does not exist, result is [WorkspaceError::NotFound]
    pub(crate) fn document(&self, url: &Uri) -> Option<Document> {
        self.documents.pin().get(url).cloned()
    }

    /// Set the [`Document`] for the provided [`Uri`]
    ///
    /// Used by [`handlers::text_document] to synchronize documents with the client.
    pub(crate) fn insert_document(&self, url: Uri, document: Document) {
        self.documents.pin().insert(url, document);
    }

    /// Remove the [`Document`] matching the provided [`Uri`]
    pub(crate) fn remove_document(&self, url: &Uri) -> Option<ProjectKey> {

View on GitHub (pinned to 0fca643d22)

Solutions

  1. Check that the workspace scanner task was not cancelled before awaiting its result.
  2. Investigate earlier scanner errors in the logs; the join failure usually follows a panic in the scanner thread.

Example fix

// Handle the JoinError instead of expecting: handle.await.map_err(...)?

When it happens

Trigger: Thrown at crates/biome_lsp/src/session.rs:438 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of biomejs/biome@0fca643d22 (2026-08-20). Data as JSON: /api/errors/c3e91aed5122f483. Report an issue: GitHub.