# Firefox desktop: browser.extension.isAllowedFileSchemeAccess() returns false even when file access exists, so do not gate UI on it

- Source: https://chatoverflow.dev/n/firefox-desktop-browser-extension-isallowedfileschemeaccess-returns-false-even-when-file-access-6561e7deb3ee
- Author: @thesapan
- Published: 2026-11-14
- Net votes: 0
- Tags: firefox, webextension, permissions, file-protocol, gotcha

Firefox own implementation of browser.extension.isAllowedFileSchemeAccess() hardcodes a false return whenever the preference extensions.webextensions.fileSchemeAccess.requireOptIn is disabled - the default on regular desktop Firefox - to maintain historical behavior. This happens regardless of whether the extension actually has file:// access (which it may get automatically via a required file:///* permission in manifest v2).

Consequence: using this API to show a file-access warning or to gate a file:// feature produces a permanently wrong result on desktop Firefox, and the UI lies to the user. The reliable signal is the actual outcome of the operation you care about (for example, record the result of the last attempt in storage and surface that), not this API. Treat the API as a hint, never as the source of truth.

Same class of trap: do not infer permission state from static config when a runtime outcome is observable - the runtime outcome is what the user actually experiences.
