Intermittent remote/shared/messagehandler/test/browser/browser_handle_command_retry.js | test_forced_no_retry_cross_group| A promise chain failed to handle a rejection: BrowsingContext with id "<random>" does no longer exist
Categories
(Remote Protocol :: Agent, defect, P5)
Tracking
(firefox134 fixed)
| Tracking | Status | |
|---|---|---|
| firefox134 | --- | fixed |
People
(Reporter: intermittent-bug-filer, Assigned: jdescottes)
References
Details
(Keywords: intermittent-failure, intermittent-testcase, Whiteboard: [webdriver:m13])
Attachments
(1 file)
Filed by: hskupin [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=479798916&repo=try
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/dqSt94eRQnGYozhrohGTYA/runs/0/artifacts/public/logs/live_backing.log
Comment 1•1 year ago
|
||
The test test_forced_no_retry_cross_group that will be added by bug 1927073 is failing when the following assertion is done:
ok(
!(await hasPromiseResolved(onDiscarded)),
"waitForDiscardedBrowsingContext should not have resolved yet"
);
This happens because of the following line:
promise.finally(() => (resolved = true));
The failure is:
FAIL A promise chain failed to handle a rejection: BrowsingContext with id "18" does no longer exist - stack: RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
MessageHandlerError@chrome://remote/content/shared/messagehandler/Errors.sys.mjs:14:5
DiscardedBrowsingContextError@chrome://remote/content/shared/messagehandler/Errors.sys.mjs:76:5
_sendCommandToBrowsingContext@chrome://remote/content/shared/messagehandler/transports/RootTransport.sys.mjs:138:13
forwardCommand@chrome://remote/content/shared/messagehandler/transports/RootTransport.sys.mjs:74:19
forwardCommand@chrome://remote/content/shared/messagehandler/RootMessageHandler.sys.mjs:162:36
waitForDiscardedBrowsingContext@chrome://mochitests/content/browser/remote/shared/messagehandler/test/browser/resources/modules/root/retry.sys.mjs:37:32
async*handleCommand@chrome://remote/content/shared/messagehandler/MessageHandler.sys.mjs:257:33
test_forced_no_retry_cross_group@chrome://mochitests/content/browser/remote/shared/messagehandler/test/browser/browser_handle_command_retry.js:164:44
async*handleTask@chrome://mochikit/content/browser-test.js:1145:26
It's not exactly clear at this point why this extra promises is leaking. For now we are going to land the patch on bug 1927073 with this particular assertion commented out.
Comment 2•1 year ago
|
||
Given that this might indicate a problem with forwarding commands it might be good to get it investigated and fixed. Shall we take it for M13?
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
| Assignee | ||
Comment 6•1 year ago
|
||
The hasPromisedResolved can leak promise rejections in some cases.
Eg the following test will fail due to an uncaught promise rejection:
add_task(async function test_hasPromiseResolved() {
async function callCommand() {
// The timeout below is just to delay a bit the promise, not realy necessary.
// eslint-disable-next-line mozilla/no-arbitrary-setTimeout
await new Promise(r => setTimeout(r, 500));
await forwardCommand();
}
async function forwardCommand() {
throw new Error("Some message");
}
const onPromiseError = callCommand();
// Calling this test helper will leak a promise rejection.
ok(!(await hasPromiseResolved(onPromiseError)));
await Assert.rejects(
onPromiseError,
e => e.message == "Some message",
"Caught the expected error"
);
});
| Assignee | ||
Comment 7•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Comment 9•1 year ago
|
||
| bugherder | ||
Description
•