Closed Bug 1728815 Opened 3 years ago Closed 3 years ago

Permanent devtools/client/debugger/test/mochitest/browser_dbg-settings-disable-javascript.js | A promise chain failed to handle a rejection: Target already destroyed, unable to fetch children fronts when Gecko 93 merges to Beta on 2021-09-06

Categories

(DevTools :: Framework, defect)

defect

Tracking

(firefox-esr78 unaffected, firefox-esr91 unaffected, firefox91 unaffected, firefox92 unaffected, firefox93+ fixed, firefox94 fixed)

RESOLVED FIXED
94 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox91 --- unaffected
firefox92 --- unaffected
firefox93 + fixed
firefox94 --- fixed

People

(Reporter: aryx, Assigned: ochameau)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

This will affect Beta but not DevEdition.

[task 2021-09-02T14:09:28.121Z] 14:09:28     INFO - TEST-PASS | devtools/client/debugger/test/mochitest/browser_dbg-settings-disable-javascript.js | The main process DevToolsServer has no pending connection when the test ends - 
[task 2021-09-02T14:09:28.122Z] 14:09:28     INFO - Console message: [JavaScript Error: "Error: Target already destroyed, unable to fetch children fronts" {file: "resource://devtools/client/fronts/targets/target-mixin.js" line: 317}]
[task 2021-09-02T14:09:28.122Z] 14:09:28     INFO - Buffered messages finished
[task 2021-09-02T14:09:28.125Z] 14:09:28     INFO - TEST-UNEXPECTED-FAIL | devtools/client/debugger/test/mochitest/browser_dbg-settings-disable-javascript.js | A promise chain failed to handle a rejection: Target already destroyed, unable to fetch children fronts - stack: getFront@resource://devtools/client/fronts/targets/target-mixin.js:317:15
[task 2021-09-02T14:09:28.125Z] 14:09:28     INFO - initPerformance@resource://devtools/client/framework/toolbox.js:3919:48
[task 2021-09-02T14:09:28.125Z] 14:09:28     INFO - _onTargetAvailable@resource://devtools/client/framework/toolbox.js:716:18
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - Async*_emit@resource://devtools/shared/event-emitter.js:244:34
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - emitAsync@resource://devtools/shared/event-emitter.js:194:25
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - emitAsync@resource://devtools/shared/event-emitter.js:346:25
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - _onTargetAvailable@resource://devtools/shared/commands/target/target-command.js:203:33
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - Async*_emit@resource://devtools/shared/event-emitter.js:244:34
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - emit@resource://devtools/shared/event-emitter.js:190:18
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - emit@resource://devtools/shared/event-emitter.js:342:18
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - _onTargetAvailable@resource://devtools/client/fronts/watcher.js:60:10
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - _emit@resource://devtools/shared/event-emitter.js:244:34
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - emit@resource://devtools/shared/event-emitter.js:190:18
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - emit@resource://devtools/shared/event-emitter.js:342:18
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - onPacket@resource://devtools/shared/protocol/Front.js:336:13
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - onPacket@resource://devtools/client/devtools-client.js:482:13
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - send/<@resource://devtools/shared/transport/local-transport.js:68:25
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:103:22
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - DevToolsUtils.executeSoon*exports.executeSoon@resource://devtools/shared/DevToolsUtils.js:54:21
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - send@resource://devtools/shared/transport/local-transport.js:56:21
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - send@resource://devtools/server/devtools-server-connection.js:99:20
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - _sendEvent@resource://devtools/shared/protocol/Actor.js:72:15
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - initialize/<@resource://devtools/shared/protocol/Actor.js:46:16
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - _emit@resource://devtools/shared/event-emitter.js:244:34
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - emit@resource://devtools/shared/event-emitter.js:190:18
[task 2021-09-02T14:09:28.126Z] 14:09:28     INFO - emit@resource://devtools/shared/event-emitter.js:342:18
[task 2021-09-02T14:09:28.127Z] 14:09:28     INFO - notifyTargetAvailable@resource://devtools/server/actors/watcher.js:222:10
[task 2021-09-02T14:09:28.127Z] 14:09:28     INFO - connectFromContent@resource://devtools/server/connectors/js-window-actor/DevToolsFrameParent.jsm:143:13
[task 2021-09-02T14:09:28.127Z] 14:09:28     INFO - receiveMessage@resource://devtools/server/connectors/js-window-actor/DevToolsFrameParent.jsm:209:21
[task 2021-09-02T14:09:28.127Z] 14:09:28     INFO - JSActor query*_createTargetActor@resource://devtools/server/connectors/js-window-actor/DevToolsFrameChild.jsm:320:10
[task 2021-09-02T14:09:28.127Z] 14:09:28     INFO - instantiate@resource://devtools/server/connectors/js-window-actor/DevToolsFrameChild.jsm:222:14
[task 2021-09-02T14:09:28.127Z] 14:09:28     INFO - handleEvent@resource://devtools/server/connectors/js-window-actor/DevToolsFrameChild.jsm:603:12
[task 2021-09-02T14:09:28.127Z] 14:09:28     INFO - Rejection date: Thu Sep 02 2021 14:09:27 GMT+0000 (Greenwich Mean Time) - false == true - JS frame :: resource://testing-common/PromiseTestUtils.jsm :: assertNoUncaughtRejections :: line 285
[task 2021-09-02T14:09:28.127Z] 14:09:28     INFO - Stack trace:
[task 2021-09-02T14:09:28.127Z] 14:09:28     INFO - resource://testing-common/PromiseTestUtils.jsm:assertNoUncaughtRejections:285
[task 2021-09-02T14:09:28.127Z] 14:09:28     INFO - chrome://mochikit/content/browser-test.js:nextTest:625
[task 2021-09-02T14:09:28.127Z] 14:09:28     INFO - chrome://mochikit/content/browser-test.js:testScope/test_finish/<:1555
[task 2021-09-02T14:09:28.127Z] 14:09:28     INFO - chrome://mochikit/content/browser-test.js:run:1470
[task 2021-09-02T14:09:28.127Z] 14:09:28     INFO - GECKO(1339) | MEMORY STAT | vsize 8797MB | residentFast 1073MB | heapAllocated 329MB

