{"record":{"id":"7f2b53587691156d","repo":"toeverything/AFFiNE","slug":"no-importable-documents-were-found-in-the-selected","errorCode":null,"errorMessage":"No importable documents were found in the selected file.","messagePattern":"No importable documents were found in the selected file\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/frontend/core/src/desktop/dialogs/import/native-backend.ts","lineNumber":84,"sourceCode":"      entryId ??= batch.entryId;\n      isWorkspaceFile ||= !!batch.isWorkspaceFile;\n      rootFolderId ??= result.rootFolderId;\n    }\n  } catch (error) {\n    if (!cancelled) {\n      try {\n        await native.cancelImportSession(sessionId);\n      } catch {\n        // Preserve the original import error.\n      }\n    }\n    throw error;\n  } finally {\n    await native.disposeImportSession(sessionId);\n  }\n\n  if (!docIds.length && !isWorkspaceFile) {\n    throw new Error('No importable documents were found in the selected file.');\n  }\n\n  return {\n    docIds,\n    entryId,\n    isWorkspaceFile,\n    rootFolderId,\n    warnings,\n  };\n}\n\nasync function getNativeImporter(): Promise<NativeImportSessionHandlers> {\n  const registered = getNativeImportSessionHandlers();\n  if (registered) {\n    return registered;\n  }\n  throw new Error('Native import session handlers are not registered');\n}","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/toeverything/AFFiNE/blob/b4c8548c09da21b2898443559a5b846f0ccf5dd8/packages/frontend/core/src/desktop/dialogs/import/native-backend.ts#L66-L102","documentation":"Thrown at the end of commitNativeImport when the native importer finished but produced no doc ids and the archive was not a workspace file, meaning the selected file contained nothing importable. Callers surface this to the user as an empty-import message.","triggerScenarios":"Thrown after a native import session completes when no document ids were committed and the source was not a workspace file, i.e. nothing importable was extracted.","commonSituations":"Occurs when the chosen file contains no supported documents (e.g. empty or unrelated archive). Pick a file with importable Markdown/HTML documents.","solutions":["Choose a file that actually contains importable documents.","Check the file format matches the selected import type."],"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"}