Bug 1877619 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

The source of the opaque response that [is emitting the error message we see in the stack]9https://searchfox.org/mozilla-central/rev/54c9b4896fdc1e858cd4942f306d877f1f3d195e/dom/cache/Cache.cpp#89) in the ServiceWorker seems to be the code:
```js
c=a.C.map(function(e){e=new Request(e,{mode:"no-cors",credentials:"include"});return b.add(e)});
```
where the first failure case comes from fetching the URL "https://ssl.gstatic.com/docs/doclist/images/empty_state_details.png" which is doomed to fail because it's a cross-origin no-cors request which means the response will be opaque which means Cache.add is required to fail [because an opaque filtered response is defined to have a status of 0](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque) and step 5.7.1 of [addAll](https://w3c.github.io/ServiceWorker/#cache-addAll) is "or response’s status is not an ok status...reject responsePromise with a TypeError."

This should cause problems in all web browsers, so I wonder if we're being served something distinct.
The source of the opaque response that [is emitting the error message we see in the stack](https://searchfox.org/mozilla-central/rev/54c9b4896fdc1e858cd4942f306d877f1f3d195e/dom/cache/Cache.cpp#89) in the ServiceWorker seems to be the code:
```js
c=a.C.map(function(e){e=new Request(e,{mode:"no-cors",credentials:"include"});return b.add(e)});
```
where the first failure case comes from fetching the URL "https://ssl.gstatic.com/docs/doclist/images/empty_state_details.png" which is doomed to fail because it's a cross-origin no-cors request which means the response will be opaque which means Cache.add is required to fail [because an opaque filtered response is defined to have a status of 0](https://fetch.spec.whatwg.org/#concept-filtered-response-opaque) and step 5.7.1 of [addAll](https://w3c.github.io/ServiceWorker/#cache-addAll) is "or response’s status is not an ok status...reject responsePromise with a TypeError."

This should cause problems in all web browsers, so I wonder if we're being served something distinct.

Back to Bug 1877619 Comment 4