Reputation: 401
I am trying to load up a standalone Selenium server on my local machine to test some code. I upgraded Chrome, which means I had to upgrade Chromedriver, which then caused my Unit Test environment to stop working. Therefore, I opted to upgrade Selenium to fix the issue. However, when I run my command:
$ java -Dwebdriver.chrome.driver="./chromedriver" -jar selenium-server-4.0.0-alpha-3.jar standalone
I am getting the following error:
08:19:00.496 INFO [EventBusConfig.createBus] - Creating event bus: org.openqa.selenium.events.local.GuavaEventBus
Exception in thread "main" java.lang.IllegalArgumentException: Max session count must be greater than 0.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:148)
at org.openqa.selenium.grid.data.NodeStatus.<init>(NodeStatus.java:57)
at org.openqa.selenium.grid.node.local.LocalNode.getStatus(LocalNode.java:239)
at org.openqa.selenium.grid.distributor.local.LocalDistributor.add(LocalDistributor.java:281)
at org.openqa.selenium.grid.distributor.local.LocalDistributor.add(LocalDistributor.java:71)
at org.openqa.selenium.grid.commands.Standalone.lambda$configure$1(Standalone.java:159)
at org.openqa.selenium.grid.Main.launch(Main.java:123)
at org.openqa.selenium.grid.Main.main(Main.java:100)
I can't seem to find anything out there about this exact error, and everything I find related to problems with sessions is related to the "Grid" concept of hosting a remote Selenium server (which is not what I am trying to do here). I saw this thread and thought to put the "-browser" argument onto my command above, but apparently standalone mode doesn't even support that as a parameter... or "maxSession".
Was passed main parameter '-browser' but no main parameter was defined in your arg class
Was passed main parameter '-maxSession' but no main parameter was defined in your arg class
Upvotes: 0
Views: 1012
Reputation: 401
The chromedriver binary I put into the directory with the .jar did not have execute permissions.
$ chmod +x chromedriver
Now everything is working. Isn't it funny how a very fundamental aspect of development is often the problem and the error message seemingly has nothing to do with the actual issue?
Upvotes: 1