{"record":{"id":"56d1f1512c820287","repo":"toeverything/AFFiNE","slug":"no-readable-files-were-found-in-the-selected-folde","errorCode":null,"errorMessage":"No readable files were found in the selected folder.","messagePattern":"No readable files were found in the selected folder\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/frontend/core/src/modules/import/services/service.ts","lineNumber":106,"sourceCode":"    });\n    return commitService.commitBatch(batch);\n  }\n\n  async importObsidianVault(files: File[], context?: ImportRunContext) {\n    const collection = this.workspaceService.workspace.docCollection;\n    const commitService = this.createCommitService({\n      organize: true,\n      explorerIcon: true,\n    });\n    if (!BUILD_CONFIG.isElectron) {\n      await preflightWebFilesImport(files);\n    }\n    if (BUILD_CONFIG.isElectron) {\n      return commitNativeImport('obsidian', files, commitService, context);\n    }\n    const { files: snapshots, warnings } = await snapshotReadableFiles(files);\n    if (!snapshots.length) {\n      throw new Error('No readable files were found in the selected folder.');\n    }\n\n    const { batch } = await ObsidianTransformer.planObsidianVault({\n      collection,\n      schema: getAFFiNEWorkspaceSchema(),\n      importedFiles: snapshots,\n      extensions: getStoreManager().config.init().value.get('store'),\n    });\n    batch.warnings = [...(batch.warnings ?? []), ...warnings];\n    return commitService.commitBatch(batch);\n  }\n\n  async importBearBackup(file: File, context?: ImportRunContext) {\n    const collection = this.workspaceService.workspace.docCollection;\n    const commitService = this.createCommitService({\n      organize: true,\n      tag: true,\n    });","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/toeverything/AFFiNE/blob/b4c8548c09da21b2898443559a5b846f0ccf5dd8/packages/frontend/core/src/modules/import/services/service.ts#L88-L124","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Select a folder containing readable documents.","Check file permissions on the selected folder."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b4c8548c09da21b2898443559a5b846f0ccf5dd8","analyzedAt":"2026-08-18T21:16:52.546Z","contentChangedAt":"2026-08-18T21:16:52.546Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}