Perma TEST-UNEXPECTED-FAIL | devtools/client/webconsole/test/browser/browser_webconsole_custom_formatters_errors.js | Uncaught exception in test bound - at chrome://mochitests/content/browser/<...> when Gecko 124 merges to Beta on 2024-02-19
Categories
(DevTools :: Console, defect)
Tracking
(firefox-esr115 unaffected, firefox122 unaffected, firefox123 unaffected, firefox124+ verified)
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox122 | --- | unaffected |
| firefox123 | --- | unaffected |
| firefox124 | + | verified |
People
(Reporter: ctuns, Assigned: nchevobbe)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
Central-as-beta simulation:
How to run these simulations:
Failure log
[task 2024-02-07T12:08:21.139Z] 12:08:21 INFO - TEST-PASS | devtools/client/webconsole/test/browser/browser_webconsole_custom_formatters_errors.js | Got expected message: Custom formatter failed: devtoolsFormatters[14] couldn't be run: tagName should be a string, got number -
[task 2024-02-07T12:08:21.140Z] 12:08:21 INFO - Test for denied access to windowUtils from hook
[task 2024-02-07T12:08:21.141Z] 12:08:21 INFO - Buffered messages finished
[task 2024-02-07T12:08:21.143Z] 12:08:21 INFO - TEST-UNEXPECTED-FAIL | devtools/client/webconsole/test/browser/browser_webconsole_custom_formatters_errors.js | Uncaught exception in test bound - at chrome://mochitests/content/browser/devtools/client/shared/test/shared-head.js:1055 - Error: Failed waitFor():
[task 2024-02-07T12:08:21.143Z] 12:08:21 INFO - Failed condition: () => {
[task 2024-02-07T12:08:21.143Z] 12:08:21 INFO - return findErrorMessage(hud, messageText);
[task 2024-02-07T12:08:21.144Z] 12:08:21 INFO - }
[task 2024-02-07T12:08:21.144Z] 12:08:21 INFO - Exception Message: - timed out after 500 tries.
[task 2024-02-07T12:08:21.144Z] 12:08:21 INFO - Stack trace:
[task 2024-02-07T12:08:21.144Z] 12:08:21 INFO - waitFor@chrome://mochitests/content/browser/devtools/client/shared/test/shared-head.js:1055:11
[task 2024-02-07T12:08:21.144Z] 12:08:21 INFO - async*testCustomFormatting@chrome://mochitests/content/browser/devtools/client/webconsole/test/browser/browser_webconsole_custom_formatters_errors.js:166:13
[task 2024-02-07T12:08:21.144Z] 12:08:21 INFO - testNoPrivilegedAccess@chrome://mochitests/content/browser/devtools/client/webconsole/test/browser/browser_webconsole_custom_formatters_errors.js:156:9
[task 2024-02-07T12:08:21.144Z] 12:08:21 INFO - @chrome://mochitests/content/browser/devtools/client/webconsole/test/browser/browser_webconsole_custom_formatters_errors.js:35:9
[task 2024-02-07T12:08:21.145Z] 12:08:21 INFO - async*handleTask@chrome://mochikit/content/browser-test.js:1139:26
[task 2024-02-07T12:08:21.145Z] 12:08:21 INFO - _runTaskBasedTest@chrome://mochikit/content/browser-test.js:1211:18
[task 2024-02-07T12:08:21.145Z] 12:08:21 INFO - Tester_execTest@chrome://mochikit/content/browser-test.js:1353:14
[task 2024-02-07T12:08:21.145Z] 12:08:21 INFO - nextTest/<@chrome://mochikit/content/browser-test.js:1128:14
[task 2024-02-07T12:08:21.145Z] 12:08:21 INFO - SimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13
[task 2024-02-07T12:08:21.146Z] 12:08:21 INFO - Leaving test bound
[task 2024-02-07T12:08:21.146Z] 12:08:21 INFO - GECKO(3698) | [Parent 3698, Main Thread] WARNING: NS_ENSURE_TRUE(mPresShell) failed: file /builds/worker/checkouts/gecko/layout/generic/nsFrameSelection.cpp:1618
[task 2024-02-07T12:08:21.382Z] 12:08:21 INFO - GECKO(3698) | [Child 3825: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 1 (7fde8a832020) [pid = 3825] [serial = 78] [outer = 0] [url = about:blank]
[task 2024-02-07T12:08:21.768Z] 12:08:21 INFO - GECKO(3698) | [Child 7950: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 3 (7f66c3045800) [pid = 7950] [serial = 2] [outer = 0] [url = about:blank]
[task 2024-02-07T12:08:21.770Z] 12:08:21 INFO - GECKO(3698) | [Child 7950: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 2 (7f66c3048000) [pid = 7950] [serial = 3] [outer = 0] [url = https://example.com/browser/devtools/client/webconsole/test/browser/test-console-custom-formatters-errors.html]
[task 2024-02-07T12:08:22.472Z] 12:08:22 INFO - Removing tab.
[task 2024-02-07T12:08:22.477Z] 12:08:22 INFO - Waiting for event: 'TabClose' on [object XULElement].
[task 2024-02-07T12:08:22.562Z] 12:08:22 INFO - Got event: 'TabClose' on [object XULElement].
[task 2024-02-07T12:08:22.575Z] 12:08:22 INFO - GECKO(3698) | console.warn: "IGNORED REDUX ACTION:" "AUTOCOMPLETE_CLEAR"
[task 2024-02-07T12:08:22.594Z] 12:08:22 INFO - GECKO(3698) | [Parent 3698, Main Thread] WARNING: '!inner', file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorProtocol.cpp:163
[task 2024-02-07T12:08:22.595Z] 12:08:22 INFO - GECKO(3698) | [Parent 3698, Main Thread] WARNING: '!inner', file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorProtocol.cpp:163
[task 2024-02-07T12:08:22.608Z] 12:08:22 INFO - Tab removed and finished closing
[task 2024-02-07T12:08:22.635Z] 12:08:22 INFO - GECKO(3698) | JavaScript error: , line 0: NotFoundError: No such JSWindowActor 'DevToolsFrame'
[task 2024-02-07T12:08:22.638Z] 12:08:22 INFO - GECKO(3698) | [Parent 3698: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 22 (7fcd206eb6a0) [pid = 3698] [serial = 315] [outer = 0] [url = chrome://devtools/content/webconsole/index.html]
[task 2024-02-07T12:08:22.639Z] 12:08:22 INFO - GECKO(3698) | [Parent 3698: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 21 (7fcd206ea980) [pid = 3698] [serial = 312] [outer = 0] [url = about:devtools-toolbox]
[task 2024-02-07T12:08:22.755Z] 12:08:22 INFO - Console message: [JavaScript Error: "NotFoundError: No such JSWindowActor 'DevToolsFrame'"]
[task 2024-02-07T12:08:22.768Z] 12:08:22 INFO - TEST-PASS | devtools/client/webconsole/test/browser/browser_webconsole_custom_formatters_errors.js | The main process DevToolsServer has no pending connection when the test ends -
Hi, can you please take a look at this? I don't see anything related to the failure to set as regression, maybe this? https://hg.mozilla.org/mozilla-central/rev/ca4e4171d069441a93069267ee1dabfdf88393eb
Updated•1 year ago
|
Comment 1•1 year ago
|
||
Nicolas, could you please have a look over this one?
| Assignee | ||
Comment 2•1 year ago
|
||
Hi, can you please take a look at this? I don't see anything related to the failure to set as regression, maybe this? https://hg.mozilla.org/mozilla-central/rev/ca4e4171d069441a93069267ee1dabfdf88393eb
This looks extremely unlikely as this is a completely different part of the devtools codebase.
The assertion that fails is https://searchfox.org/mozilla-central/rev/57516f1ab5660f9abf459300bc625279eb323213/devtools/client/webconsole/test/browser/browser_webconsole_custom_formatters_errors.js#156-158 , as we're expecting an error message from this call https://searchfox.org/mozilla-central/rev/57516f1ab5660f9abf459300bc625279eb323213/devtools/client/webconsole/test/browser/test-console-custom-formatters-errors.html#160
It does look like the error message is produced (https://treeherder.mozilla.org/logviewer?job_id=446315217&repo=try&lineNumber=7412), but maybe it doesn't end up in the console?
Comment 3•1 year ago
|
||
The screenshot of the failure shows it has been logged but the events are not in the expected order in the console - the test itself awaits the subtests.
Developer Edition is not affected which points to bug 1877193 (part 8) as regressing change.
| Assignee | ||
Comment 4•1 year ago
|
||
Ah thanks, that should be easy to fix then, I'll have a patch soon
Comment 5•1 year ago
|
||
:jandem, since you are the author of the regressor, bug 1877193, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 6•1 year ago
•
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #4)
Ah thanks, that should be easy to fix then, I'll have a patch soon
Yeah, actually I think I need Jan's help :)
We're setting the pref in the test, before adding a tab for the page we want to test: https://searchfox.org/mozilla-central/rev/57516f1ab5660f9abf459300bc625279eb323213/devtools/client/webconsole/test/browser/browser_webconsole_custom_formatters_errors.js#15
await pushPref("javascript.options.property_error_message_fix", true);
but it doesn't seem to have any impact? e.g. if I set it to false, the test still runs fine because I get the "better" error message.
So by default, on Nightly, on data:text/html,<meta charset=utf8><script>window.windowUtils.garbageCollect()</script>, I'm getting
Uncaught TypeError: can't access property "garbageCollect", window.windowUtils is undefined
if I go to about:config and set javascript.options.property_error_message_fix to false, I still get the same message after reloading the page / restarting devtools.
Only after restarting Firefox we get the "simpler" message
Uncaught TypeError: window.windowUtils is undefined
Is this expected Jan?
If so, I'm fine updating the test, maybe only looking for window.windowUtils is undefined both simple and enhanced message have
Comment 7•1 year ago
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #6)
We're setting the pref in the test, before adding a tab for the page we want to test: https://searchfox.org/mozilla-central/rev/57516f1ab5660f9abf459300bc625279eb323213/devtools/client/webconsole/test/browser/browser_webconsole_custom_formatters_errors.js#15
await pushPref("javascript.options.property_error_message_fix", true);but it doesn't seem to have any impact? e.g. if I set it to false, the test still runs fine because I get the "better" error message.
Ah this means we need to change this pref in StaticPrefList.yaml from set_spidermonkey_pref: startup to set_spidermonkey_pref: always. I missed that we're changing this pref at runtime. We'd also have to change this line from setAtStartup to set.
I can post a patch for this tomorrow.
Comment 8•1 year ago
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #6)
If so, I'm fine updating the test, maybe only looking for
window.windowUtils is undefinedboth simple and enhanced message have
Or maybe this is the better fix? It's nicer to have the test work with both messages because we'll probably remove this pref at some point.
| Assignee | ||
Comment 9•1 year ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #8)
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #6)
If so, I'm fine updating the test, maybe only looking for
window.windowUtils is undefinedboth simple and enhanced message haveOr maybe this is the better fix? It's nicer to have the test work with both messages because we'll probably remove this pref at some point.
Sure, I don't feel like we need to change how SM handles this just for tests. I'll post a patch
| Assignee | ||
Comment 10•1 year ago
|
||
Updated•1 year ago
|
Comment 11•1 year ago
|
||
Comment 13•1 year ago
|
||
| bugherder | ||
Comment 14•1 year ago
|
||
Fix verified in today's central as early beta simulation.
Description
•