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

NullPointerException when starting node #2909

Closed
Noxxys opened this issue Oct 12, 2016 · 2 comments
Closed

NullPointerException when starting node #2909

Noxxys opened this issue Oct 12, 2016 · 2 comments

Comments

@Noxxys
Copy link

Noxxys commented Oct 12, 2016

Meta -

OS: Windows 10 (virtual machines)
Selenium Version: 3.0.0 beta4
Browser: N/A
Browser Version: N/A

Expected Behavior -

able to start java -jar selenium-server-standalone-3.0.0-beta4.jar -role node -nodeConfig node.json

Actual Behavior -

Exception just after "Selenium Grid node is up and ready to register to the hub" and the usage appear:
java.lang.NullPointerException
at org.openqa.grid.internal.utils.SelfRegisteringRemote.startRegistrationProcess(SelfRegisteringRemote.java:175)
at org.openqa.grid.selenium.GridLauncherV3$3.launch(GridLauncherV3.java:271)
at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:86)

Steps to reproduce -

hub.json:
{
"port": 4444,
"newSessionWaitTimeout": -1,
"throwOnCapabilityNotPresent": true,
"timeout": 1200000,
"browserTimeout": 120000
}

node.json:
{
"capabilities":
[
{
"browserName": "firefox",
"maxInstances": 10,
"seleniumProtocol": "WebDriver"
}
],
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 10,
"timeout": 1200000,
"browserTimeout": 120000,
"port": 5555,
"hub": "http://IP_OF_HUB_MACHINE:4444"
}

Run this on 1st machine:
java -jar selenium-server-standalone-3.0.0-beta4.jar -role hub -hubConfig hub.json

Run this on 2nd machine:
java -jar elenium-server-standalone-3.0.0-beta4.jar -role node -nodeConfig node.json

NOTE: this was working fine with Selenium 2.53.0, I just altered node.json to remove configuration { ... } as advised in the docs.

@Noxxys
Copy link
Author

Noxxys commented Oct 12, 2016

Problem solved, it was because "register": true was missing from node.json.
In my opinion, it should be the default, or it should at least not crash on a null pointer exception. I'm not closing this bug because the exception should be handled.

@lukeis lukeis closed this as completed in 3716fc5 Oct 12, 2016
@lukeis
Copy link
Member

lukeis commented Oct 12, 2016

thanks for the excellent bug report!

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

No branches or pull requests

2 participants