Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.12.0] JavaScript Error: "b is null" #5881

Closed
boris-petrov opened this issue May 10, 2018 · 24 comments
Closed

[3.12.0] JavaScript Error: "b is null" #5881

boris-petrov opened this issue May 10, 2018 · 24 comments

Comments

@boris-petrov
Copy link
Contributor

OS:
Linux
Selenium Version:
3.12.0
Browser:
Firefox 47.0.1

The following error started happening in a bunch of tests since 3.12.0. Only on FF 47.0.1, on Chrome it doesn't happen. We're using Capybara 3.0.3 on JRuby.

[JavaScript Error: "b is null" {file: "file:///home/boris/project/features/build/webdriver-profile20180510-2668-9f3blf/extensions/fxdriver@googlecode.com/components/synthetic-mouse.js" line: 10294}]'[JavaScript Error: "b is null" {file: "file:///home/boris/project/features/build/webdriver-profile20180510-2668-9f3blf/extensions/fxdriver@googlecode.com/components/synthetic-mouse.js" line: 10294}]' when calling method: [wdIMouse::move]
      # [remote server] file:///home/boris/project/features/build/webdriver-profile20180510-2668-9f3blf/extensions/fxdriver@googlecode.com/components/command-processor.js:13148:in `WebElement.clickElement'
      # [remote server] file:///home/boris/project/features/build/webdriver-profile20180510-2668-9f3blf/extensions/fxdriver@googlecode.com/components/command-processor.js:13388:in `DelayedCommand.prototype.executeInternal_/k'
      # [remote server] file:///home/boris/project/features/build/webdriver-profile20180510-2668-9f3blf/extensions/fxdriver@googlecode.com/components/command-processor.js:13393:in `DelayedCommand.prototype.executeInternal_'
      # [remote server] file:///home/boris/project/features/build/webdriver-profile20180510-2668-9f3blf/extensions/fxdriver@googlecode.com/components/command-processor.js:13335:in `DelayedCommand.prototype.execute/<'
      # ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/remote/response.rb:69:in `assert_ok'
      # ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/remote/response.rb:32:in `initialize'
      # ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/remote/http/common.rb:84:in `create_response'
      # ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/remote/http/default.rb:104:in `request'
      # ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/remote/http/common.rb:62:in `call'
      # ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/remote/bridge.rb:164:in `execute'
      # ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/remote/oss/bridge.rb:579:in `execute'
      # ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/remote/oss/bridge.rb:326:in `click_element'
      # ./features/build/tmp/jrubyExec/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/common/element.rb:72:in `click'
      # ./features/build/tmp/jrubyExec/gems/capybara-3.0.3/lib/capybara/selenium/node.rb:94:in `click'
      # ./features/build/tmp/jrubyExec/gems/capybara-3.0.3/lib/capybara/node/element.rb:133:in `block in click'
      # ./features/build/tmp/jrubyExec/gems/capybara-3.0.3/lib/capybara/node/base.rb:83:in `synchronize'
      # ./features/build/tmp/jrubyExec/gems/capybara-3.0.3/lib/capybara/node/element.rb:133:in `click'
      # ./features/support/capybara_helper.rb:3:in `click_text'
      # ./features/login_spec.rb:169:in `block in (root)'

Please tell me if you need more information!

@barancev
Copy link
Member

For issues please provide a concise reproducible test case and describe what results you are seeing and what results you expect.

See CONTRIBUTING.md

@drennane
Copy link

Bump

@barancev
Copy link
Member

Yes, "Bump!"
Please provide a reproduction scenario, or the issue will be closed soon.

@drennane
Copy link

Yes Yes "Bump"

No, I don't have time to figure it out. It would probably take me a day to provide a reproducible scenario if at all and so I'm just going to try and work around it, but felt it worth letting you know that someone out there is experiencing the same issue.
If I change my mind I'll be sure to pop back.

@drennane
Copy link

Tell me @diemol, is it better that I say nothing at all? 😕

@luke-hill
Copy link
Contributor

Selenium is an Open Source Project. That is every contributor here does not get paid for his/her time.

Furthermore, Selenium is a Project which has contributors from a variety of Timezones, Diversities e.t.c.

