Closed Bug 1594836 Opened 5 years ago Closed 5 years ago

Service Worker sources are sometimes missing

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(firefox72 fixed)

RESOLVED FIXED
Firefox 72
Tracking Status
firefox72 --- fixed

People

(Reporter: Harald, Assigned: bhackett1024)

References

Details

Attachments

(2 files)

What were you doing?

  1. Open Debugger on platform-status.mozilla.org/ (See offline-worker.js in Sources pane and in Threads)
  2. Set a breakpoint in offline-worker.js after self.addEventListener('fetch' …
  3. Reload

Alternatively, I had a case where the sources didn't show when the Debugger opened but when appeared on reload.

What happened?

offline-worker.js is gone, no pausing.

What should have happened?

Workers stays there so it can actually be paused upon.

Attached image image.png

I don't see offline-worker.js. How can I repro this bug?

Honza

Flags: needinfo?(hkirschner)

The devtools.debugger.features.windowless-service-workers preference needs to be set as well I think.

Assignee: nobody → bhackett1024
Flags: needinfo?(hkirschner)

I have the pref set and I still don't see anything

Btw. I can see it in Chrome
Honza

The problem here is related to how the debugger behaves when reloading. When reloading, the debugger detaches from all threads it has attached to. After the reload it attempts to reattach to any threads it can find, but this doesn't actually do anything because detaching from a target's thread seems to leave that thread in a more or less permanently detached state.

I think the right fix here is to just not detach from threads when reloading or navigating. I don't think that detaching from the thread really does that much other than mess up future attach attempts, as the worker's target is left alone. Additionally, the debugger needs to move away from managing attaching/detaching to targets (this is the framework's responsibility), and this is a step in that direction.

It's curious that this bug manifests consistently despite us having a test that we can reload when there is a service worker and things will work.

Pushed by bhackett@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/32ee3bf157f4
Don't detach from threads in the debugger when navigating, r=jlast.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 72
Flags: qe-verify+

Confirmed issue with :72.0a1 (2019-11-07) on Windows 10.
Fix verified with 74.0a1 (2020-02-09) - Windows 10 (for now).

However, in trying to verify the fix with RC build - 73.0 I am unable to see the offline-worker.js either.
Any extra pref needed for the Release builds?

Considering Brian's note, anyone else I could get in touch with to confirm the previous comment?

Flags: needinfo?(jlaster)
Flags: needinfo?(jlaster)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: