toeverything/AFFiNE · error

No Notion Markdown or HTML pages found in the archive

Error message

No Notion Markdown or HTML pages found in the archive

What it means

A format-detection failure in detectNotionZipFormat: the helper scanned every entry of the uploaded Notion export zip looking for '.md' pages (returns 'markdown') or '.html' pages (returns 'html', ignoring trailing /index.html). It fires when the archive contains neither — meaning the zip is not a Notion export (or is corrupted/empty), so the importer cannot pick a transformer for it.

Source

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

      tagService: options.tag ? this.tagService : undefined,
      logger,
    });
  }
}

async function detectNotionZipFormat(file: File): Promise<'markdown' | 'html'> {
  const unzip = new Unzip();
  await unzip.load(file);
  let hasHtml = false;
  for (const entry of unzip) {
    const lower = entry.path.toLowerCase();
    if (lower.endsWith('.md')) return 'markdown';
    if (lower.endsWith('.html') && !lower.endsWith('/index.html')) {
      hasHtml = true;
    }
  }
  if (hasHtml) return 'html';
  throw new Error('No Notion Markdown or HTML pages found in the archive');
}

async function snapshotReadableFiles(files: File[]) {
  const snapshots: File[] = [];
  const warnings: ImportWarning[] = [];
  for (const file of files) {
    try {
      snapshots.push(await snapshotFile(file));
    } catch (error) {
      const sourcePath = file.webkitRelativePath || file.name;
      const reason = error instanceof Error ? error.message : String(error);
      warnings.push({
        code: 'file-unreadable',
        message: `Skipped unreadable file: ${sourcePath}. ${reason}`,
        sourcePath,
      });
    }
  }

View on GitHub (pinned to b4c8548c09)

Solutions

  1. Export from Notion as Markdown or HTML and import that archive.
  2. Check the archive contains the exported pages.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown by detectNotionZipFormat when scanning the uploaded Notion export zip finds no .md files and no qualifying .html page files, so neither markdown nor html format can be detected.

Common situations: The uploaded Notion export archive contains no importable Markdown or HTML pages, e.g. a wrong or empty zip. Re-export from Notion with Markdown & CSV or HTML format and upload the correct archive.


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