Other affected tests (other task):
devtools/client/netmonitor/test/browser_net_error-boundary-01.js
devtools/client/netmonitor/test/browser_net_headers-resize.js

Flags: needinfo?(poirot.alex)

This is also permafailing on browser/components/extensions/test/browser/* tests.

Should we make a new bug to keep track of it?

This exception, while breaking tests, doesn't look too harmful.
It happens only on beta and release because of the following preference:
https://searchfox.org/mozilla-central/rev/fdcee847713a33b5e2b4175bb3c72d4aa2215515/browser/app/profile/firefox.js#2449-2454
The old performance panel triggers some more code on navigations.

This do throw if we navigate quickly or close the toolbox while the document is loading.
We should probably try to silence this exception in order to fix these tests on beta/release.

We can probably reproduce this easily on m-c with --setpref devtools.performance.new-panel-enabled=false.

We probably navigate away while the previous target is still being initialized by the Toolbox code.
This code is only triggered on Beta and Release where the new profiler is still disabled.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5277692140c1 [devtools] Fix browser_dbg-settings-disable-javascript.js when running with the old profiler. r=jdescottes
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch

Please nominate this for Beta approval, Alex.

Comment on attachment 9239655 [details]
Bug 1728815 - [devtools] Fix browser_dbg-settings-disable-javascript.js when running with the old profiler.

Beta/Release Uplift Approval Request

  • User impact if declined: Probably only avoid exceptions which don't translate into anything broken.
    The request is mostly to fix tests which fail on beta and release because of different preferences.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Bail out early to prevent throwing in case of unexpected error. Error which isn't an already destroyed target. A destroyed target doesn't necessarily means there is something broken. But we should not keep using a destroyed target.
  • String changes made/needed:
Flags: needinfo?(poirot.alex)
Attachment #9239655 - Flags: approval-mozilla-beta?

Comment on attachment 9239655 [details]
Bug 1728815 - [devtools] Fix browser_dbg-settings-disable-javascript.js when running with the old profiler.

Approved for 93 beta 3, thanks.

Attachment #9239655 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
See Also: → 1731352
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: