Closed Bug 1724607 Opened 3 years ago Closed 3 years ago

window.caches.open throws "DOMException: The operation is insecure." when in a Private Window

Categories

(Core :: Storage: Cache API, defect)

Firefox 90
defect

Tracking

()

RESOLVED DUPLICATE of bug 1320796

People

(Reporter: steve.matney, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:90.0) Gecko/20100101 Firefox/90.0

Steps to reproduce:

  1. From a Private Window, open the Firefox Developer Tools.
  2. Try to open a cache with any name. (window.caches.open('any_name_fails')).

Actual results:

The returned Promise rejects with "DOMException: The operation is insecure."

Expected results:

A Promise which successfully resolves to a generated or existing cache should be returned.

Summary: window.caches.open throws "DOMException: The operation is insecure." when in a Private Browser → window.caches.open throws "DOMException: The operation is insecure." when in a Private Window

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Cocoa' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Widget: Cocoa
Product: Firefox → Core
Component: Widget: Cocoa → DOM
Product: Core → DevTools

I don’t know the inner-workings of Firefox, but I don’t believe this is a DevTools bug. It can simply be recreated using dev tools. We were seeing this bug in a fresh Private Window from JS running on the page, not just running manually through the console.

Component: DOM → General
Product: DevTools → Core
Component: General → Storage: Cache API

ServiceWorker is not supported with private browsing mode.

Basically, disk access is not allowed in private browsing mode, that's the reason why you get this exception when calling window.caches.open().
bug 1320796 has more details about ServiceWorker in private browsing mode.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.