Closed Bug 1240762 Opened 5 years ago Closed 5 years ago

Service worker request coming from Cache are not correctly displayed

Categories

(DevTools :: Netmonitor, defect)

defect
Not set
normal

Tracking

(firefox46 fixed)

RESOLVED FIXED
Firefox 46
Tracking Status
firefox46 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(1 file)

Intercepted request coming from Cache ends up having a broken display in the netmonitor.

You can try opening this example:
  https://boopathi.in/sw-cache-all/
When reloading, the request being hooked by the service worker are not flagged correctly, nor can we see their response content.

We can't see the content of the requests because of this exception:
NS_ERROR_INVALID_CONTENT_ENCODING: Component returned failure code: 0x804b001b (NS_ERROR_INVALID_CONTENT_ENCODING) [nsIStreamListener.onDataAvailable]

We get this exception as we try to apply the compression converter here:
  http://mxr.mozilla.org/mozilla-central/source/devtools/shared/webconsole/network-monitor.js#223
Which is a hack specific to e10s, with request going to the parent.
In current service worker codepath, request stay in the child and are not gzipped. We don't need this converter workaround.

Also, we end up missing updating "saveRequestAndResponseBodies" on pref change when we instanciate this NetworkMonitor instance in the child process.
Attached patch patch v1Splinter Review
See comment 0 for more info about this patch.
Feel free to redirect the review to whoever would be best looking at that.
Attachment #8709956 - Flags: review?(vporof)
Comment on attachment 8709956 [details] [diff] [review]
patch v1

Review of attachment 8709956 [details] [diff] [review]:
-----------------------------------------------------------------

Do we want to temporarily just omit these requests or have them displayed in the netmonitor at some point?
Attachment #8709956 - Flags: review?(vporof) → review+
These requests (Cache/ServiceWorker/Fetch) are already displayed, but with stuff being incorrect or broken (transfered size empty, and empty response content panel).
https://hg.mozilla.org/mozilla-central/rev/afb7e27d06f5
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.