Closed Bug 1624722 Opened 5 years ago Closed 5 years ago

about:debugging failures when run from mach or when devtools.aboutdebugging.local-tab-debugging=true

Categories

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

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: mixedpuppy, Unassigned)

References

Details

Using mach run to create a new profile and start a current build:

  1. start with new profile
  2. open about:debugging
  3. load temp addon, see it is there
  4. open about:preferences, select restore session, leave it open
  5. switch back to about:debugging
  6. restart firefox
  7. tabs section should show two tabs (I see only one)
  8. load temp addon
  9. should see addon (I dont)

If you reload the tab at that point, you'll see the addon. reload will not work properly, and remove suffers the same refresh problem.

Also of note, if you do not use mach run but a direct path to a binary, a) the tabs section doesn't appear, and b) the problem does not exist.

IOW: "/Applications/Firefox Nightly.app/Contents/MacOS/firefox" --no-remote -profile prof/ works fine (but I wonder about the missing tabs section)

I initially noticed this maybe 3-6 weeks ago.

some clarity just in case:

Using mach run to create a new profile and start a current build:

mach run -P to create a new profile
mach run -P profilename to start

This issue is not specific to temporary extensions. The about:debugging page itself appears to be broken upon session restore.

Reduced STR:

  1. ./mach run --profile /tmp/myprof
  2. Open about:preferences and enable session restore.
  3. Open about:debugging.
  4. Quit Firefox (while about:debugging was focused) and start it again with the same command as step 1.
  5. Firefox should now open at least two tabs: about:preferences (still discarded) and about:debugging (focused).
  6. Click on the about:preferences tab to restore the discarded/lazy tab. Alternatively, open example.com in a new tab.
  7. Go back to the about:debugging tab, and look at the number of displayed tabs.

Expected:

  • All tabs from step 6/7 should be shown.

Actual:

  • Only one tab is shown (about:debugging). The about:debugging page has other bugs, such as the inability to properly load a temporary add-on as reported by Shane.
  • The global JS console has several errors:
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIInterfaceRequestor.getInterface] 3 network-response-listener.js:84

(the following error message only appeared when the default browser prompt appeared after the first restart)

Error while calling actor 'tabDescriptor's method 'getTarget' Tab destroyed while performing a TabDescriptorActor update Actor.js:91:13
    writeError resource://devtools/shared/protocol/Actor.js:91
    handler resource://devtools/shared/protocol/Actor.js:187
    openModalWindow resource://gre/modules/Prompter.jsm:466
    openPrompt resource://gre/modules/Prompter.jsm:701
    confirmEx resource://gre/modules/Prompter.jsm:858
    confirmEx resource://gre/modules/Prompter.jsm:90
    prompt resource:///modules/BrowserGlue.jsm:4394
    _maybeShowDefaultBrowserPrompt resource:///modules/BrowserGlue.jsm:3443
    task resource:///modules/BrowserGlue.jsm:2168
    _scheduleStartupIdleTasks resource:///modules/BrowserGlue.jsm:2304
    (Async: ChromeUtils::IdleDispatch handler)
    _scheduleStartupIdleTasks resource:///modules/BrowserGlue.jsm:2299
    BG__onWindowsRestored resource:///modules/BrowserGlue.jsm:2021
    BG_observe resource:///modules/BrowserGlue.jsm:865
    ssi_sendRestoreCompletedNotifications resource:///modules/sessionstore/SessionStore.jsm:5862
    ssi_restoreWindow resource:///modules/sessionstore/SessionStore.jsm:4626
    _restoreWindowsFeaturesAndTabs resource:///modules/sessionstore/SessionStore.jsm:4698
    _restoreWindowsInReversedZOrder resource:///modules/sessionstore/SessionStore.jsm:4722
    ssi_restoreWindows resource:///modules/sessionstore/SessionStore.jsm:4782

(after the second restart, without the default browser prompt), the error is:

Error while calling actor 'tabDescriptor's method 'getTarget' Tab destroyed while performing a TabDescriptorActor update Actor.js:91:13
    writeError resource://devtools/shared/protocol/Actor.js:91
    handler resource://devtools/shared/protocol/Actor.js:187
    (Async: promise callback)
    handler resource://devtools/shared/protocol/Actor.js:187
    _queueResponse resource://devtools/shared/protocol/Actor.js:107
    handler resource://devtools/shared/protocol/Actor.js:183
    onPacket resource://devtools/server/devtools-server-connection.js:380
    send resource://devtools/shared/transport/local-transport.js:68
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:111
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:111

(in any case, the console has more errors, such as)

Failed to get the target for tab descriptor Error: "Protocol error (tabDestroyed): Tab destroyed while performing a TabDescriptorActor update from: server0.conn0.tabDescriptor7"
    onPacket resource://devtools/shared/protocol/Front.js:319
    DevTools RDP*request resource://devtools/shared/protocol/Front.js:256
    name resource://devtools/shared/protocol/Front/FrontClassWithSpec.js:47
    getTarget resource://devtools/client/fronts/descriptors/tab.js:53
    _createTargetFrontForTabForm resource://devtools/client/fronts/root.js:338
    listTabs resource://devtools/client/fronts/root.js:245
    listTabs resource://devtools/client/aboutdebugging/src/modules/client-wrapper.js:131
    requestTabs resource://devtools/client/aboutdebugging/src/actions/debug-targets.js:209
    Redux ....

Thanks for the detailed bug report!

The errors flooding the console mentioned here should be fixed after https://bugzilla.mozilla.org/show_bug.cgi?id=1618691.

I wonder about the missing tabs section

Tab debugging on "This Firefox/This Nightly" is preffed off by default, except on local builds.
The preference driving this is devtools.aboutdebugging.local-tab-debugging

b) the problem does not exist

Do you mean that the issue you described with temporary addons no longer occurs?
I will try the STRs with my current stack for Bug 1618691 to see if there is any improvement.

(In reply to Julian Descottes [:jdescottes] from comment #4)

I wonder about the missing tabs section

Tab debugging on "This Firefox/This Nightly" is preffed off by default, except on local builds.
The preference driving this is devtools.aboutdebugging.local-tab-debugging

When I replace the ./mach run step from comment 3's STR with directly running from the binary, and additionally setting devtools.aboutdebugging.local-tab-debugging=true in about:config, then the bug can still be reproduced. Seems like this pref breaks about:debugging

b) the problem does not exist

Do you mean that the issue you described with temporary addons no longer occurs?

Yes, but that is apparently because devtools.aboutdebugging.local-tab-debugging is set wen run with ./mach run, and not when run directly from the binary.

(I'm not the reporter, but I tried to reproduce together with Shane before he filed the bug. )

Summary: about:debugging failures when run from mach → about:debugging failures when run from mach or when devtools.aboutdebugging.local-tab-debugging=true

It's surprising that local tab debugging impacts temporary addon, but I tested with

Will block on this two bugs and revisit when they are resolved

Depends on: 1619720, 1618691
Priority: -- → P3

:mixedpuppy Hi, I no longer have the issue after Bug 1618691 landed. Can you check if this is resolved for you as well on latest central?

Flags: needinfo?(mixedpuppy)

Thanks! This seems to be working fine now.

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(mixedpuppy)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.