Running Selenium tests via geckodriver for Firefox on Android (Fenix) cause a type error in `WebDriver:NewSession` where `this.curBrowser` is `null`. Here the details: ``` 1615970263741 webdriver::server DEBUG <- 500 Internal Server Error {"value":{"error":"unknown error","message":"TypeError: can't access property \"tab\", this.curBrowser is null","stacktrace":"GeckoDriver.prototype.newSession@chrome://marionette/content/driver.js:681:7\ndespatch@chrome://marionette/content/server.js:295:40\nexecute@chrome://marionette/content/server.js:265:16\nonPacket/<@chrome://marionette/content/server.js:238:20\nonPacket@chrome://marionette/content/server.js:239:9\n_onJSONObjectReady/<@chrome://marionette/content/transport.js:504:20\n"}} ``` The related code in driver.js is here: https://searchfox.org/mozilla-central/rev/1a47a74bd5ba89f2474aa27c40bd478e853f3276/testing/marionette/driver.js#676 Basically `curBrowser` should be set by [addBrowser](https://searchfox.org/mozilla-central/rev/1a47a74bd5ba89f2474aa27c40bd478e853f3276/testing/marionette/driver.js#651) when there is an existent window within `waitForWindow`. But something seems to get wrong in this code: https://searchfox.org/mozilla-central/rev/1a47a74bd5ba89f2474aa27c40bd478e853f3276/testing/marionette/driver.js#405-408
Bug 1699065 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Originally filed as: https://github.com/mozilla/geckodriver/issues/1858 Running Selenium tests via geckodriver for Firefox on Android (Fenix) cause a type error in `WebDriver:NewSession` where `this.curBrowser` is `null`. Here the details: ``` 1615970263741 webdriver::server DEBUG <- 500 Internal Server Error {"value":{"error":"unknown error","message":"TypeError: can't access property \"tab\", this.curBrowser is null","stacktrace":"GeckoDriver.prototype.newSession@chrome://marionette/content/driver.js:681:7\ndespatch@chrome://marionette/content/server.js:295:40\nexecute@chrome://marionette/content/server.js:265:16\nonPacket/<@chrome://marionette/content/server.js:238:20\nonPacket@chrome://marionette/content/server.js:239:9\n_onJSONObjectReady/<@chrome://marionette/content/transport.js:504:20\n"}} ``` The related code in driver.js is here: https://searchfox.org/mozilla-central/rev/1a47a74bd5ba89f2474aa27c40bd478e853f3276/testing/marionette/driver.js#676 Basically `curBrowser` should be set by [addBrowser](https://searchfox.org/mozilla-central/rev/1a47a74bd5ba89f2474aa27c40bd478e853f3276/testing/marionette/driver.js#651) when there is an existent window within `waitForWindow`. But something seems to get wrong in this code: https://searchfox.org/mozilla-central/rev/1a47a74bd5ba89f2474aa27c40bd478e853f3276/testing/marionette/driver.js#405-408