Closed Bug 1534201 Opened 5 years ago Closed 5 years ago

Developer Tools can't be opened again once it's closed for any of the workers

Categories

(DevTools :: about:debugging, defect, P1)

67 Branch
x86_64
Windows 10
defect

Tracking

(firefox65 unaffected, firefox66 unaffected, firefox67 verified)

VERIFIED FIXED
Tracking Status
firefox65 --- unaffected
firefox66 --- unaffected
firefox67 --- verified

People

(Reporter: hyacoub, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [remote-debugging-reserve])

[Affected versions]:
Nightly 67.0a1

[Affected platforms]:
Platforms: Windows 10 x 64

[Steps to reproduce]:

  1. Make sure that you are connected to a local Firefox using about:debugging following these instructions:
    https://gist.github.com/juliandescottes/b0d3d83154d9ea8a84db5d32aa35d2c1
    https://www.youtube.com/watch?v=YI0plrxWHf4
  2. Have both profiles "Client Firefox and Server Firefox" running.
  3. From "Workers" section, click on "Inspect" button for any of the workers (ex. Service Worker -> https://www.youtube.com/sw.js).
  4. Close the developer tools opened.
  5. Click again on "Inspect" button for the same worker.

[ Expected result]:
Developer tools should be opened again.

[Actual result]:
Developer tools is not opened again only after inspecting another worker/tab/extension and then inspect the first worker one again.

[Note]:
I only tested this on Windows 10 x 64, I'll verify later if it's reproducible on other OS's.

Priority: -- → P3

I think this is a duplicate of Bug 1531767.

From the other bug:

STRs:

  • open aboutdebugging
  • connect to Fx for android runtime via USB
  • select the runtime
  • find a shared worker (there should be one or two)
  • click inspect
  • close the toolbox window
  • click inspect again
    ER: Should reopen the window
    AR: Nothing happens

Found the issue while working on the Processes category, which shares a similar issue. When the toolbox is closed, the target front is destroyed and we need a new front. However unless something triggers a requestWorkers action, the workers will not be updated.

An option to fix this is to request the list of workers again when closing the toolbox. See similar snippet from my WIP patch on processes:

case DEBUG_TARGETS.PROCESS: {
    const devtoolsClient = runtimeDetails.clientWrapper.client;
    const processTargetFront = devtoolsClient.getActor(id);
    const toolbox = await gDevTools.showToolbox(processTargetFront, null,
      Toolbox.HostType.WINDOW);

    // Once the target is destroyed after closing the toolbox, the front is gone and
    // can no longer be used. Extensions don't have the issue because we don't list
    // the target fronts directly, but proxies on which we call connect to create a
    // target front when we want to inspect them. Local workers don't have this issue
    // because closing the toolbox stops several workers which will indirectly trigger
    // a requestWorkers action. However workers on a remote runtime have the exact
    // same issue.
    // To workaround the issue we request processes after the toolbox is closed.
    toolbox.once("destroy", () => dispatch(Actions.requestProcesses()));
    break;
}

Using about:devtools-toolbox tabs to debug those targets would also fix the issue.

Should be fixed by Bug 1539328

Depends on: 1539328

Should also be fixed now, can you verify? Thanks!

Flags: needinfo?(hani.yacoub)

Closing as fixed

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Priority: P3 → P1
Whiteboard: [remote-debugging-reserve]

Verified as fixed on Firefox Nightly 68.0a1 (2019-05-01) on Windows 10 x 64, Mac OS X 10.14 and on Ubuntu 16.04 x64.

Status: RESOLVED → VERIFIED
Flags: needinfo?(hani.yacoub)
You need to log in before you can comment on or make changes to this bug.