Closed Bug 1539071 Opened 8 months ago Closed 8 months ago

Blank page when reloading about:devtools-toolbox using remote debugging


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

68 Branch


(firefox66 wontfix, firefox67 wontfix, firefox68 verified)

Firefox 68
Tracking Status
firefox66 --- wontfix
firefox67 --- wontfix
firefox68 --- verified


(Reporter: hani.yacoub, Assigned: jdescottes)


(Blocks 1 open bug)


(Whiteboard: [remote-debugging-reserve])


(1 file, 1 obsolete file)

[Affected versions]:
Nightly 68.0a1, Firefox Dev Edition 67.0b4 and Firefox 66.0.1

[Affected platforms]:
Platforms: Windows 10 x 64, Mac OS X 10.14, and Ubuntu 16.04 x64.

[Steps to reproduce]:

  1. Make sure that you are connected to a local Firefox using about:debugging following these instructions:
  2. Have both profiles "Client Firefox and Server Firefox" running.
  3. From "Tabs" section, click on "Inspect" button for any of the open tabs (ex.
  4. Click on "Memory/Performnce/Console" panel.
  5. Close this about:devtools-toolbox tab.
  6. Reload the about:devtools-toolbox tab (keyboard shortcut, reload button, etc...)

[ Expected result]:
about:devtools-toolbox should be reloaded.

[Actual result]:
The page is reloaded but it returns a blank page.


  • I observed that only on the following panels the issue is reproducible (Memory/Performnce/Console/Inspector).
  • After a couple of reloads "about:devtools-toolbox" page could be displayed correctly.
Summary: Blank page when reloading about:devtools-toolbox → Blank page when reloading about:devtools-toolbox using remote debugging

The difference with similar Bug 1521440 is that while the UI is blank, we remain on about:devtools-toolbox (and as Hani said, if you keep reloading, you will eventually get the page to display correctly).

We suspect this is linked to async destroy in panels. We have a bug logged dedicated to clean this up

In this bug we should see if we can make about:devtools-toolbox resilient to panels with async destroy. If not this will be blocked on Bug 1529621.

Assignee: nobody → jdescottes
Priority: -- → P1
Whiteboard: [remote-debugging-reserve]

After investigating a bit, this is the combination of several issues. They are not related to a particular panel being async, the whole toolbox destroy being async is the problem here.

The first issue is that the devtools's map _toolboxes is updated too late.

When we reload the page, devtools.js::showToolbox will check if the target already has a toolbox:

But the entry in the map is only cleared when toolbox fires the "destroyed" event, which is almost the last step of the async destroy.

So instead of creating a new Toolbox we try to reuse the one that is being destroyed.

If we fix that, by invalidating the entry in the map earlier or any other workaround, then we have a second issue. When debugging remote clients, we are always reusing the same client (to avoid connection prompts). But if we use the same client, we will also get the same target fronts when we ask the front for a debug target. The toolbox destroy is also destroying the target front at the end of its destroy:

But when we try to get the target after the reload,
The target has not been destroyed yet, so client.mainRoot.getTab({ outerWindowID: id }); will return the target front instance that is about to be destroyed. This second issue would also not occur if the toolbox destroy was synchronous.

I will post a workaround to illustrate this. The correct fix is definitely to make everything in the destroy sequence for the toolbox synchronous.

I don't intend to land this, this is just to illustrate the investigation posted in the bug.

See Also: → 1542702
Pushed by
Wait for toolbox destroy to finish before reloading toolbox tab;r=daisuke
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68

Is this patch worth uplift consideration for Beta or can it ride the trains?

Flags: needinfo?(jdescottes)
Flags: in-testsuite+

This one can ride the trains, about:devtools-toolbox should be mostly unused until Fx 68 when we ship the new remote debugging.

Flags: needinfo?(jdescottes)

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

Attachment #9053974 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.