I mention the above because for the majority of users. The timespan between your previous 2 comments has not spanned a working day (For me it hasn't anyways).

I would advise trying to meet with the maintainers halfway by producing an SSCCE - http://sscce.org/

If you cannot do this, then there is little to no incentive to do anything, let alone be able to do anything.

Remember once more I reiterate, every contributor here does this for the love of Open Source, not because they are compensated to do so.

@boris-petrov
Copy link
Contributor Author

Guys, let's not go too far away from the topic here. :) We all know that no one gets paid here and we are really thankful for the great work on Selenium - half the world cannot live without this project, us included. :)

Right now I cannot take the time to create a reproduction so I decided just to open a ticket as a reference. @drennane has the same problem obviously, so this is a real issue. @barancev - please don't close the issue because there is no reproduction - creating one is probably more difficult than fixing the issue and we're not getting paid doing that either so you can understand why we can't do that right away. :) Let's leave it like that for now. I will try each new version of Selenium that comes out and will notify here if the issue is resolved with it. Or will come up with a reproduction when I have the time to sit down and do it.

Until then - thanks again for the hard work!

@drennane
Copy link

Thanks @boris-petrov for the measured response. I'm not sure why there was such an offended reaction to my "bump" or me, genuinely, asking the question of @diemol (who gave my comment a thumbs down) as to whether or not I should bother contributing at all? I could just have easily not bothered but instead took the time to let the community know that I'm experiencing the same thing.
By the way @luke-hill, I understand that my two comments spanned a weekend (and so not a full working day) but at no point have I demanded that it be fixed so I'm not sure why this is relevant?

In short, I also appreciate the work being done by all and just popped in to provide feedback but I guess I'll be more tentative about doing so in future.
As per previous, if I do decide I have the time to create an SSCCE, I'll be sure to drop back.

@luke-hill
Copy link
Contributor

Yes Yes "Bump"
No, I don't have time to figure it out.

But the maintainers do?

[3.12.0] JavaScript Error: "b is null" #5881 -> This literally gives me nothing to work off. I have my stack in ruby but I'm confused as to what framework you're using (Other than capybara). If you gave me a repo or something that you're using. Or a method that you're calling it gives me more insight.

@drennane
Copy link

drennane commented May 29, 2018

No, I don't have time to figure it out.

@luke-hill This is reference to my own code, not yours. Mine is a proprietary Enterprise Web Application which obviously does not sit on any public repo and for same reasons, it's very difficult for me to get something that is stand alone reproducible for you.
I'm going to say again that I'm not demanding a fix but just letting you know that someone else has seen the issue, and now I'm going to politely bow out of this conversation unless I have anything further to add.

Additional info if it helps;
OS: Mac OSX 10.13.4
Selenium: 3.12.0
Browser: FF 52.5.2

@barancev
Copy link
Member

@drennane I doubt you hit the same issue. The original report is related to legacy Firefox driver (see fxdriver@googlecode.com in the log) that does not support Firefox 57 at all.

@drennane
Copy link

Sorry, reported the wrong version of FF, fixed above.

@boris-petrov
Copy link
Contributor Author

@drennane - perhaps you could also share the stacktrace if different?

@drennane
Copy link

drennane commented May 30, 2018

Stacktrace:

Command duration or timeout: 0 milliseconds
	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
	at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
	at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
	at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
	at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:276)
	at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:83)
	at geb.navigator.NonEmptyNavigator.click(NonEmptyNavigator.groovy:432)
	at geb.content.TemplateDerivedPageContent.click(TemplateDerivedPageContent.groovy:72)
	at com.myapp.MyTests.MyClass(MyClass.groovy:33)
Caused by: org.openqa.selenium.WebDriverException: [JavaScript Error: "b is null" {file: "file:///var/folders/tq/nywy8t096tg9_1s2qx31p3qm0000gn/T/anonymous2366624571600101865webdriver-profile/extensions/fxdriver@googlecode.com/components/synthetic-mouse.js" line: 10294}]'[JavaScript Error: "b is null" {file: "file:///var/folders/tq/nywy8t096tg9_1s2qx31p3qm0000gn/T/anonymous2366624571600101865webdriver-profile/extensions/fxdriver@googlecode.com/components/synthetic-mouse.js" line: 10294}]' when calling method: [wdIMouse::move]
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z'
System info: host: 'My-MacBook-Air.local', ip: 'x.x.x.x', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.4', java.version: '1.8.0_77'
Driver info: driver.version: unknown
	at <anonymous class>.WebElement.clickElement(file:///var/folders/tq/nywy8t096tg9_1s2qx31p3qm0000gn/T/anonymous2366624571600101865webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:13148)
	at <anonymous class>.DelayedCommand.prototype.executeInternal_/k(file:///var/folders/tq/nywy8t096tg9_1s2qx31p3qm0000gn/T/anonymous2366624571600101865webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:13388)
	at <anonymous class>.DelayedCommand.prototype.executeInternal_(file:///var/folders/tq/nywy8t096tg9_1s2qx31p3qm0000gn/T/anonymous2366624571600101865webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:13393)
	at <anonymous class>.DelayedCommand.prototype.execute/<(file:///var/folders/tq/nywy8t096tg9_1s2qx31p3qm0000gn/T/anonymous2366624571600101865webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:13335)

@dionysiose
Copy link

dionysiose commented Jun 5, 2018

OS: Windows 7
Selenium: 3.12.0
Browser: FF 52.2.0

I am observing the same error when calling Select.selectByVisibleText:

org.openqa.selenium.WebDriverException: [JavaScript Error: "b is null" {file: "file:///C:/anonymous4342491499718304582webdriver-profile/extensions/fxdriver@googlecode.com/components/synthetic-mouse.js" line: 10294}]'[JavaScript Error: "b is null" {file: "file:///C:/anonymous4342491499718304582webdriver-profile/extensions/fxdriver@googlecode.com/components/synthetic-mouse.js" line: 10294}]' when calling method: [wdIMouse::move] Command duration or timeout: 0 milliseconds at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166) at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40) at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80) at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543) at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:276) at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:83) at org.openqa.selenium.support.ui.Select.setSelected(Select.java:324) at org.openqa.selenium.support.ui.Select.selectByVisibleText(Select.java:120) ...

