I am currently trying to get my automated tests working on chromium edge on ubuntu.
My current setup is this:
The setup is the following:
The browser is in a docker container with Ubuntu running
The hub is on the official Selenium 4 docker container
The tests or on a separate docker container running .Net Core 2.2
The RemoteWebDriver registration is the following
.....
var edgeOptions = new EdgeOptions();
edgeOptions.UseChromium = true;
edgeOptions.AddUserProfilePreference("download.default_directory", DownloadFolderPath);
edgeOptions.AddArguments("--no-sandbox"); // Bypass OS security model
edgeOptions.AddArguments("--ignore-certificate-errors"); // ignore ssl errors
edgeOptions.AddArgument("--disable-dev-shm-usage"); // ignore shm usage
edgeOptions.AddArguments("--ignore-urlfetcher-cert-requests"); // ignore url cert request fetch
edgeOptions.AddArguments("--force-devtools-available=1"); // ignore url cert request fetch
edgeOptions.AddArguments($"--lang={_language}"); //set browser language from the system properties.
GetEdgeDriver(builder, edgeOptions);
.......
private void GetEdgeRemoteDriver(ContainerBuilder builder, EdgeOptions options)
{
builder
.Register(_ => new RemoteWebDriver(new Uri(RemoteEndPoint), options.ToCapabilities(), TimeSpan.FromMinutes(5)))
.As<IWebDriver>()
.InstancePerLifetimeScope()
.OnActivated(x => x.Instance.FileDetector = new LocalFileDetector());
}
And we get this on the Node:
root#docker-desktop:/# java -jar standalone.jar node --allow-cors --publish-events tcp://192.168.50.16:4442 --subscribe-events tcp://192.168.50.16:4443 --config nodeConfig.json --allow-cors
02:24:11.283 INFO [LoggingOptions.getTracer] - Using OpenTelemetry for tracing
02:24:11.285 INFO [LoggingOptions.createTracer] - Using OpenTelemetry for tracing
02:24:11.323 INFO [EventBusOptions.createBus] - Creating event bus: org.openqa.selenium.events.zeromq.ZeroMqEventBus
02:24:11.374 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://192.168.50.16:4442 and tcp://192.168.50.16:4443
02:24:11.427 INFO [UnboundZmqEventBus.<init>] - Sockets created
02:24:11.454 INFO [UnboundZmqEventBus.lambda$new$2] - Bus started
02:24:11.776 INFO [NodeServer.execute] - Reporting self as: http://192.168.65.3:5555
02:24:11.860 INFO [NodeOptions.report] - Adding Edge for {"browserName": "MicrosoftEdge"} 2 times
02:24:12.094 INFO [NodeServer.execute] - Started Selenium node 4.0.0-alpha-6 (revision 5f43a29cfc): http://192.168.65.3:5555
02:24:12.100 INFO [NodeServer.execute] - Starting registration process for node id e5e8efd9-e217-4967-8cfe-e312e7565523
02:24:12.398 INFO [NodeServer.lambda$execute$0] - Node has been added
Starting MSEdgeDriver 88.0.692.0 (dcff1d910f6557f2cce9c685f757a5891423af0c) on port 21256
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping MSEdgeDriver safe.
MSEdgeDriver was started successfully.
Starting MSEdgeDriver 88.0.692.0 (dcff1d910f6557f2cce9c685f757a5891423af0c) on port 11003
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping MSEdgeDriver safe.
MSEdgeDriver was started successfully.
Starting MSEdgeDriver 88.0.692.0 (dcff1d910f6557f2cce9c685f757a5891423af0c) on port 24739
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping MSEdgeDriver safe.
MSEdgeDriver was started successfully.
Starting MSEdgeDriver 88.0.692.0 (dcff1d910f6557f2cce9c685f757a5891423af0c) on port 16505
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping MSEdgeDriver safe.
MSEdgeDriver was started successfully.
And this on the hub side:
02:24:32.050 WARN [SpanWrappedHttpHandler.execute] - Unable to execute request: Unable to create session for <CreateSessionRequest with Capabilities {browserName: MicrosoftEdge, ms:edgeChromium: true, ms:edgeOptions: {args: [--no-sandbox, --ignore-certificate-errors, --disable-dev-shm-usage, --ignore-urlfetcher-cert-re..., --lang=ja], prefs: {download.default_directory: C:\Users\nicolae.farcas\Des...}}}>
Build info: version: '4.0.0-alpha-7', revision: '117b9d61c9'
System info: host: '836e92c76b1f', ip: '172.17.0.5', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.184-linuxkit', java.version: '1.8.0_265'
Driver info: driver.version: unknown
org.openqa.selenium.SessionNotCreatedException: Unable to create session for <CreateSessionRequest with Capabilities {browserName: MicrosoftEdge, ms:edgeChromium: true, ms:edgeOptions: {args: [--no-sandbox, --ignore-certificate-errors, --disable-dev-shm-usage, --ignore-urlfetcher-cert-re..., --lang=ja], prefs: {download.default_directory: C:\Users\nicolae.farcas\Des...}}}>
Build info: version: '4.0.0-alpha-7', revision: '117b9d61c9'
System info: host: '836e92c76b1f', ip: '172.17.0.5', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.184-linuxkit', java.version: '1.8.0_265'
Driver info: driver.version: unknown
at org.openqa.selenium.grid.distributor.model.Slot.lambda$onReserve$1(Slot.java:86)
at java.util.Optional.orElseThrow(Optional.java:290)
at org.openqa.selenium.grid.distributor.model.Slot.lambda$onReserve$2(Slot.java:85)
at org.openqa.selenium.grid.distributor.local.LocalDistributor.newSession(LocalDistributor.java:208)
at org.openqa.selenium.grid.distributor.Distributor.lambda$new$0(Distributor.java:89)
at org.openqa.selenium.remote.http.Route$TemplatizedRoute.handle(Route.java:183)
at org.openqa.selenium.remote.http.Route.execute(Route.java:67)
at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:327)
at org.openqa.selenium.remote.http.Route.execute(Route.java:67)
at org.openqa.selenium.grid.distributor.Distributor.execute(Distributor.java:124)
at org.openqa.selenium.remote.tracing.SpanWrappedHttpHandler.execute(SpanWrappedHttpHandler.java:86)
at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)
at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:327)
at org.openqa.selenium.remote.http.Route.execute(Route.java:67)
at org.openqa.selenium.grid.router.Router.execute(Router.java:85)
at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)
at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:327)
at org.openqa.selenium.remote.http.Route.execute(Route.java:67)
at org.openqa.selenium.grid.server.AddWebDriverSpecHeaders.lambda$apply$0(AddWebDriverSpecHeaders.java:30)
at org.openqa.selenium.grid.server.WrapExceptions.lambda$apply$0(WrapExceptions.java:36)
at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)
at org.openqa.selenium.netty.server.SeleniumHandler.lambda$channelRead0$0(SeleniumHandler.java:46)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
02:24:32.051 WARN [LoggingOptions$1.lambda$export$1] - {"traceId": "66e211f62bb44e6b57383c938386aa63","spanId": "d0836ebcedb75323","spanKind": "INTERNAL","eventTime": 1605666272050023400,"eventName": "exception","attributes": {"exception.type": "org.openqa.selenium.SessionNotCreatedException","exception.message": "Unable to execute request: Unable to create session for \u003cCreateSessionRequest with Capabilities {browserName: MicrosoftEdge, ms:edgeChromium: true, ms:edgeOptions: {args: [--no-sandbox, --ignore-certificate-errors, --disable-dev-shm-usage, --ignore-urlfetcher-cert-re..., --lang=ja], prefs: {download.default_directory: C:\\Users\\nicolae.farcas\\Des...}}}>\nBuild info: version: '4.0.0-alpha-7', revision: '117b9d61c9'\nSystem info: host: '836e92c76b1f', ip: '172.17.0.5', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.184-linuxkit', java.version: '1.8.0_265'\nDriver info: driver.version: unknown","http.handler_class": "org.openqa.selenium.grid.distributor.local.LocalDistributor","http.url": "\u002fsession","exception.stacktrace": "org.openqa.selenium.SessionNotCreatedException: Unable to create session for \u003cCreateSessionRequest with Capabilities {browserName: MicrosoftEdge, ms:edgeChromium: true, ms:edgeOptions: {args: [--no-sandbox, --ignore-certificate-errors, --disable-dev-shm-usage, --ignore-urlfetcher-cert-re..., --lang=ja], prefs: {download.default_directory: C:\\Users\\nicolae.farcas\\Des...}}}>\nBuild info: version: '4.0.0-alpha-7', revision: '117b9d61c9'\nSystem info: host: '836e92c76b1f', ip: '172.17.0.5', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.184-linuxkit', java.version: '1.8.0_265'\nDriver info: driver.version: unknown\n\tat org.openqa.selenium.grid.distributor.model.Slot.lambda$onReserve$1(Slot.java:86)\n\tat java.util.Optional.orElseThrow(Optional.java:290)\n\tat org.openqa.selenium.grid.distributor.model.Slot.lambda$onReserve$2(Slot.java:85)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor.newSession(LocalDistributor.java:208)\n\tat org.openqa.selenium.grid.distributor.Distributor.lambda$new$0(Distributor.java:89)\n\tat org.openqa.selenium.remote.http.Route$TemplatizedRoute.handle(Route.java:183)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:67)\n\tat org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:327)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:67)\n\tat org.openqa.selenium.grid.distributor.Distributor.execute(Distributor.java:124)\n\tat org.openqa.selenium.remote.tracing.SpanWrappedHttpHandler.execute(SpanWrappedHttpHandler.java:86)\n\tat org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)\n\tat org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:327)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:67)\n\tat org.openqa.selenium.grid.router.Router.execute(Router.java:85)\n\tat org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)\n\tat org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:327)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:67)\n\tat org.openqa.selenium.grid.server.AddWebDriverSpecHeaders.lambda$apply$0(AddWebDriverSpecHeaders.java:30)\n\tat org.openqa.selenium.grid.server.WrapExceptions.lambda$apply$0(WrapExceptions.java:36)\n\tat org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)\n\tat org.openqa.selenium.netty.server.SeleniumHandler.lambda$channelRead0$0(SeleniumHandler.java:46)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\n","http.method": "POST"}}
And the nodeConfig.json:
{
"capabilities":
[
{
"browserName": "MicrosoftEdge",
"maxInstances": 5,
"seleniumProtocol": "WebDriver",
"version": "88.0.692.0",
"applicationName": "Edge Node",
"webdriver.edge.driver": "msedgedriver",
"ms:edgeChromium": true
}
],
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 20,
"port": -1,
"register": true,
"registerCycle": 5000,
"hub": "http://192.168.50.16:4444",
"nodeStatusCheckTimeout": 5000,
"nodePolling": 5000,
"unregisterIfStillDownAfter": 60000,
"downPollingLimit": 5,
"debug": false,
"servlets" : [],
"withoutServlets": [],
"custom": {}
}
Test output:
System.InvalidOperationException
Unable to create session for <CreateSessionRequest with Capabilities {browserName: MicrosoftEdge, ms:edgeChromium: true, ms:edgeOptions: {args: [--no-sandbox, --ignore-certificate-errors, --disable-dev-shm-usage, --ignore-urlfetcher-cert-re..., --lang=ja], prefs: {download.default_directory: C:\Users\nicolae.farcas\Des...}}}>
Build info: version: '4.0.0-alpha-7', revision: '117b9d61c9'
System info: host: '836e92c76b1f', ip: '172.17.0.5', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.184-linuxkit', java.version: '1.8.0_265'
Driver info: driver.version: unknown (SessionNotCreated)
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities, TimeSpan commandTimeout)
EDIT 1:
When trying to run selenium alpha-7 as a node, i get this:
root#docker-desktop:/# java -jar standalone-4.0-alpha-7.jar node --allow-cors --publish-events tcp://192.168.50.16:4442 --subscribe-events tcp://192.168.50.16:4443 --config nodeConfig.json
15:26:00.250 INFO [LogManager$RootLogger.log] - Using the system default encoding
15:26:00.253 INFO [LoggingOptions.getTracer] - Using OpenTelemetry for tracing
15:26:00.253 INFO [LoggingOptions.createTracer] - Using OpenTelemetry for tracing
15:26:00.319 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://192.168.50.16:4442 and tcp://192.168.50.16:4443
15:26:00.358 INFO [UnboundZmqEventBus.<init>] - Sockets created
15:26:00.360 INFO [UnboundZmqEventBus.lambda$new$7] - Bus started
15:26:00.576 INFO [NodeServer.createHandlers] - Reporting self as: http://192.168.65.3:5555
15:26:00.581 INFO [LoggingOptions.getTracer] - Using OpenTelemetry for tracing
15:26:00.583 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://192.168.50.16:4442 and tcp://192.168.50.16:4443
15:26:00.585 INFO [UnboundZmqEventBus.<init>] - Sockets created
15:26:00.586 INFO [UnboundZmqEventBus.lambda$new$7] - Bus started
Exception in thread "main" java.lang.IllegalArgumentException: Unable to find class: org.openqa.selenium.grid.node.local.LocalNodeFactory
at org.openqa.selenium.grid.config.Config.getClass(Config.java:74)
at org.openqa.selenium.grid.config.MemoizedConfig.lambda$getClass$4(MemoizedConfig.java:99)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1688)
at org.openqa.selenium.grid.config.MemoizedConfig.getClass(MemoizedConfig.java:95)
at org.openqa.selenium.grid.node.config.NodeOptions.getNode(NodeOptions.java:74)
at org.openqa.selenium.grid.node.httpd.NodeServer.createHandlers(NodeServer.java:122)
at org.openqa.selenium.grid.node.httpd.NodeServer.asServer(NodeServer.java:176)
at org.openqa.selenium.grid.node.httpd.NodeServer.execute(NodeServer.java:217)
at org.openqa.selenium.grid.TemplateGridCommand.lambda$configure$2(TemplateGridCommand.java:98)
at org.openqa.selenium.grid.Main.launch(Main.java:154)
at org.openqa.selenium.grid.Main.go(Main.java:88)
at org.openqa.selenium.grid.Main.main(Main.java:54)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.openqa.selenium.grid.config.Config.getClass(Config.java:69)
... 11 more
Caused by: java.lang.NoSuchMethodError: java.io.FileReader.<init>(Ljava/io/File;Ljava/nio/charset/Charset;)V
at org.openqa.selenium.net.LinuxEphemeralPortRangeDetector.getInstance(LinuxEphemeralPortRangeDetector.java:36)
at org.openqa.selenium.net.PortProber.<clinit>(PortProber.java:42)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:401)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:119)
at org.openqa.selenium.chrome.ChromeDriverInfo.isAvailable(ChromeDriverInfo.java:57)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
at org.openqa.selenium.grid.node.config.NodeOptions.discoverDrivers(NodeOptions.java:187)
at org.openqa.selenium.grid.node.config.NodeOptions.getSessionFactories(NodeOptions.java:84)
at org.openqa.selenium.grid.node.local.LocalNodeFactory.create(LocalNodeFactory.java:66)
... 16 more
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions prior to 1.8.
SLF4J: Ignoring binding found at [jar:file:/standalone-4.0-alpha-7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#ignoredBindings for an explanation.
EDIT 2:
After updating to Java 11, the error from EDIT 1 is gone but I am still seeing issues running the tests. The grid at /status tells me it's up but when I try running tests I get this:
From the tests:
OpenQA.Selenium.WebDriverTimeoutException
Unauthorized access attempted to
Build info: version: '4.0.0-alpha-7', revision: '117b9d61c9'
System info: host: '836e92c76b1f', ip: '172.17.0.5', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.184-linuxkit', java.version: '1.8.0_265'
Driver info: driver.version: unknown
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities, TimeSpan commandTimeout)
From the hub:
16:26:36.171 WARN [SpanWrappedHttpHandler.execute] - Unable to execute request: Unauthorized access attempted to
Build info: version: '4.0.0-alpha-7', revision: '117b9d61c9'
System info: host: '836e92c76b1f', ip: '172.17.0.5', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.184-linuxkit', java.version: '1.8.0_265'
Driver info: driver.version: unknown
org.openqa.selenium.WebDriverException: Unauthorized access attempted to
Build info: version: '4.0.0-alpha-7', revision: '117b9d61c9'
System info: host: '836e92c76b1f', ip: '172.17.0.5', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.184-linuxkit', java.version: '1.8.0_265'
Driver info: driver.version: unknown
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.grid.web.ErrorCodec.decode(ErrorCodec.java:141)
at org.openqa.selenium.grid.web.Values.get(Values.java:47)
at org.openqa.selenium.grid.node.remote.RemoteNode.newSession(RemoteNode.java:114)
at org.openqa.selenium.grid.distributor.model.Slot.lambda$onReserve$2(Slot.java:84)
at org.openqa.selenium.grid.distributor.local.LocalDistributor.newSession(LocalDistributor.java:208)
at org.openqa.selenium.grid.distributor.Distributor.lambda$new$0(Distributor.java:89)
at org.openqa.selenium.remote.http.Route$TemplatizedRoute.handle(Route.java:183)
at org.openqa.selenium.remote.http.Route.execute(Route.java:67)
at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:327)
at org.openqa.selenium.remote.http.Route.execute(Route.java:67)
at org.openqa.selenium.grid.distributor.Distributor.execute(Distributor.java:124)
at org.openqa.selenium.remote.tracing.SpanWrappedHttpHandler.execute(SpanWrappedHttpHandler.java:86)
at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)
at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:327)
at org.openqa.selenium.remote.http.Route.execute(Route.java:67)
at org.openqa.selenium.grid.router.Router.execute(Router.java:85)
at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)
at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:327)
at org.openqa.selenium.remote.http.Route.execute(Route.java:67)
at org.openqa.selenium.grid.server.AddWebDriverSpecHeaders.lambda$apply$0(AddWebDriverSpecHeaders.java:30)
at org.openqa.selenium.grid.server.WrapExceptions.lambda$apply$0(WrapExceptions.java:36)
at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)
at org.openqa.selenium.netty.server.SeleniumHandler.lambda$channelRead0$0(SeleniumHandler.java:46)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
16:26:36.172 WARN [LoggingOptions$1.lambda$export$1] - {"traceId": "6c98780410750ac145fcc0bcdc6075f1","spanId": "1a237f64fb417958","spanKind": "INTERNAL","eventTime": 1605716796170301100,"eventName": "exception","attributes": {"exception.type": "org.openqa.selenium.WebDriverException","exception.message": "Unable to execute request: Unauthorized access attempted to \nBuild info: version: '4.0.0-alpha-7', revision: '117b9d61c9'\nSystem info: host: '836e92c76b1f', ip: '172.17.0.5', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.184-linuxkit', java.version: '1.8.0_265'\nDriver info: driver.version: unknown","http.handler_class": "org.openqa.selenium.grid.distributor.local.LocalDistributor","http.url": "\u002fsession","exception.stacktrace": "org.openqa.selenium.WebDriverException: Unauthorized access attempted to \nBuild info: version: '4.0.0-alpha-7', revision: '117b9d61c9'\nSystem info: host: '836e92c76b1f', ip: '172.17.0.5', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.184-linuxkit', java.version: '1.8.0_265'\nDriver info: driver.version: unknown\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:423)\n\tat org.openqa.selenium.grid.web.ErrorCodec.decode(ErrorCodec.java:141)\n\tat org.openqa.selenium.grid.web.Values.get(Values.java:47)\n\tat org.openqa.selenium.grid.node.remote.RemoteNode.newSession(RemoteNode.java:114)\n\tat org.openqa.selenium.grid.distributor.model.Slot.lambda$onReserve$2(Slot.java:84)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor.newSession(LocalDistributor.java:208)\n\tat org.openqa.selenium.grid.distributor.Distributor.lambda$new$0(Distributor.java:89)\n\tat org.openqa.selenium.remote.http.Route$TemplatizedRoute.handle(Route.java:183)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:67)\n\tat org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:327)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:67)\n\tat org.openqa.selenium.grid.distributor.Distributor.execute(Distributor.java:124)\n\tat org.openqa.selenium.remote.tracing.SpanWrappedHttpHandler.execute(SpanWrappedHttpHandler.java:86)\n\tat org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)\n\tat org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:327)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:67)\n\tat org.openqa.selenium.grid.router.Router.execute(Router.java:85)\n\tat org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)\n\tat org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:327)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:67)\n\tat org.openqa.selenium.grid.server.AddWebDriverSpecHeaders.lambda$apply$0(AddWebDriverSpecHeaders.java:30)\n\tat org.openqa.selenium.grid.server.WrapExceptions.lambda$apply$0(WrapExceptions.java:36)\n\tat org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)\n\tat org.openqa.selenium.netty.server.SeleniumHandler.lambda$channelRead0$0(SeleniumHandler.java:46)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\n","http.method": "POST"}}
From the node:
16:26:36.070 WARN [RequiresSecretFilter.isSecretMatch] - Unexpectedly received registration secret to (POST) /se/grid/node/session
16:26:36.078 WARN [LoggingOptions$1.lambda$export$0] - {"traceId": "7bd8f4e2a6a68f396b4d73d7ce41920e","spanId": "413eadfe028cb4f3","spanKind": "INTERNAL","eventTime": 1605716796076570700,"eventName": "HTTP request execution complete","attributes": {"http.status_code": 401,"http.handler_class": "org.openqa.selenium.grid.security.RequiresSecretFilter$$Lambda$356\u002f0x0000000840219040","http.url": "\u002fse\u002fgrid\u002fnode\u002fsession","http.method": "POST"}}
16:26:36.164 WARN [RequiresSecretFilter.isSecretMatch] - Unexpectedly received registration secret to (POST) /se/grid/node/session
16:26:36.165 WARN [LoggingOptions$1.lambda$export$0] - {"traceId": "c71c7cc95c85b1d892a913a8487a3bb3","spanId": "e7cad4724bde618f","spanKind": "INTERNAL","eventTime": 1605716796164917000,"eventName": "HTTP request execution complete","attributes": {"http.status_code": 401,"http.handler_class": "org.openqa.selenium.grid.security.RequiresSecretFilter$$Lambda$356\u002f0x0000000840219040","http.url": "\u002fse\u002fgrid\u002fnode\u002fsession","http.method": "POST"}}
16:26:45.135 INFO [LoggingOptions$1.lambda$export$0] - {"traceId": "f9aa30acdd23b666a00fd12d1e9171de","spanId": "3a26d851115e4ed8","spanKind": "INTERNAL","eventTime": 1605716805135500700,"eventName": "HTTP request execution complete","attributes": {"http.status_code": 200,"http.handler_class": "org.openqa.selenium.remote.http.Route$TemplatizedRoute","http.url": "\u002fstatus","http.method": "GET"}}
16:26:56.789 INFO [LoggingOptions$1.lambda$export$0] - {"traceId": "0be52be996fecb3cfeb4981cc69e4719","spanId": "034962023cad771b","spanKind": "INTERNAL","eventTime": 1605716816788987800,"eventName": "HTTP request execution complete","attributes": {"http.status_code": 200,"http.handler_class": "org.openqa.selenium.remote.http.Route$TemplatizedRoute","http.url": "\u002fstatus","http.method": "GET"}}
Remove:
"webdriver.edge.driver": "msedgedriver",
from capabilities, and add:
-Dwebdriver.edge.driver=/path/to/msedgedriver
to your node call. For example:
java -jar /path/to/selenium-standalone.jar -Dwebdriver.edge.driver=/path/to/msedgedriver -role node -nodeConfig /path/to/node-config.json
Ah, and your browserName must be MicrosoftEdge (you have it, but mentioning it for others reading this).
This worked for me for Selenium 3.
data:, shown in the chrome url bar when I execute the following Selenium ChromeWebdrive Script. Is the because other instance of chrome browser are working?
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class ChromWebdriverWindows {
public static void main(String[] args) {
//String url = "https://www.google.co.in/";
System.getProperty("webdriver.chrome.driver", "C:\\Automation\\chromedriver_win32\\chromedriver.exe");
WebDriver drive;
drive = new ChromeDriver();
drive.get("https://www.flock.co");
}
}
Getting this error in console:
Starting ChromeDriver 2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067) on port 7264
Only local connections are allowed.
Exception in thread "main" org.openqa.selenium.WebDriverException: java.net.SocketException: Connection reset
Build info: version: 'unknown', revision: '5234b32', time: '2017-03-10 09:00:17 -0800'
System info: host: 'MDVLFARZANS', ip: '192.168.0.106', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:91)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:244)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:178)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:167)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:124)
at ChromWebdriverWindows.main(ChromWebdriverWindows.java:10)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139)
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155)
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:142)
at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:88)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:296)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:113)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
... 8 more
Your code looks fine just replace .getProperty() with .setProperty():
System.getProperty("webdriver.chrome.driver",
"C:\\Automation\\chromedriver_win32\\chromedriver.exe");
with
System.setProperty("webdriver.chrome.driver",
"C:\\Automation\\chromedriver_win32\\chromedriver.exe");
I didn't have this problem before my computer was updated from Windows 7 to Windows 10.
When I try to run my nightwatch test with firefox I get this error:
Running: Sending, Watching, and Sharing a Demo
INFO Request: POST /wd/hub/session
- data: {"desiredCapabilities":{"browserName":"firefox","javascriptEnabled":true,"acceptSslCerts":true,"platform":"ANY","name":"Complete\\sales\\sales Test1"}}
- headers: {"Content-Type":"application/json; charset=utf-8","Content-Length":151}
ERROR Response 500 POST /wd/hub/session (3319ms) { state: 'unhandled error',
sessionId: null,
hCode: 33496070,
value:
{ localizedMessage: '127.0.0.1:7055 failed to respond',
cause: null,
suppressed: [],
message: '127.0.0.1:7055 failed to respond',
hCode: 10341065,
class: 'org.apache.http.NoHttpResponseException',
screen: null },
class: 'org.openqa.selenium.remote.Response',
status: 13 }
Error retrieving a new session from the selenium server
Connection refused! Is selenium server started?
{ state: 'unhandled error',
sessionId: null,
hCode: 33496070,
value:
{ localizedMessage: '127.0.0.1:7055 failed to respond',
cause: null,
suppressed: [],
message: '127.0.0.1:7055 failed to respond',
hCode: 10341065,
class: 'org.apache.http.NoHttpResponseException',
screen: null },
class: 'org.openqa.selenium.remote.Response',
status: 13 }
My selenium debug log lists:
11:08:52.724 INFO - Launching a standalone Selenium Server
Setting system property webdriver.chrome.driver to bin/chromedriver
11:08:52.786 INFO - Java: Oracle Corporation 25.91-b15
11:08:52.786 INFO - OS: Windows 10 10.0 x86
11:08:52.802 INFO - v2.51.0, with Core v2.51.0. Built from revision 1af067d
11:08:52.849 INFO - Driver class not found: com.opera.core.systems.OperaDriver
11:08:52.849 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
11:08:52.849 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform WIN10
11:08:52.948 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
11:08:52.948 INFO - Selenium Server is up and running
11:08:53.427 INFO - Executing: [new session: Capabilities [{acceptSslCerts=true, name=Complete\sales\sales Test1, browserName=firefox, javascriptEnabled=true, platform=ANY}]])
11:08:53.437 INFO - Creating a new session for Capabilities [{acceptSslCerts=true, name=Complete\sales\sales Test1, browserName=firefox, javascriptEnabled=true, platform=ANY}]
11:08:56.532 WARN - Exception thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.51.0', revision: '1af067d', time: '2016-02-05 19:15:17'
System info: host: 'StudioXPS', ip: '10.0.0.46', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_91'
Driver info: driver.version: unknown
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:183)
at org.openqa.selenium.remote.server.DefaultSession.<init>(DefaultSession.java:119)
at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:95)
at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:124)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:59)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:1)
at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:111)
at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:79)
at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:202)
at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:164)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.openqa.jetty.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.openqa.jetty.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:680)
at org.openqa.jetty.jetty.servlet.ServletHandler.handle(ServletHandler.java:571)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)
Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.51.0', revision: '1af067d', time: '2016-02-05 19:15:17'
System info: host: 'StudioXPS', ip: '10.0.0.46', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_91'
Driver info: driver.version: unknown
at org.openqa.selenium.remote.server.FirefoxDriverProvider.callConstructor(FirefoxDriverProvider.java:101)
at org.openqa.selenium.remote.server.FirefoxDriverProvider.newInstance(FirefoxDriverProvider.java:68)
at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
at java.util.concurrent.FutureTask.run(Unknown Source)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.server.FirefoxDriverProvider.callConstructor(FirefoxDriverProvider.java:91)
... 9 more
Caused by: org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.51.0', revision: '1af067d', time: '2016-02-05 19:15:17'
System info: host: 'StudioXPS', ip: '10.0.0.46', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_91'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:665)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:218)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:211)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:129)
... 14 more
Caused by: org.apache.http.NoHttpResponseException: 127.0.0.1:7055 failed to respond
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:143)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:162)
at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:90)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.execute(NewProfileExtensionConnection.java:160)
at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.execute(FirefoxDriver.java:380)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)
... 19 more
11:08:56.548 WARN - Exception: 127.0.0.1:7055 failed to respond
I have tried running the test through selenium standalone versions:
2.53.0
2.52.0
2.51.0
And since the latest firefox version (47.0.1) might not work, I've also tried with 46.0.1.
None of these have fixed the issue. Is there some way to fix this, or will I need to go back to windows 7?
I had the same error and by adding:
"desiredCapabilities": {
"browserName": "firefox",
"javascriptEnabled": true,
"acceptSslCerts": true
},
to the test_settings made my build worked
I am trying to set up a continuous delivery pipeline and an UnreachableBrowserException is always raised.
Here is the full stacktrace:
17:20:05.970 ERROR - org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
17:20:05.977 WARN - Exception thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
System info: host: 'ct-10-0-180-116', ip: '10.0.180.116', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-042stab105.14', java.version: '1.8.0_51'
Driver info: driver.version: unknown
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:183)
at org.openqa.selenium.remote.server.DefaultSession.<init>(DefaultSession.java:119)
at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:95)
at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:125)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:58)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:1)
at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:111)
at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:175)
at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:202)
at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:164)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.openqa.jetty.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.openqa.jetty.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:680)
at org.openqa.jetty.jetty.servlet.ServletHandler.handle(ServletHandler.java:571)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)
Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
System info: host: 'ct-10-0-180-116', ip: '10.0.180.116', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-042stab105.14', java.version: '1.8.0_51'
Driver info: driver.version: unknown
at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:113)
at org.openqa.selenium.remote.server.DefaultDriverProvider.newInstance(DefaultDriverProvider.java:97)
at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
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:422)
at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:103)
... 9 more
Caused by: org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
System info: host: 'ct-10-0-180-116', ip: '10.0.180.116', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-042stab105.14', java.version: '1.8.0_51'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:589)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:141)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:138)
... 14 more
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
System info: host: 'ct-10-0-180-116', ip: '10.0.180.116', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-042stab105.14', java.version: '1.8.0_51'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:170)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:63)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:568)
... 19 more
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:20882/status] to be available after 20010 ms
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:104)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:167)
... 21 more
Caused by: com.google.common.util.concurrent.UncheckedTimeoutException: java.util.concurrent.TimeoutException
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:143)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:79)
... 22 more
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(FutureTask.java:205)
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:130)
... 23 more
17:20:05.986 WARN - Exception: null
/opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108
var template = new Error(this.message);
^
UnknownError: null
at new bot.Error (/opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108:18)
at Object.bot.response.checkResponse (/opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js:109:9)
at /opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:160:24
at [object Object].promise.ControlFlow.runInFrame_ (/opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1857:20)
at [object Object].goog.defineClass.notify (/opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2448:25)
at [object Object].promise.Promise.notify_ (/opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:564:12)
at Array.forEach (native)
at [object Object].promise.Promise.notifyAll_ (/opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:553:15)
at goog.async.run.processWorkQueue (/opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/run.js:130:15)
at runMicrotasksCallback (node.js:337:7)
From: Task: WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession_ (/opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22)
at Function.webdriver.WebDriver.createSession (/opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30)
at [object Object].Builder.build (/opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/builder.js:445:22)
at [object Object].DriverProvider.getNewDriver (/opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/lib/driverProviders/driverProvider.js:38:7)
at [object Object].Runner.createBrowser (/opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/lib/runner.js:182:37)
at /opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/lib/runner.js:263:21
at _fulfilled (/opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/node_modules/q/q.js:797:54)
at self.promiseDispatch.done (/opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/node_modules/q/q.js:826:30)
at Promise.promise.promiseDispatch (/opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/node_modules/q/q.js:759:13)
at /opt/local/nvm/versions/node/v0.12.0/lib/node_modules/protractor/node_modules/q/q.js:525:49
[launcher] Process exited with error code 1
Here are the relevant parts from my bash script:
#Install protractor and webdriver & start webdriver
npm install -g protractor
webdriver-manager update
webdriver-manager start&
#Install and start application
./gradlew assemble
java -jar bignibou-server/build/libs/bignibou-server.jar&
#Run end2end tests
protractor bignibou-client/protractor.conf.js
Can someone please help?
edit 1: from protractor.conf.js
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['test/e2e/*.spec.e2e.js']
};
if (process.env.SNAP_CI) {
exports.config.chromeDriver = '/usr/local/bin/chromedriver';
}
edit 2: from my end2end test:
describe('Signin page', function () {
beforeEach(function(){
browser.get('http://localhost:8080/#/signin');
browser.refresh();
});
it('should allow user to signin', function () {
element(by.model('credentials.username')).sendKeys('balteo#example.fr');
element(by.model('credentials.password')).sendKeys('------');
element(by.id('submit')).click();
expect(element(by.tagName('h2')).getText()).toBe('Dashboard');
});
});
import org.apache.xpath.operations.String;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class First {
public static void main(String[] args)
{
WebDriver driver=new FirefoxDriver();
driver.get("www.facebook.com");
driver.manage().window().maximize();
}
}
I am getting this error when I am trying to run it in Eclipse Kepler:
Exception in thread "main" org.openqa.selenium.WebDriverException: f.QueryInterface is not a function
Command duration or timeout: 18 milliseconds
Build info: version: '2.46.0', revision: '87c69e2', time: '2015-06-04 16:17:10'
System info: host: 'Jyoti-PC', ip: '192.168.112.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_40'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=37.0.1, platform=WINDOWS, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: a35eb217-b3b2-4de8-abc2-4e72ceb06916
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:605)
at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:306)
at first.main(first.java:10)
Caused by: org.openqa.selenium.WebDriverException: f.QueryInterface is not a function
Build info: version: '2.46.0', revision: '87c69e2', time: '2015-06-04 16:17:10'
System info: host: 'Jyoti-PC', ip: '192.168.112.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_40'
Driver info: driver.version: unknown
at .FirefoxDriver.prototype.get(file:///C:/Users/Jyoti/AppData/Local/Temp/anonymous573077067589922398webdriver-profile/extensions/fxdriver#googlecode.com/components/driver-component.js:10160)
at .DelayedCommand.prototype.executeInternal_/h(file:///C:/Users/Jyoti/AppData/Local/Temp/anonymous573077067589922398webdriver-profile/extensions/fxdriver#googlecode.com/components/command-processor.js:12282)
at .DelayedCommand.prototype.executeInternal_(file:///C:/Users/Jyoti/AppData/Local/Temp/anonymous573077067589922398webdriver-profile/extensions/fxdriver#googlecode.com/components/command-processor.js:12287)
at .DelayedCommand.prototype.execute/<(file:///C:/Users/Jyoti/AppData/Local/Temp/anonymous573077067589922398webdriver-profile/extensions/fxdriver#googlecode.com/components/command-processor.js:12229)
Exception in thread "main" org.openqa.selenium.WebDriverException: f.QueryInterface is not a function
This exception happens because you are trying to get() a URL that's not prefixed with http:// or https://
driver.get("https://www.facebook.com");