Blank page when reloading about:devtools-toolbox using remote debugging
Categories
(DevTools :: about:debugging, defect, P1)
Tracking
(firefox66 wontfix, firefox67 wontfix, firefox68 verified)
People
(Reporter: hyacoub, Assigned: jdescottes)
References
(Blocks 1 open bug)
Details
(Whiteboard: [remote-debugging-reserve])
Attachments
(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]:
- 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 - Have both profiles "Client Firefox and Server Firefox" running.
- From "Tabs" section, click on "Inspect" button for any of the open tabs (ex. reddit.com)
- Click on "Memory/Performnce/Console" panel.
- Close this about:devtools-toolbox tab.
- 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.
[Note]:
- 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.
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
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 https://bugzilla.mozilla.org/show_bug.cgi?id=1529621.
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.
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
•
|
||
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:
client/framework/devtools.js#455
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.
client/framework/devtools.js#554-557
client/framework/toolbox.js#3048
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:
client/framework/toolbox.js#3046
But when we try to get the target after the reload,
client/framework/toolbox-init.js#110
client/framework/target-from-url.js#65
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.
Assignee | ||
Comment 3•5 years ago
|
||
I don't intend to land this, this is just to illustrate the investigation posted in the bug.
Assignee | ||
Comment 4•5 years ago
|
||
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e2fdd460d7b1 Wait for toolbox destroy to finish before reloading toolbox tab;r=daisuke
Comment 6•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Comment 7•5 years ago
|
||
Is this patch worth uplift consideration for Beta or can it ride the trains?
Assignee | ||
Comment 8•5 years ago
|
||
This one can ride the trains, about:devtools-toolbox should be mostly unused until Fx 68 when we ship the new remote debugging.
Reporter | ||
Comment 9•5 years ago
|
||
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.
Updated•5 years ago
|
Description
•