{"record":{"id":"669a48c16624386b","repo":"toeverything/AFFiNE","slug":"com-affine-import-status-failed-message-no-file-se","errorCode":null,"errorMessage":"com.affine.import.status.failed.message.no-file-selected","messagePattern":"com\\.affine\\.import\\.status\\.failed\\.message\\.no-file-selected","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/frontend/core/src/desktop/dialogs/import/index.tsx","lineNumber":731,"sourceCode":"        if (importConfig.nativeOnly && !BUILD_CONFIG.isElectron) {\n          throw new Error(t['com.affine.import.onenote.desktop-only']());\n        }\n        const { acceptType, multiple } = importConfig.fileOptions;\n\n        const files =\n          acceptType === 'Skip'\n            ? []\n            : acceptType === 'Directory'\n              ? await openDirectory({\n                  fileSystemAccess: false,\n                })\n              : await openFilesWith(acceptType, multiple, {\n                  fileSystemAccess: false,\n                  snapshot: shouldSnapshotPickedFiles(type, acceptType),\n                });\n\n        if (!files || (files.length === 0 && acceptType !== 'Skip')) {\n          throw new Error(\n            t['com.affine.import.status.failed.message.no-file-selected']()\n          );\n        }\n\n        if (acceptType !== 'Skip') {\n          setStatus('importing');\n          track.$.importModal.$.import({\n            type,\n            status: 'importing',\n          });\n        }\n\n        const abortController = new AbortController();\n        importAbortControllerRef.current = abortController;\n        const {\n          docIds,\n          entryId,\n          isWorkspaceFile,","sourceCodeStart":713,"sourceCodeEnd":749,"githubUrl":"https://github.com/toeverything/AFFiNE/blob/b4c8548c09da21b2898443559a5b846f0ccf5dd8/packages/frontend/core/src/desktop/dialogs/import/index.tsx#L713-L749","documentation":"The file-picker step of handleImport returned no files for the chosen import type, so there is nothing to hand to the import function; the dialog surfaces this localized failure message via setImportError instead of running an import with an empty selection.","triggerScenarios":"Thrown in handleImport when the file picker returns no files for a type that requires input, meaning the user cancelled or the selection was empty.","commonSituations":"The import dialog reports failure because no file was selected. Reopen the picker and choose at least one supported file before importing.","solutions":["Select a file before starting the import.","Re-open the file picker and choose an archive."],"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"}