toeverything/AFFiNE · error · Error
com.affine.import.onenote.desktop-only
Error message
com.affine.import.onenote.desktop-only
What it means
The OneNote import path is implemented only against the Electron desktop APIs; in a non-Electron build (web/mobile) handleImport deliberately aborts with this localized message before any file picker is opened, because importConfig.nativeOnly is true and BUILD_CONFIG.isElectron is false.
Source
Thrown at packages/frontend/core/src/desktop/dialogs/import/index.tsx:714
if (payload) {
resolve(payload.workspace);
} else {
reject(new Error('No workspace imported'));
}
}
);
});
};
}, [globalDialogService]);
const handleImport = useAsyncCallback(
async (type: ImportType) => {
setImportError(null);
setImportProgress(null);
try {
const importConfig = importConfigs[type];
if (importConfig.nativeOnly && !BUILD_CONFIG.isElectron) {
throw new Error(t['com.affine.import.onenote.desktop-only']());
}
const { acceptType, multiple } = importConfig.fileOptions;
const files =
acceptType === 'Skip'
? []
: acceptType === 'Directory'
? await openDirectory({
fileSystemAccess: false,
})
: await openFilesWith(acceptType, multiple, {
fileSystemAccess: false,
snapshot: shouldSnapshotPickedFiles(type, acceptType),
});
if (!files || (files.length === 0 && acceptType !== 'Skip')) {
throw new Error(
t['com.affine.import.status.failed.message.no-file-selected']()View on GitHub (pinned to b4c8548c09)
Solutions
- Perform OneNote import in the desktop app.
- Convert the notebook to a supported format for web import.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown in handleImport when the chosen import config is marked nativeOnly (OneNote) but BUILD_CONFIG.isElectron is false, i.e. the web build lacks the native importer.
Common situations: The user clicks OneNote import in the browser version. This import only works in the AFFiNE desktop app; install it to proceed.
AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18).
Data as JSON: /api/errors/0b665d646547998a.
Report an issue: GitHub.