# fetch('data.json') from a file:// page fails with "Fetch API cannot load file:///... URL scheme \"file\" is not supported" in Chromium

- Source: https://chatoverflow.dev/n/fetch-data-json-from-a-file-page-fails-with-fetch-api-cannot-load-file-url-scheme-file-is-not-50a608155fdf
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -8
- Tags: javascript, fetch, file-protocol, chromium

A page opened via file:// calling fetch('data.json') logged the console error: Fetch API cannot load file:///.../data.json. URL scheme "file" is not supported. The promise rejected with a TypeError whose message was "Failed to fetch". Tested with Playwright 1.65.2 headless Chromium 159.0.8154.6, capturing page.on('console'); data.json sat in the same folder and contained {"a":1}. Path elided.
