Closed Bug 1860375 Opened 1 year ago Closed 1 year ago

Perma [TCw] | TypeError: can't access property Symbol.iterator, this.getTabsForWindow(...) is undefined

Categories

(Remote Protocol :: Agent, defect, P5)

defect
Points:
1

Tracking

(firefox-esr115 unaffected, firefox118 unaffected, firefox119 unaffected, firefox120 wontfix, firefox121 fixed)

RESOLVED FIXED
121 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox118 --- unaffected
firefox119 --- unaffected
firefox120 --- wontfix
firefox121 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: Sasha)

References

(Regression)

Details

(Keywords: intermittent-failure, regression, Whiteboard: [webdriver:m9])

Attachments

(1 file)

Filed by: nbeleuzu [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=433313849&repo=mozilla-central
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/QDm8_dUyRz2kqrO4aANKFQ/runs/0/artifacts/public/logs/live_backing.log


[task 2023-10-21T10:13:04.444Z] 10:13:04     INFO - PID 1953 | console.error: "Marionette threw an error: TypeError: can't access property Symbol.iterator, this.getTabsForWindow(...) is undefined\nget allBrowserUniqueIds@chrome://remote/content/shared/TabManager.sys.mjs:59:30\nGeckoDriver.prototype.getWindowHandles@chrome://remote/content/marionette/driver.sys.mjs:1075:3\ndespatch@chrome://remote/content/marionette/server.sys.mjs:318:40\nexecute@chrome://remote/content/marionette/server.sys.mjs:289:16\nonPacket/<@chrome://remote/content/marionette/server.sys.mjs:262:20\nonPacket@chrome://remote/content/marionette/server.sys.mjs:263:9\n_onJSONObjectReady/<@chrome://remote/content/marionette/transport.sys.mjs:494:20\n"
[task 2023-10-21T10:13:04.448Z] 10:13:04  WARNING - Exception in TextExecutor.run:
[task 2023-10-21T10:13:04.448Z] 10:13:04  WARNING - Traceback (most recent call last):
[task 2023-10-21T10:13:04.448Z] 10:13:04  WARNING -   File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptrunner/wptrunner/executors/base.py", line 304, in run_test
[task 2023-10-21T10:13:04.448Z] 10:13:04  WARNING -     result = self.do_test(test)
[task 2023-10-21T10:13:04.448Z] 10:13:04  WARNING -   File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py", line 1088, in do_test
[task 2023-10-21T10:13:04.448Z] 10:13:04  WARNING -     self.protocol.coverage.dump()
[task 2023-10-21T10:13:04.448Z] 10:13:04  WARNING -   File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py", line 566, in dump
[task 2023-10-21T10:13:04.449Z] 10:13:04  WARNING -     if len(self.marionette.window_handles):
[task 2023-10-21T10:13:04.449Z] 10:13:04  WARNING -   File "/builds/worker/workspace/build/venv/lib/python3.7/site-packages/marionette_driver/marionette.py", line 1461, in window_handles
[task 2023-10-21T10:13:04.449Z] 10:13:04  WARNING -     return self._send_message("WebDriver:GetWindowHandles")
[task 2023-10-21T10:13:04.449Z] 10:13:04  WARNING -   File "/builds/worker/workspace/build/venv/lib/python3.7/site-packages/marionette_driver/decorators.py", line 24, in _
[task 2023-10-21T10:13:04.449Z] 10:13:04  WARNING -     return func(*args, **kwargs)
[task 2023-10-21T10:13:04.449Z] 10:13:04  WARNING -   File "/builds/worker/workspace/build/venv/lib/python3.7/site-packages/marionette_driver/marionette.py", line 722, in _send_message
[task 2023-10-21T10:13:04.449Z] 10:13:04  WARNING -     self._handle_error(err)
[task 2023-10-21T10:13:04.449Z] 10:13:04  WARNING -   File "/builds/worker/workspace/build/venv/lib/python3.7/site-packages/marionette_driver/marionette.py", line 734, in _handle_error
[task 2023-10-21T10:13:04.449Z] 10:13:04  WARNING -     raise errors.lookup(error)(message, stacktrace=stacktrace)
[task 2023-10-21T10:13:04.449Z] 10:13:04  WARNING - marionette_driver.errors.UnknownException: TypeError: can't access property Symbol.iterator, this.getTabsForWindow(...) is undefined
[task 2023-10-21T10:13:04.450Z] 10:13:04  WARNING - stacktrace:
[task 2023-10-21T10:13:04.450Z] 10:13:04  WARNING - 	get allBrowserUniqueIds@chrome://remote/content/shared/TabManager.sys.mjs:59:30
[task 2023-10-21T10:13:04.450Z] 10:13:04  WARNING - 	GeckoDriver.prototype.getWindowHandles@chrome://remote/content/marionette/driver.sys.mjs:1075:3
[task 2023-10-21T10:13:04.450Z] 10:13:04  WARNING - 	despatch@chrome://remote/content/marionette/server.sys.mjs:318:40
[task 2023-10-21T10:13:04.450Z] 10:13:04  WARNING - 	execute@chrome://remote/content/marionette/server.sys.mjs:289:16
[task 2023-10-21T10:13:04.450Z] 10:13:04  WARNING - 	onPacket/<@chrome://remote/content/marionette/server.sys.mjs:262:20
[task 2023-10-21T10:13:04.450Z] 10:13:04  WARNING - 	onPacket@chrome://remote/content/marionette/server.sys.mjs:263:9
[task 2023-10-21T10:13:04.450Z] 10:13:04  WARNING - 	_onJSONObjectReady/<@chrome://remote/content/marionette/transport.sys.mjs:494:20
[task 2023-10-21T10:13:04.450Z] 10:13:04  WARNING - 
[task 2023-10-21T10:13:04.450Z] 10:13:04  WARNING - 
[task 2023-10-21T10:13:04.452Z] 10:13:04     INFO - TEST-UNEXPECTED-ERROR | /css/css-fonts/size-adjust.tentative.html | TypeError: can't access property Symbol.iterator, this.getTabsForWindow(...) is undefined
[task 2023-10-21T10:13:04.452Z] 10:13:04     INFO - Traceback (most recent call last):
[task 2023-10-21T10:13:04.452Z] 10:13:04     INFO -   File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptrunner/wptrunner/executors/base.py", line 304, in run_test
[task 2023-10-21T10:13:04.452Z] 10:13:04     INFO -     result = self.do_test(test)
[task 2023-10-21T10:13:04.452Z] 10:13:04     INFO -   File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py", line 1088, in do_test
[task 2023-10-21T10:13:04.452Z] 10:13:04     INFO -     self.protocol.coverage.dump()
[task 2023-10-21T10:13:04.452Z] 10:13:04     INFO -   File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptrunner/wptrunner/executors/executormarionette.py", line 566, in dump
[task 2023-10-21T10:13:04.452Z] 10:13:04     INFO -     if len(self.marionette.window_handles):
[task 2023-10-21T10:13:04.452Z] 10:13:04     INFO -   File "/builds/worker/workspace/build/venv/lib/python3.7/site-packages/marionette_driver/marionette.py", line 1461, in window_handles
[task 2023-10-21T10:13:04.452Z] 10:13:04     INFO -     return self._send_message("WebDriver:GetWindowHandles")
[task 2023-10-21T10:13:04.452Z] 10:13:04     INFO -   File "/builds/worker/workspace/build/venv/lib/python3.7/site-packages/marionette_driver/decorators.py", line 24, in _
[task 2023-10-21T10:13:04.452Z] 10:13:04     INFO -     return func(*args, **kwargs)
[task 2023-10-21T10:13:04.453Z] 10:13:04     INFO -   File "/builds/worker/workspace/build/venv/lib/python3.7/site-packages/marionette_driver/marionette.py", line 722, in _send_message
[task 2023-10-21T10:13:04.453Z] 10:13:04     INFO -     self._handle_error(err)
[task 2023-10-21T10:13:04.453Z] 10:13:04     INFO -   File "/builds/worker/workspace/build/venv/lib/python3.7/site-packages/marionette_driver/marionette.py", line 734, in _handle_error
[task 2023-10-21T10:13:04.453Z] 10:13:04     INFO -     raise errors.lookup(error)(message, stacktrace=stacktrace)
[task 2023-10-21T10:13:04.453Z] 10:13:04     INFO - marionette_driver.errors.UnknownException: TypeError: can't access property Symbol.iterator, this.getTabsForWindow(...) is undefined
[task 2023-10-21T10:13:04.453Z] 10:13:04     INFO - stacktrace:
[task 2023-10-21T10:13:04.453Z] 10:13:04     INFO - 	get allBrowserUniqueIds@chrome://remote/content/shared/TabManager.sys.mjs:59:30
[task 2023-10-21T10:13:04.453Z] 10:13:04     INFO - 	GeckoDriver.prototype.getWindowHandles@chrome://remote/content/marionette/driver.sys.mjs:1075:3
[task 2023-10-21T10:13:04.453Z] 10:13:04     INFO - 	despatch@chrome://remote/content/marionette/server.sys.mjs:318:40
[task 2023-10-21T10:13:04.453Z] 10:13:04     INFO - 	execute@chrome://remote/content/marionette/server.sys.mjs:289:16
[task 2023-10-21T10:13:04.453Z] 10:13:04     INFO - 	onPacket/<@chrome://remote/content/marionette/server.sys.mjs:262:20
[task 2023-10-21T10:13:04.453Z] 10:13:04     INFO - 	onPacket@chrome://remote/content/marionette/server.sys.mjs:263:9
[task 2023-10-21T10:13:04.453Z] 10:13:04     INFO - 	_onJSONObjectReady/<@chrome://remote/content/marionette/transport.sys.mjs:494:20
[task 2023-10-21T10:13:04.453Z] 10:13:04     INFO - 
[task 2023-10-21T10:13:04.453Z] 10:13:04     INFO - TEST-INFO took 3512ms
Keywords: regression
Regressed by: 1837533

Set release status flags based on info from the regressing bug 1837533

:dholbert, since you are the author of the regressor, bug 1837533, could you take a look?

For more information, please visit BugBot documentation.

Looks like a marionette / harness issue, unlikely to have really been a regression from the supposedly-regressing commit.

Whimboo, could you take a look or pass along to the right person?

Component: Layout: Text and Fonts → Marionette Client and Harness
Flags: needinfo?(dholbert) → needinfo?(hskupin)
Product: Core → Testing

[at my computer now, better-able to track down the right person to poke here]

The specific line that's throwing here is TabManager.sys.mjs:59 which is here:
https://searchfox.org/mozilla-central/rev/3389de86c4daf28fe402fcfe7d99e8646d41f302/remote/shared/TabManager.sys.mjs#59

for (const tab of this.getTabsForWindow(win)) {

And it's throwing because this.getTabsForWindow is apparently undefined.

This looks to have something to do with the recent-ish changes from bug 1849316 which changed us to use this getTabsForWindow function, and which removed some truthiness-checks from the previously-used API there. Likely this is just a straight-up regression from that change; I'm not sure why it hasn't come up sooner, except that maybe these test-coverage-wpt tasks don't run all that often (if this is specific to that run, as it seems to be based on the orangefactor data so far).

Sasha, it looks like you might be a good person to take a look here -- could you look into this? (Maybe we need to add back some truthiness checks here rather than just directly calling this.getTabsForWindow?)

Component: Marionette Client and Harness → Agent
Flags: needinfo?(hskupin) → needinfo?(aborovova)
Product: Testing → Remote Protocol
Regressed by: 1849316

Confirmed this isn't a regression from bug 1837533 --> removing regression status from that bug.

I can reproduce this failure on Try with an older commit, based off of bug 1849316's patch, where I made a non-functional change to a reftest-style WPT and triggered this task with mach try fuzzy and included opt-test-coverage-wpt:
https://treeherder.mozilla.org/jobs?repo=try&revision=647f86d9727e0a100262158b0bc1dc890803cf64

So, presumably regression from bug 1849316.

No longer regressed by: 1837533
Assignee: nobody → aborovova
Status: NEW → ASSIGNED

Hey Daniel, thanks for investigation!
I think you're right that it's the regression from TabManager refactoring.
I've created a revision with the fix. Hopefully it'll fix the issue.

Flags: needinfo?(aborovova)

You should be able to test your fix by spawning a Try run like the one that I linked in comment 4.

Make some no-op change (e.g. just add an HTML comment) to some WPT reftest-style test like I did in https://hg.mozilla.org/try/raw-rev/284486a99ad09867fec495ec21de9acc4b6954ce (you can just directly import that commit if you like), and then I think you can run:

./mach try fuzzy --disable-target-task-filter  -q "'linux 'test-coverage-wpt"

...and that should get you a TCw task like the one in my try run here.

Set release status flags based on info from the regressing bug 1849316

Duplicate of this bug: 1856259
Pushed by aborovova@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/23faf94661e5 Add check for if tabs are not undefined to `getTabsForWindow` method. r=webdriver-reviewers,whimboo
Points: --- → 1
Whiteboard: [webdriver:m9]
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch

The patch landed in nightly and beta is affected.
:Sasha, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox120 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(aborovova)
Flags: needinfo?(aborovova)
Duplicate of this bug: 1860713

Are all these bugs duplicates of this one?

Duplicate of this bug: 1858093
Duplicate of this bug: 1860687
Duplicate of this bug: 1860212
Duplicate of this bug: 1859956
Duplicate of this bug: 1858796
Duplicate of this bug: 1857448
Duplicate of this bug: 1857009
Duplicate of this bug: 1856687
Duplicate of this bug: 1856584
Duplicate of this bug: 1856193
Duplicate of this bug: 1855849
Summary: Perma [TCw] /css/css-fonts/size-adjust.tentative.html | TypeError: can't access property Symbol.iterator, this.getTabsForWindow(...) is undefined → Perma [TCw] | TypeError: can't access property Symbol.iterator, this.getTabsForWindow(...) is undefined
Whiteboard: [webdriver:m9] → [webdriver:m9][webdriver:relnote]
Whiteboard: [webdriver:m9][webdriver:relnote] → [webdriver:m9]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: