Open Bug 1272118 Opened 8 years ago Updated 2 years ago

"__webDriverArguments is not defined" exception while trying to run extensions/spellcheck/tests/mochitest/test_bug1170484.html on OS X

Categories

(Testing :: Mochitest, defect)

defect

Tracking

(Not tracked)

People

(Reporter: erahm, Unassigned)

Details

I'm getting a "JavascriptException: JavascriptException: ReferenceError: __webDriverArguments is not defined" exception when trying to run a spellcheck mochitest on OS X.

STR:
1. |mach build|
2. |mach test extensions/spellcheck/tests/mochitest/test_bug1170484.html|

Full log:
> [ericrahm@erahm-25043 ~/dev/mozilla-central]$ ./mach test extensions/spellcheck/tests/mochitest/test_bug1170484.html 
> 
> ######
> ### Now running mochitest-plain.
> ######
> 
> Checking for orphan ssltunnel processes...
> Checking for orphan xpcshell processes...
> SUITE-START | Running 1 tests
> dir: extensions/spellcheck/tests/mochitest
> mozprofile.addons WARNING | Could not install /Users/ericrahm/dev/mozilla-central/obj-x86_64-apple-darwin15.3.0-release/_tests/testing/mochitest/extensions/mozscreenshots: [Errno 2] No such file or directory: '/Users/ericrahm/dev/mozilla-central/obj-x86_64-apple-darwin15.3.0-release/_tests/testing/mochitest/extensions/mozscreenshots/install.rdf'
> pk12util: PKCS12 IMPORT SUCCESSFUL
> MochitestServer : launching [u'/Users/ericrahm/dev/mozilla-central/obj-x86_64-apple-darwin15.3.0-release/dist/bin/xpcshell', '-g', u'/Users/ericrahm/dev/mozilla-central/obj-x86_64-apple-darwin15.3.0-release/dist/Nightly.app/Contents/Resources', '-v', '170', '-f', u'/Users/ericrahm/dev/mozilla-central/obj-x86_64-apple-darwin15.3.0-release/dist/bin/components/httpd.js', '-e', "const _PROFILE_PATH = '/var/folders/r9/y6j_x6jj02g0y26tk74l3_nh0000gn/T/tmphuj2ZY.mozrunner'; const _SERVER_PORT = '8888'; const _SERVER_ADDR = '127.0.0.1'; const _TEST_PREFIX = undefined; const _DISPLAY_RESULTS = true;", '-f', '/Users/ericrahm/dev/mozilla-central/obj-x86_64-apple-darwin15.3.0-release/_tests/testing/mochitest/server.js']
> runtests.py | Server pid: 99912
> runtests.py | Websocket server pid: 99913
> runtests.py | SSL tunnel pid: 99914
> runtests.py | Running with e10s: True
> runtests.py | Running tests: start.
> 
> runtests.py | Application pid: 99915
> TEST-INFO | started process Main app process
> Traceback (most recent call last):
>   File "/Users/ericrahm/dev/mozilla-central/obj-x86_64-apple-darwin15.3.0-release/_tests/testing/mochitest/runtests.py", line 2409, in doTests
>     marionette_args=marionette_args,
>   File "/Users/ericrahm/dev/mozilla-central/obj-x86_64-apple-darwin15.3.0-release/_tests/testing/mochitest/runtests.py", line 2042, in runApp
>     self.execute_start_script()
>   File "/Users/ericrahm/dev/mozilla-central/obj-x86_64-apple-darwin15.3.0-release/_tests/testing/mochitest/runtests.py", line 1290, in execute_start_script
>     script_args=self.start_script_args)
>   File "/Users/ericrahm/dev/mozilla-central/testing/marionette/client/marionette_driver/marionette.py", line 1675, in execute_script
>     rv = self._send_message("executeScript", body, key="value")
>   File "/Users/ericrahm/dev/mozilla-central/testing/marionette/client/marionette_driver/decorators.py", line 36, in _
>     return func(*args, **kwargs)
>   File "/Users/ericrahm/dev/mozilla-central/testing/marionette/client/marionette_driver/marionette.py", line 757, in _send_message
>     self._handle_error(err)
>   File "/Users/ericrahm/dev/mozilla-central/testing/marionette/client/marionette_driver/marionette.py", line 818, in _handle_error
>     raise errors.lookup(error)(message, stacktrace=stacktrace)
> JavascriptException: JavascriptException: ReferenceError: __webDriverArguments is not defined
> stacktrace:
>   execute_script @runtests.py, line 1290
>   inline javascript, line 4
>   src: "const flavor  = __webDriverArguments[0]"
>   Stack:
>   func@runtests.py:4:7
>   @runtests.py:15:5
>   GeckoDriver.prototype.executeScriptInSandbox@chrome://marionette/content/driver.js:805:13
>   GeckoDriver.prototype.execute@chrome://marionette/content/driver.js:907:5
>   TaskImpl_run@resource://gre/modules/Task.jsm:319:40
>   TaskImpl@resource://gre/modules/Task.jsm:280:3
>   createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:254:14
>   Task_spawn@resource://gre/modules/Task.jsm:168:12
>   TaskImpl_handleResultValue@resource://gre/modules/Task.jsm:388:16
>   TaskImpl_run@resource://gre/modules/Task.jsm:327:13
>   TaskImpl@resource://gre/modules/Task.jsm:280:3
>   createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:254:14
>   Task_spawn@resource://gre/modules/Task.jsm:168:12
>   Dispatcher.prototype.execute@chrome://marionette/content/dispatcher.js:120:13
>   Dispatcher.prototype.onPacket@chrome://marionette/content/dispatcher.js:91:5
>   DebuggerTransport.prototype._onJSONObjectReady/<@chrome://marionette/content/server.js -> resource://devtools/shared/transport/transport.js:479:9
>   exports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14
>   exports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14
> 
> 
> 0 ERROR Automation Error: Received unexpected exception while running application
> 
> Stopping web server
> Stopping web socket server
> Stopping ssltunnel
> WARNING | leakcheck | refcount logging is off, so leaks can't be detected!
> runtests.py | Running tests: end.
> 0 INFO TEST-START | Shutdown
> 1 INFO Passed:  0
> 2 INFO Failed:  0
> 3 INFO Todo:    0
> 4 INFO Mode:    e10s
> 5 INFO SimpleTest FINISHED
> SUITE-END | took 0s
Summary: e__webDriverArguments is not defined exception while trying to run extensions/spellcheck/tests/mochitest/test_bug1170484.html on OS X → "__webDriverArguments is not defined" exception while trying to run extensions/spellcheck/tests/mochitest/test_bug1170484.html on OS X
This is working for me