I observed it happens on the second selection of a dropdown value.

Tested exactly the same thing with 3.11.0 and worked fine. It is definitely an issue with 3.12.0.

@cgoldberg
Copy link
Contributor

just letting you know that someone else has seen the issue

this is not helpful information.

@drennane
Copy link

drennane commented Jun 5, 2018

Oh no, someone kicking this line of argumentative conversation off again. Maybe you didn't manage to get through the entire thread of comments above.

@barancev
Copy link
Member

It's a blind shot, but I hope this change fixes the issue.
To be released in version 3.13

@jqassar
Copy link

jqassar commented Jun 22, 2018

In case this does not fix the issue, or more corroboration is required, we ran into this issue for a build of one of our components today. It had not had any code changes for two to three weeks and suddenly went from pass to fail. This issue alerted us that there was a potential discrepancy in unpinned dependencies, and some examination of the logs showed this to be the case.

Failing build (today):

[INFO] > webdriver-manager update build          
22-Jun-2018 10:13:35      [INFO] [10:13:35] I/start - java -Djava.security.egd=file:///dev/./urandom 
-Dwebdriver.chrome.driver=/builddir/settingsui/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.40 
-Dwebdriver.gecko.driver=/builddir/settingsui/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.21.0 
-jar /builddir/settingsui/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.12.0.jar 
-port 4444

Successful Build:

[INFO] > webdriver-manager update

build      06-Jun-2018 16:16:10      [INFO] [16:16:10] I/start - java -Djava.security.egd=file:///dev/./urandom 
-Dwebdriver.chrome.driver=/builddir/settingsui/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.39 
-Dwebdriver.gecko.driver=/builddir/settingsui/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.20.1 
-jar /builddir/settingsui/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.12.0.jar -port 4444

The failing build had selenium 3.12.0, geckodriver 0.21.0, and chromedriver 2.40 (we are using gecko).
The successful build had selenium 3.12.0, geckodriver 0.20.1, and chromedriver 2.39.

@keerthindurthi
Copy link

keerthindurthi commented Jun 29, 2018

No Luck using
Firefox : 45.0.2
Selenium: 3.11.0 and 3.12.0
chromedriver_2.39
geckodriver-v0.21.0
Angular : 6.0.7

