[bug] Firefox: saving/editing resources fails with “An unexpected error occurred” when browser history is set to “Never remember history” (OPFS SecurityError)

Steps to reproduce

  1. In Firefox, set Settings → Privacy & Security → History to “Never remember history” (permanent private browsing mode) and restart Firefox.
  2. Open Passbolt with the browser extension and log in.
  3. Create a new resource or edit an existing one, and save.

Actual behaviour

  • Creating or editing a resource fails immediately with “An unexpected error occurred”. No API request is sent.
  • The extension’s background console (about:debugging → Passbolt → Inspect) shows:
DOMException: Security error when calling GetDirectory
    _getFileHandle …/index.min.js:2
    _readAll …
    _writeQueue …
    _withLock …
    delete …
    flush …
    _refreshOfflineOPFSStorage …
    findAndUpdateAll …

Cause / workaround
In permanent private browsing mode, Firefox rejects navigator.storage.getDirectory() with a SecurityError, as documented on MDN. The extension’s offline storage (OPFS) fails, and this apparently breaks saving.
Workaround: History → “Use custom settings” and disable “Always use private browsing mode”. After that, everything works.

Suggestion

  • Catch the SecurityError from OPFS and continue without the offline cache, so core functionality still works.
  • Or detect private browsing (e.g. browser.extension.inIncognitoContext) and show a clear, actionable warning instead of a generic error.

Environment

  • Browser: Firefox 158.0 on Ubuntu 26.10
  • Passbolt browser extension: 5.17.1

Thanks for reporting this, @staubli-net .We have logged this for the team and would update this thread once we have more.