dburns in ~/development/mozilla-central λ ./mach test extensions/spellcheck/tests/mochitest/test_bug1170484.html

######
### Now running mochitest-plain.
######

Checking for orphan ssltunnel processes...
Checking for orphan xpcshell processes...
SUITE-START | Running 1 tests
dir: extensions/spellcheck/tests/mochitest
mozprofile.addons WARNING | Could not install /Users/dburns/development/mozilla-central/obj-ff-dbg.noindex/_tests/testing/mochitest/extensions/mozscreenshots: [Errno 2] No such file or directory: '/Users/dburns/development/mozilla-central/obj-ff-dbg.noindex/_tests/testing/mochitest/extensions/mozscreenshots/install.rdf'
pk12util: PKCS12 IMPORT SUCCESSFUL
MochitestServer : launching [u'/Users/dburns/development/mozilla-central/obj-ff-dbg.noindex/dist/bin/xpcshell', '-g', u'/Users/dburns/development/mozilla-central/obj-ff-dbg.noindex/dist/Nightly.app/Contents/Resources', '-v', '170', '-f', u'/Users/dburns/development/mozilla-central/obj-ff-dbg.noindex/dist/bin/components/httpd.js', '-e', "const _PROFILE_PATH = '/var/folders/7n/2f615rtj42l0ppz5jg_nch0c0000gp/T/tmp1tefBM.mozrunner'; const _SERVER_PORT = '8888'; const _SERVER_ADDR = '127.0.0.1'; const _TEST_PREFIX = undefined; const _DISPLAY_RESULTS = true;", '-f', '/Users/dburns/development/mozilla-central/obj-ff-dbg.noindex/_tests/testing/mochitest/server.js']
runtests.py | Server pid: 24950
runtests.py | Websocket server pid: 24951
runtests.py | SSL tunnel pid: 24953
runtests.py | Running with e10s: True
runtests.py | Running tests: start.

runtests.py | Application pid: 24956
TEST-INFO | started process Main app process
1462998857576	Marionette	INFO	Listening on port 2828
1462998859307	Marionette	INFO	addBrowser
1462998859308	Marionette	INFO	Context ctor
1462998859311	Marionette	INFO	bc=[object Object]
0 INFO SimpleTest START
1 INFO TEST-START | extensions/spellcheck/tests/mochitest/test_bug1170484.html
2 INFO must wait for load
3 INFO Loaded chrome script
4 INFO TEST-PASS | extensions/spellcheck/tests/mochitest/test_bug1170484.html | Spelling corrected properly
5 INFO TEST-PASS | extensions/spellcheck/tests/mochitest/test_bug1170484.html | Got correct number of mutations
6 INFO TEST-PASS | extensions/spellcheck/tests/mochitest/test_bug1170484.html | Got correct number of input events
MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
MEMORY STAT | vsize 2860MB | residentFast 161MB | heapAllocated 23MB
7 INFO TEST-OK | extensions/spellcheck/tests/mochitest/test_bug1170484.html | took 1561ms
8 INFO TEST-START | Shutdown
9 INFO Passed:  3
10 INFO Failed:  0
11 INFO Todo:    0
12 INFO Mode:    e10s
13 INFO Slowest: 1561ms - /tests/extensions/spellcheck/tests/mochitest/test_bug1170484.html
14 INFO SimpleTest FINISHED
15 INFO TEST-INFO | Ran 1 Loops
16 INFO SimpleTest FINISHED
^Cruntests.py | Received keyboard interrupt.

Stopping web server
Stopping web socket server
Stopping ssltunnel
WARNING | leakcheck | refcount logging is off, so leaks can't be detected!
runtests.py | Running tests: end.
0 INFO TEST-START | Shutdown
1 INFO Passed:  3
2 INFO Failed:  0
3 INFO Todo:    0
4 INFO Mode:    e10s
5 INFO SimpleTest FINISHED
SUITE-END | took 35s
I am on tip 1532576c0435
I did a clobber artifact build when doing the above.
This looks related to bug 1123506, but unfortunately I wasn't able to reproduce with a full build on my macbook.
I think it’s possible you had an outdated Gecko compile and that a clobber build was necessary to resolve it. erahm, can you confirm that a clobber build resolves this?
Flags: needinfo?(erahm)
(In reply to Andreas Tolfsen ‹:ato› from comment #5)
> I think it’s possible you had an outdated Gecko compile and that a clobber
> build was necessary to resolve it. erahm, can you confirm that a clobber
> build resolves this?

A clobber fixed things. You might want to touch the CLOBBER file if someone hasn't since this landed.
Flags: needinfo?(erahm)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.