getting below error
`build 29-Jun-2018 13:41:49 [INFO] - Failed: [JavaScript Error: "b is null" {file: "file:///tmp/anonymous8481480710135634webdriver-profile/extensions/fxdriver@googlecode.com/components/synthetic-mouse.js" line: 10294}]'[JavaScript Error: "b is null" {file: "file:///tmp/anonymous8481480710135634webdriver-profile/extensions/fxdriver@googlecode.com/components/synthetic-mouse.js" line: 10294}]' when calling method: [wdIMouse::move]
build 29-Jun-2018 13:41:49 [INFO] at Object.checkLegacyResponse (/var/atlassian/bamboo-agent/xml-data/build-dir/AIRVIEW-SUI38-JOB1/settingsui/node_modules/selenium-webdriver/lib/error.js:546:15)

@barancev
Copy link
Member

Should be fixed in 3.13, please upgrade.

@keerthindurthi
Copy link

keerthindurthi commented Jul 3, 2018

Thanks @barancev This got resolved when i'm running in my local instance, but I'm getting the same issue in CI for some reason. Its using same Firefox- 45.0.2 ESR version
Firefox : 45.0.2 ESR
Selenium: 3.13.0
chromedriver_2.40
geckodriver-v0.21.0
Angular : 6.0.7

The only difference i saw was Angular modules are recompiling again in CI for some reasons. Any ideas?

build 02-Jul-2018 12:40:02 [INFO] - Failed: [JavaScript Error: "b is null" {file: "file:///tmp/anonymous752106217672701905webdriver-profile/extensions/fxdriver@googlecode.com/components/synthetic-mouse.js" line: 10294}]'[JavaScript Error: "b is null" {file: "file:///tmp/anonymous752106217672701905webdriver-profile/extensions/fxdriver@googlecode.com/components/synthetic-mouse.js" line: 10294}]' when calling method: [wdIMouse::move]

uild 02-Jul-2018 12:39:33 [INFO] [12:39:33] I/start - java -Djava.security.egd=file:///dev/./urandom -Dwebdriver.chrome.driver=/var/atlassian/bamboo-agent/xml-data/build-dir/AIRVIEW-SUI38-JOB1/settingsui/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.40 -Dwebdriver.gecko.driver=/var/atlassian/bamboo-agent/xml-data/build-dir/AIRVIEW-SUI38-JOB1/settingsui/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.21.0 -jar /var/atlassian/bamboo-agent/xml-data/build-dir/AIRVIEW-SUI38-JOB1/settingsui/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.13.0.jar -port 4444
build 02-Jul-2018 12:39:33 [INFO] [12:39:33] I/start - seleniumProcess.pid: 12681
build 02-Jul-2018 12:39:34 [ERROR] 12:39:34.116 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.13.0', revision: '2f0d292'
build 02-Jul-2018 12:39:34 [ERROR] 12:39:34.118 INFO [GridLauncherV3$1.launch] - Launching a standalone Selenium Server on port 4444
build 02-Jul-2018 12:39:34 [ERROR] 2018-07-02 12:39:34.257:INFO::main: Logging initialized @541ms to org.seleniumhq.jetty9.util.log.StdErrLog
build 02-Jul-2018 12:39:34 [ERROR] 12:39:34.522 ERROR [SeleniumServer.boot] - Port 4444 is busy, please choose a free port and specify it using -port option
build 02-Jul-2018 12:39:34 [INFO] [12:39:34] I/start - Selenium Standalone has exited with code 0
build 02-Jul-2018 12:39:34 [INFO] [12:39:34] W/start - Server never seemed to start, and has now exited
build 02-Jul-2018 12:39:35 [INFO] ** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
build 02-Jul-2018 12:39:51 [INFO]
build 02-Jul-2018 12:39:51 [INFO] Date: 2018-07-02T19:39:51.821Z
build 02-Jul-2018 12:39:51 [INFO] Hash: 3b6bc7e131e9792a29b9
build 02-Jul-2018 12:39:51 [INFO] Time: 16114ms
build 02-Jul-2018 12:39:51 [INFO] chunk {main} main.js, main.js.map (main) 187 kB [initial] [rendered]
build 02-Jul-2018 12:39:51 [INFO] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 397 kB [initial] [rendered]
build 02-Jul-2018 12:39:51 [INFO] chunk {runtime} runtime.js, runtime.js.map (runtime) 5.22 kB [entry] [rendered]
build 02-Jul-2018 12:39:51 [INFO] chunk {styles} styles.js, styles.js.map (styles) 19 kB [initial] [rendered]
build 02-Jul-2018 12:39:51 [INFO] chunk {vendor} vendor.js, vendor.js.map (vendor) 4.03 MB [initial] [rendered]
build 02-Jul-2018 12:39:51 [INFO] ℹ 「wdm」: Compiled successfully.
build 02-Jul-2018 12:39:52 [ERROR] 0% compiling�������������� 10% building modules 0/1 modules 1 active …RVIEW-SUI38-JOB1/settingsui/src/main.ts� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� ������������������������������������������� 10% building modules 1/1 modules 0 active������������������������������������������ 10% building modules 1/2 modules 1 active …-SUI38-JOB1/settingsui/src/polyfills.ts� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� ������������������������������������������� 10% building modules 2/2 modules 0 active������������������������������������������ 10% building modules 2/3 modules 1 active …W-SUI38-JOB1/settingsui/src/styles.scss� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� ������������������������������������������� 10% building modules 3/3 modules 0 active������������������������������������������ 10% building modules 3/4 modules 1 active …server/client/index.js?http://0.0.0.0:0� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� �� ������������������������������������������� 10% building modules 4/4 modules 0 active������������������������������������������ 10% building

@barancev
Copy link
Member

barancev commented Jul 3, 2018

@keerthindurthi: Sounds weird, because in version 3.13 the line 10294 looks like this:

return b && b.shadowRoot && void 0 !== a.assignedSlot ? a.assignedSlot ? a.assignedSlot.parentNode : null : a.getDestinationInsertionPoints && (a = a.getDestinationInsertionPoints(), 0 < a.length) ? a[a.length - 1] : b;

You can see that it should not fail if b is null.

@jqassar
Copy link

jqassar commented Jul 3, 2018

@barancev, we believe the issue was a stale webdriver-manager process using the old selenium version. Forcibly restarting the server shows passing tests.

@lock lock bot locked and limited conversation to collaborators Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants