Skip to content
Bug reportNov 20, 2026· 0:51· 11 views

Excalidraw: opening SVG content saved with .excalidraw extension shows cryptic 'Error: invalid file'

0:51 total

Comments · 0

Be the first to comment.

Bug reportby SceneRecap AI

mediumFile open / scene import: content type detection in the load-from-file path (the extension-based parsing of .excalidraw files does not fall back to SVG with embedded scene data), plus error messaging for invalid files.
os: macOSdpr: 1url: /locale: en-USbrowser: Chromium 151.0.7922.34timezone: Europe/Berlinviewport: 1280x720

Repro steps

  1. 1.Open Excalidraw at /. The welcome screen is shown.
  2. 2.Press r to select the rectangle tool.
  3. 3.Click on the canvas to draw a rectangle (Canvas (rectangle)).
  4. 4.Press Escape. One rectangle is on the canvas and the selection tool is active.
  5. 5.Click Main menu.
  6. 6.Click the Open menu item. The Load from file dialog appears with a replace-content warning.
  7. 7.Click Load from file and choose a file that holds SVG content but has a .excalidraw extension.

Expected

The SVG content is decoded and shown on the canvas. If it cannot be loaded, the error should state the reason and a next step.

Actual

An Error modal appears with only the text 'Error: invalid file'. The drawing is not loaded. The rectangle stays on the canvas behind the modal, and the modal stays open with no visible change through the end of the recording.

Evidence

visualLoad from file dialog shows the warning 'Loading from a file will replace your existing content' and the Load from file button.
visualError modal shows 'Error: invalid file' and replaces the Load from file dialog. It gives no reason and no next step.
visualThe Error modal is unchanged and the original rectangle is still visible behind it. No file content was loaded.
consolegate 3 check: file opened was SVG content with .excalidraw extension; expected: SVG decoded and shown on canvas; actual: 'Error: invalid file' toast
consoleUnrelated warning at load: Error with Feature-Policy header: Unrecognized feature: '*'.
Issue markdown (copy-paste ready)
## Summary
Opening a file that holds SVG content but has a `.excalidraw` extension fails. The only feedback is a generic `Error: invalid file` modal.

## Environment
- Browser: Chromium 151.0.7922.34
- OS: macOS
- Viewport: 1280x720, DPR 1
- Locale: en-US, timezone Europe/Berlin
- URL: `/`

## Steps to reproduce
1. Open Excalidraw at `/` (0s).
2. Press `r` and click the canvas to draw a rectangle (2.1s, 3.2s).
3. Press `Escape` (4.9s).
4. Click **Main menu** (6.3s), then **Open** (7.8s).
5. In the Load from file dialog, click **Load from file** (11.1s). Pick a file with SVG content and a `.excalidraw` extension.

## Expected
The SVG content is decoded and shown on the canvas. If loading fails, the error explains why and suggests a next step.

## Actual
At 13s an **Error** modal shows `Error: invalid file`. Nothing is loaded. The original rectangle stays behind the modal, and the modal stays open with no change through the end of the recording.

## Evidence
- 9s (visual): Load from file dialog with the replace-content warning.
- 13s (visual): Error modal `Error: invalid file` replaces the dialog.
- 29s (visual): The modal is unchanged. The canvas still shows only the original rectangle.
- 47s (console, error): `gate 3 check: file opened was SVG content with .excalidraw extension; expected: SVG decoded and shown on canvas; actual: 'Error: invalid file' toast`
- 0s (console, warn, unrelated): `Error with Feature-Policy header: Unrecognized feature: '*'.`

## Suggested area
File open and scene import. Content type detection appears to rely on the `.excalidraw` extension and does not fall back to SVG parsing. Error messaging for invalid files could also be clearer.

*Recorded with SceneRecap.*

Your recordings could explain themselves too.

Free plan · silent recordings welcome · bug reports included.

Try SceneRecap free →
Excalidraw: opening SVG content saved with .excalidraw extension shows cryptic 'Error: invalid file' · SceneRecap