Closed Bug 1538782 Opened 5 years ago Closed 5 years ago

TypeError: this.tabModal is null during AWSY testing

Categories

(Remote Protocol :: Marionette, defect)

Version 3
defect
Not set
normal

Tracking

(firefox68 fixed)

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: erahm, Assigned: erahm)

References

Details

Attachments

(1 file)

While adding a tp6 version of the AWSY test in bug 1532491 I consistently run into an unhandled TypeError: this.tabModal is null exception. This appears to come from the first line of GeckoDriver.prototype._handleUserPrompts. It appears that the modal.Dialog.ui getter is accessing a null tabModal property:

[task 2019-03-23T00:37:25.496Z] 00:37:25     INFO - loading https://www.ebay.com/
[task 2019-03-23T00:37:25.496Z] 00:37:25     INFO - 
[task 2019-03-23T00:37:27.381Z] 00:37:27     INFO - loaded!
[task 2019-03-23T00:37:37.497Z] 00:37:37  WARNING - Failed to gather test failure debug: TypeError: this.tabModal is null
[task 2019-03-23T00:37:37.499Z] 00:37:37  WARNING - stacktrace:
[task 2019-03-23T00:37:37.500Z] 00:37:37  WARNING - 	get ui@chrome://marionette/content/modal.js:159:5
[task 2019-03-23T00:37:37.502Z] 00:37:37  WARNING - 	GeckoDriver.prototype._handleUserPrompts@chrome://marionette/content/driver.js:3256:23
[task 2019-03-23T00:37:37.502Z] 00:37:37  WARNING - 	GeckoDriver.prototype.getPageSource@chrome://marionette/content/driver.js:1159:14
[task 2019-03-23T00:37:37.502Z] 00:37:37  WARNING - 	despatch@chrome://marionette/content/server.js:289:40
[task 2019-03-23T00:37:37.503Z] 00:37:37  WARNING - 	execute@chrome://marionette/content/server.js:262:16
[task 2019-03-23T00:37:37.503Z] 00:37:37  WARNING - 	onPacket/<@chrome://marionette/content/server.js:235:20
[task 2019-03-23T00:37:37.503Z] 00:37:37  WARNING - 	onPacket@chrome://marionette/content/server.js:236:9
[task 2019-03-23T00:37:37.504Z] 00:37:37  WARNING - 	_onJSONObjectReady/<@chrome://marionette/content/transport.js:492:20
[task 2019-03-23T00:37:37.504Z] 00:37:37  WARNING - 
[task 2019-03-23T00:37:37.519Z] 00:37:37     INFO - TEST-UNEXPECTED-ERROR | awsy/test_memory_usage.py TestMemoryUsage.test_open_tabs | UnknownException: TypeError: this.tabModal is null
[task 2019-03-23T00:37:37.519Z] 00:37:37     INFO - stacktrace:
[task 2019-03-23T00:37:37.519Z] 00:37:37     INFO - 	get ui@chrome://marionette/content/modal.js:159:5
[task 2019-03-23T00:37:37.519Z] 00:37:37     INFO - 	GeckoDriver.prototype._handleUserPrompts@chrome://marionette/content/driver.js:3256:23
[task 2019-03-23T00:37:37.519Z] 00:37:37     INFO - 	GeckoDriver.prototype.findElement@chrome://marionette/content/driver.js:1989:14
[task 2019-03-23T00:37:37.520Z] 00:37:37     INFO - 	despatch@chrome://marionette/content/server.js:289:40
[task 2019-03-23T00:37:37.520Z] 00:37:37     INFO - 	execute@chrome://marionette/content/server.js:262:16
[task 2019-03-23T00:37:37.520Z] 00:37:37     INFO - 	onPacket/<@chrome://marionette/content/server.js:235:20
[task 2019-03-23T00:37:37.520Z] 00:37:37     INFO - 	onPacket@chrome://marionette/content/server.js:236:9
[task 2019-03-23T00:37:37.521Z] 00:37:37     INFO - 	_onJSONObjectReady/<@chrome://marionette/content/transport.js:492:20
[task 2019-03-23T00:37:37.521Z] 00:37:37     INFO - Traceback (most recent call last):
[task 2019-03-23T00:37:37.521Z] 00:37:37     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_harness/marionette_test/testcases.py", line 159, in run
[task 2019-03-23T00:37:37.521Z] 00:37:37     INFO -     testMethod()
[task 2019-03-23T00:37:37.521Z] 00:37:37     INFO -   File "/builds/worker/workspace/build/tests/awsy/awsy/test_memory_usage.py", line 240, in test_open_tabs
[task 2019-03-23T00:37:37.521Z] 00:37:37     INFO -     self.open_pages()
[task 2019-03-23T00:37:37.521Z] 00:37:37     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/awsy/awsy_test_case.py", line 398, in open_pages
[task 2019-03-23T00:37:37.522Z] 00:37:37     INFO -     self.signal_user_active()
[task 2019-03-23T00:37:37.522Z] 00:37:37     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/awsy/awsy_test_case.py", line 389, in signal_user_active
[task 2019-03-23T00:37:37.522Z] 00:37:37     INFO -     root = self.marionette.find_element(By.CSS_SELECTOR, ':root')
[task 2019-03-23T00:37:37.522Z] 00:37:37     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 1694, in find_element
[task 2019-03-23T00:37:37.523Z] 00:37:37     INFO -     body, key="value")
[task 2019-03-23T00:37:37.523Z] 00:37:37     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/decorators.py", line 26, in _
[task 2019-03-23T00:37:37.523Z] 00:37:37     INFO -     return func(*args, **kwargs)
[task 2019-03-23T00:37:37.523Z] 00:37:37     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 598, in _send_message
[task 2019-03-23T00:37:37.523Z] 00:37:37     INFO -     self._handle_error(err)
[task 2019-03-23T00:37:37.523Z] 00:37:37     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 618, in _handle_error
[task 2019-03-23T00:37:37.523Z] 00:37:37     INFO -     raise errors.lookup(error)(message, stacktrace=stacktrace)

The tabModal property getter can return null so we need to check it before accessing sub-properties.

Pushed by erahm@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/da3104dd2ff3
Check for null when accessing tabModal. r=whimboo
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Assignee: nobody → erahm
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: