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

**URL:** <https://community.passbolt.com/t/bug-firefox-saving-editing-resources-fails-with-an-unexpected-error-occurred-when-browser-history-is-set-to-never-remember-history-opfs-securityerror/14884>\
**Category:** Community Feedback\
**Created:** [November 4, 2026, 7:06am UTC](https://community.passbolt.com/t/bug-firefox-saving-editing-resources-fails-with-an-unexpected-error-occurred-when-browser-history-is-set-to-never-remember-history-opfs-securityerror/14884 "2026-11-04T07:06:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![staubli-net](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/staubli-net/32/6094_2.png) [@staubli-net](https://community.passbolt.com/u/staubli-net)\
**Post date:** [November 4, 2026, 7:06am UTC](https://community.passbolt.com/t/bug-firefox-saving-editing-resources-fails-with-an-unexpected-error-occurred-when-browser-history-is-set-to-never-remember-history-opfs-securityerror/14884/1 "2026-11-04T07:06:16Z")

</div>

**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:

```auto
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

---

<div class="post-metadata">

**Author:** ![Subha](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/subha/32/6117_2.png) [@Subha](https://community.passbolt.com/u/Subha)\
**Post date:** [November 4, 2026, 9:37am UTC](https://community.passbolt.com/t/bug-firefox-saving-editing-resources-fails-with-an-unexpected-error-occurred-when-browser-history-is-set-to-never-remember-history-opfs-securityerror/14884/2 "2026-11-04T09:37:32Z")

</div>

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