Closed Bug 1723520 Opened 4 years ago Closed 2 years ago

TypeError: can't access property "sendRequestForResult", window.WindowEventDispatcher is undefined in test_ext_brokenlinks.js

Categories

(WebExtensions :: Android, task, P3)

task

Tracking

(firefox117 fixed)

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

Details

(Whiteboard: [addons-jira])

Attachments

(1 file)

toolkit/components/extensions/test/xpcshell/test_ext_brokenlinks.js currently fails on Android with the error below. It happens because there are two concurrent attempts to close the extension tab:

  • extension.unload() at line 50 unloads the extension, which eventually results in an attempt to close the extension tab. This is asynchronous, and judging by the error below the logic is executed after line 51 (at least until bug 1644040 is resolved)
  • Line 51 closes the tab too.

0:49.28 TEST_END: Test FAIL. Subtests passed 4/5. Unexpected 1
FAIL testXPIMissingPageScript - [testXPIMissingPageScript : 285] A promise chain failed to handle a rejection: TypeError: can't access property "sendRequestForResult", window.WindowEventDispatcher is undefined - stack: ExtensionError@resource://gre/modules/ExtensionUtils.jsm:58:5
closeTab@resource://gre/modules/GeckoViewTab.jsm:176:13
@chrome://geckoview/content/ext-android.js:631:24
emit@resource://gre/modules/ExtensionCommon.jsm:330:32
shutdown@resource://gre/modules/ExtensionParent.jsm:616:16
shutdownExtension@resource://gre/modules/ExtensionParent.jsm:787:17
shutdown@resource://gre/modules/Extension.jsm:2869:22
_do_main@/data/local/tmp/test_root/xpc/head.js:240:6
_execute_test@/data/local/tmp/test_root/xpc/head.js:597:5
@-e:1:1
Rejection date: Mon Aug 02 2021 14:40:59 GMT+0200 (Central European Summer Time) - false == true
resource://testing-common/PromiseTestUtils.jsm:assertNoUncaughtRejections:285
/data/local/tmp/test_root/xpc/head.js:_execute_test:598
-e:null:1

Severity: -- → N/A
Priority: -- → P3
Whiteboard: [addons-jira]

... and unskip tests that were broken for this reason. These tests
follow the following pattern:

  1. ExtensionTestUtils.loadContentPage(<moz-extension:-URL here>);
  2. extension.unload();
  3. contentPage.close(); after step 2, triggers error from the bug.
Assignee: nobody → rob
Status: NEW → ASSIGNED
Pushed by rob@robwu.nl: https://hg.mozilla.org/integration/autoland/rev/16562119eba5 Don't close non-browser tabs upon extension unloads r=willdurand,extension-reviewers,geckoview-reviewers,zmckenney
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: