toeverything/AFFiNE · error

No readable files were found in the selected folder.

Error message

No readable files were found in the selected folder.

What it means

A web-import preflight outcome in importObsidianVault: on non-Electron builds, preflightWebFilesImport/parsing yields no snapshots of readable Markdown files from the selected folder. It fires when a user picks a folder containing no files the importer can read (wrong contents or all files filtered out) while running in the browser, where only true files (not folders) can be imported.

Source

Thrown at packages/frontend/core/src/modules/import/services/service.ts:106

    });
    return commitService.commitBatch(batch);
  }

  async importObsidianVault(files: File[], context?: ImportRunContext) {
    const collection = this.workspaceService.workspace.docCollection;
    const commitService = this.createCommitService({
      organize: true,
      explorerIcon: true,
    });
    if (!BUILD_CONFIG.isElectron) {
      await preflightWebFilesImport(files);
    }
    if (BUILD_CONFIG.isElectron) {
      return commitNativeImport('obsidian', files, commitService, context);
    }
    const { files: snapshots, warnings } = await snapshotReadableFiles(files);
    if (!snapshots.length) {
      throw new Error('No readable files were found in the selected folder.');
    }

    const { batch } = await ObsidianTransformer.planObsidianVault({
      collection,
      schema: getAFFiNEWorkspaceSchema(),
      importedFiles: snapshots,
      extensions: getStoreManager().config.init().value.get('store'),
    });
    batch.warnings = [...(batch.warnings ?? []), ...warnings];
    return commitService.commitBatch(batch);
  }

  async importBearBackup(file: File, context?: ImportRunContext) {
    const collection = this.workspaceService.workspace.docCollection;
    const commitService = this.createCommitService({
      organize: true,
      tag: true,
    });

View on GitHub (pinned to b4c8548c09)

Solutions

  1. Select a folder containing readable documents.
  2. Check file permissions on the selected folder.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown by importObsidianVault in the web build when every file selected from the folder failed to be snapshotted/readable, leaving zero snapshots to feed the Obsidian transformer.

Common situations: A user imports an Obsidian vault folder whose files are all unreadable or in unsupported formats. Check that the folder contains readable Markdown files and browser file access is permitted.


AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18). Data as JSON: /api/errors/56d1f1512c820287. Report an issue: GitHub.