How to handle error 302 in the scrapy shell - scrapy

I' trying to scrape a page I'm getting redirected, I try setting an user agent but it didn't work either.
I saw this in other question:
meta = {'dont_redirect': True,'handle_httpstatus_list': [302]}
How can I test that in the scrapy shell?

When using scrapy shell, the simplest way is probably to just disable RedirectMiddleware with a REDIRECT_ENABLED=0 setting on the command line.
Compare this, disabling redirections altogether:
$ scrapy shell -s REDIRECT_ENABLED=0
2016-02-09 10:16:27 [scrapy] INFO: Scrapy 1.0.4 started (bot: scrapybot)
2016-02-09 10:16:27 [scrapy] INFO: Optional features available: ssl, http11
2016-02-09 10:16:27 [scrapy] INFO: Overridden settings: {'REDIRECT_ENABLED': '0', 'LOGSTATS_INTERVAL': 0, 'DUPEFILTER_CLASS': 'scrapy.dupefilters.BaseDupeFilter'}
2016-02-09 10:16:30 [scrapy] INFO: Enabled extensions: CloseSpider, TelnetConsole, CoreStats, SpiderState
2016-02-09 10:16:32 [scrapy] INFO: Enabled downloader middlewares:
HttpAuthMiddleware,
DownloadTimeoutMiddleware,
UserAgentMiddleware,
RetryMiddleware,
DefaultHeadersMiddleware,
MetaRefreshMiddleware,
HttpCompressionMiddleware,
CookiesMiddleware,
ChunkedTransferMiddleware,
DownloaderStats
2016-02-09 10:16:33 [scrapy] INFO: Enabled spider middlewares: HttpErrorMiddleware, OffsiteMiddleware, RefererMiddleware, UrlLengthMiddleware, DepthMiddleware
2016-02-09 10:16:33 [scrapy] INFO: Enabled item pipelines:
2016-02-09 10:16:33 [scrapy] DEBUG: Telnet console listening on 127.0.0.1:6023
2016-02-09 10:16:39 [root] DEBUG: Using default logger
(you can notice that RedirectMiddleware is not in the list of "Enabled downloader middlewares")
with the default :
$ scrapy shell
2016-02-09 10:17:18 [scrapy] INFO: Scrapy 1.0.4 started (bot: scrapybot)
2016-02-09 10:17:18 [scrapy] INFO: Optional features available: ssl, http11
2016-02-09 10:17:18 [scrapy] INFO: Overridden settings: {'LOGSTATS_INTERVAL': 0, 'DUPEFILTER_CLASS': 'scrapy.dupefilters.BaseDupeFilter'}
2016-02-09 10:17:19 [scrapy] INFO: Enabled extensions: CloseSpider, TelnetConsole, CoreStats, SpiderState
2016-02-09 10:17:19 [scrapy] INFO: Enabled downloader middlewares:
HttpAuthMiddleware,
DownloadTimeoutMiddleware,
UserAgentMiddleware,
RetryMiddleware,
DefaultHeadersMiddleware,
MetaRefreshMiddleware,
HttpCompressionMiddleware,
RedirectMiddleware,
CookiesMiddleware,
ChunkedTransferMiddleware,
DownloaderStats
2016-02-09 10:17:19 [scrapy] INFO: Enabled spider middlewares: HttpErrorMiddleware, OffsiteMiddleware, RefererMiddleware, UrlLengthMiddleware, DepthMiddleware
2016-02-09 10:17:19 [scrapy] INFO: Enabled item pipelines:
2016-02-09 10:17:19 [scrapy] DEBUG: Telnet console listening on 127.0.0.1:6023
2016-02-09 10:17:19 [root] DEBUG: Using default logger

Related

Not able to run selenium test jar in ec2

I am new to selenium and by help of some blogs and videos and i made a java selenium test in eclipse which is running perfectly fine, but my goal is to run the file on an ec2. I exported the jar and tried to run it on a ubuntu VM, but it is not running and giving the error as mentioned below. Any help would be appreciated.
Microsoft Edge WebDriver was started successfully.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: chrome not reachable
Host info: host: 'ip-192-168-2-75', ip: '192.168.2.75'
Build info: version: '4.7.1', revision: 'c6795baf1a3'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.0-1027-aws', java.version: '11.0.17'
Driver info: org.openqa.selenium.edge.EdgeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: MicrosoftEdge, ms:edgeOptions: {args: [], extensions: []}}], desiredCapabilities=Capabilities {browserName: MicrosoftEdge, ms:edgeOptions: {args: [], extensions: []}}}]
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:148)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:106)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:67)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:156)
at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:167)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:142)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:551)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:244)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:159)
at org.openqa.selenium.chromium.ChromiumDriver.(ChromiumDriver.java:101)
at org.openqa.selenium.edge.EdgeDriver.(EdgeDriver.java:54)
at org.openqa.selenium.edge.EdgeDriver.(EdgeDriver.java:46)
at org.openqa.selenium.edge.EdgeDriver.(EdgeDriver.java:42)
at ui.SureSMSTest.main(SureSMSTest.java:36)

Selenium 4, Microsoft Edge(chromium) on Ubuntu

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.

Detox server doesn't get initialized on iOS and JavaScript Timers -> busy Javascript Timers

I am trying to make e2e tests using Detox
and i have faced problem as Detox server doesn't get initialized
and I get the following too :
detox[48831] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8)
I hope that logs are not too long but here are the logs that I have in the artifact.
4D59B341-1D72-4537-A7A6-2685607D41FC 2020-02-19 15-16-51Z.startup
detox[48831] INFO: [DetoxServer.js] server listening on localhost:50871...
detox[48831] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:50871
detox[48831] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8
detox[48831] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8
detox[48831] DEBUG: [exec.js/EXEC_CMD, #0] applesimutils --list --byType "iPhone X"
detox[48831] DEBUG: [exec.js/EXEC_CMD, #1] applesimutils --list --byId 4D59B341-1D72-4537-A7A6-2685607D41FC --maxResults 1
detox[48831] DEBUG: [exec.js/EXEC_CMD, #2] /usr/bin/xcrun simctl uninstall 4D59B341-1D72-4537-A7A6-2685607D41FC com.snowflake.hike
detox[48831] DEBUG: [exec.js/EXEC_TRY, #2] Uninstalling com.snowflake.hike...
detox[48831] DEBUG: [exec.js/EXEC_SUCCESS, #2] com.snowflake.hike uninstalled
detox[48831] DEBUG: [exec.js/EXEC_CMD, #3] /usr/bin/xcrun simctl install 4D59B341-1D72-4537-A7A6-2685607D41FC "/Users/snowflake/DevSquads/snowflake/snowflake-react-native/ios/build/snowflake/Build/Products/Debug-iphonesimulator/snowflake.app"
detox[48831] DEBUG: [exec.js/EXEC_TRY, #3] Installing /Users/snowflake/DevSquads/snowflake/snowflake-react-native/ios/build/snowflake/Build/Products/Debug-iphonesimulator/snowflake.app...
detox[48831] DEBUG: [exec.js/EXEC_SUCCESS, #3] /Users/snowflake/DevSquads/snowflake/snowflake-react-native/ios/build/snowflake/Build/Products/Debug-iphonesimulator/snowflake.app installed
detox[48831] DEBUG: [exec.js/EXEC_CMD, #4] /usr/bin/xcrun simctl terminate 4D59B341-1D72-4537-A7A6-2685607D41FC com.snowflake.hike
detox[48831] DEBUG: [exec.js/EXEC_TRY, #4] Terminating com.snowflake.hike...
detox[48831] DEBUG: [exec.js/EXEC_SUCCESS, #4] com.snowflake.hike terminated
detox[48831] DEBUG: [exec.js/EXEC_CMD, #5] /usr/bin/xcrun simctl get_app_container 4D59B341-1D72-4537-A7A6-2685607D41FC com.snowflake.hike
detox[48831] DEBUG: [exec.js/SPAWN_CMD, #6] [pid=48872] /usr/bin/xcrun simctl spawn 4D59B341-1D72-4537-A7A6-2685607D41FC log stream --level debug --style compact --predicate "processImagePath beginsWith \"/Users/snowflake/Library/Developer/CoreSimulator/Devices/4D59B341-1D72-4537-A7A6-2685607D41FC/data/Containers/Bundle/Application/0C2DE3FE-41FB-40C4-A0A6-7EC5819FD51E/snowflake.app\""
detox[48831] DEBUG: [exec.js/EXEC_CMD, #7] SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/snowflake/Library/Detox/ios/647caee43d053e07344915b0d5b71c85cb0b4733/Detox.framework/Detox" /usr/bin/xcrun simctl launch 4D59B341-1D72-4537-A7A6-2685607D41FC com.snowflake.hike --args -detoxServer "ws://localhost:50871" -detoxSessionId "c5f11579-4c6f-6735-87be-96d91fe111d8" -detoxPrintBusyIdleResources "YES"
detox[48831] DEBUG: [exec.js/EXEC_TRY, #7] Launching com.snowflake.hike...
detox[48831] DEBUG: [exec.js/EXEC_CMD, #8] /usr/bin/xcrun simctl get_app_container 4D59B341-1D72-4537-A7A6-2685607D41FC com.snowflake.hike
detox[48831] INFO: [AppleSimUtils.js] com.snowflake.hike launched. To watch simulator logs, run:
/usr/bin/xcrun simctl spawn 4D59B341-1D72-4537-A7A6-2685607D41FC log stream --level debug --style compact --predicate 'process == snowflake'
detox[48831] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8)
detox[48831] DEBUG: [DetoxServer.js/LOGIN] role=testee, sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8
detox[48831] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=testee, sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8
detox[48831] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 48872]: /usr/bin/xcrun simctl spawn 4D59B341-1D72-4537-A7A6-2685607D41FC log stream --level debug --style compact --predicate processImagePath beginsWith "/Users/snowflake/Library/Developer/CoreSimulator/Devices/4D59B341-1D72-4537-A7A6-2685607D41FC/data/Containers/Bundle/Application/0C2DE3FE-41FB-40C4-A0A6-7EC5819FD51E/snowflake.app"
detox[48831] DEBUG: [exec.js/EXEC_CMD, #9] /usr/bin/xcrun simctl get_app_container 4D59B341-1D72-4537-A7A6-2685607D41FC com.snowflake.hike
detox[48831] DEBUG: [exec.js/SPAWN_CMD, #10] [pid=49499] /usr/bin/xcrun simctl spawn 4D59B341-1D72-4537-A7A6-2685607D41FC log stream --level debug --style compact --predicate "processImagePath beginsWith \"/Users/snowflake/Library/Developer/CoreSimulator/Devices/4D59B341-1D72-4537-A7A6-2685607D41FC/data/Containers/Bundle/Application/0C2DE3FE-41FB-40C4-A0A6-7EC5819FD51E/snowflake.app\""
detox[48831] DEBUG: [exec.js/EXEC_CMD, #11] /usr/bin/xcrun simctl io 4D59B341-1D72-4537-A7A6-2685607D41FC screenshot "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/ac4574f8-0716-40bd-9cdc-bc4dc6d0ffdb.detox.png"
detox[48831] DEBUG: [exec.js/SPAWN_CMD, #12] [pid=49503] /usr/bin/xcrun simctl io 4D59B341-1D72-4537-A7A6-2685607D41FC recordVideo /private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/c0179e52-2fb0-49ab-90b8-30dc9dfa43db.detox.mp4
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync WXRunLoopIdlingResource: React Native thread is busy.
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync WXRunLoopIdlingResource: React Native thread is busy.
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync Timer: Tracking Timer <__NSCFTimer: 0x600003b0dd40>
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync Timer: Tracking Timer <__NSCFTimer: 0x600003b0dd40>
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync Timer: Tracking Timer <__NSCFTimer: 0x600003b0dd40>
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync WXRunLoopIdlingResource: React Native thread is busy.
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync WXRunLoopIdlingResource: React Native thread is busy.
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.facebook.react.ShadowQueue
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync WXRunLoopIdlingResource: React Native thread is busy.
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.facebook.react.ShadowQueue
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync WXRunLoopIdlingResource: React Native thread is busy.
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync WXRunLoopIdlingResource: React Native thread is busy.
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.facebook.react.ShadowQueue
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync WXRunLoopIdlingResource: React Native thread is busy.
detox[48831] DEBUG: [exec.js/EXEC_CMD, #13] /usr/bin/xcrun simctl io 4D59B341-1D72-4537-A7A6-2685607D41FC screenshot "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/f98b8fab-208a-4d78-8153-d261dce44d90.detox.png"
detox[48831] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 49503]: /usr/bin/xcrun simctl io 4D59B341-1D72-4537-A7A6-2685607D41FC recordVideo /private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/c0179e52-2fb0-49ab-90b8-30dc9dfa43db.detox.mp4
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] DEBUG: [SimulatorRecordVideoPlugin.js/MOVE_FILE] moving "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/c0179e52-2fb0-49ab-90b8-30dc9dfa43db.detox.mp4" to artifacts/ios.sim.debug.2020-02-19 15-07-46Z/✗ Example should show GET STARTED button/test.mp4
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] DEBUG: [Artifact.js/MOVE_FILE] moving "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/ac4574f8-0716-40bd-9cdc-bc4dc6d0ffdb.detox.png" to artifacts/ios.sim.debug.2020-02-19 15-07-46Z/✗ Example should show GET STARTED button/testStart.png
detox[48831] DEBUG: [Artifact.js/MOVE_FILE] moving "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/f98b8fab-208a-4d78-8153-d261dce44d90.detox.png" to artifacts/ios.sim.debug.2020-02-19 15-07-46Z/✗ Example should show GET STARTED button/testDone.png
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 49499]: /usr/bin/xcrun simctl spawn 4D59B341-1D72-4537-A7A6-2685607D41FC log stream --level debug --style compact --predicate processImagePath beginsWith "/Users/snowflake/Library/Developer/CoreSimulator/Devices/4D59B341-1D72-4537-A7A6-2685607D41FC/data/Containers/Bundle/Application/0C2DE3FE-41FB-40C4-A0A6-7EC5819FD51E/snowflake.app"
detox[48831] WARN: [Client.js/PENDING_REQUESTS] App has not responded to the network requests below:
(id = 1) invoke: {"target":{"type":"Invocation","value":{"target":{"type":"EarlGrey","value":"instance"},"method":"detox_selectElementWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"detoxMatcherForText:","args":[{"type":"NSString","value":"Personalized to You"}]}}]}},"method":"assertWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"matcherForSufficientlyVisible","args":[]}}]}
(id = -1000) reactNativeReload: {}
That might be the reason why the test "Example should show GET STARTED button" has timed out.
detox[48831] DEBUG: [SimulatorLogRecording.js/MOVE_FILE] moving "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/90c3bf5e-026e-42f8-a462-d8d32e57fd77.detox.log" to artifacts/ios.sim.debug.2020-02-19 15-07-46Z/✗ Example should show GET STARTED button/process.log
detox[48831] DEBUG: [SimulatorLogRecording.js/MOVE_FILE] moving "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/864b0986-f94b-481a-8f81-6132f73f6558.detox.log" to artifacts/ios.sim.debug.2020-02-19 15-07-46Z/4D59B341-1D72-4537-A7A6-2685607D41FC 2020-02-19 15-16-51Z.startup.log
detox[48831] DEBUG: [Artifact.js/MOVE_FILE] moving "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/053ef6fa-1c4f-4f4a-bfc7-c7a0973c182a.detox.log" to artifacts/ios.sim.debug.2020-02-19 15-07-46Z/detox_pid_48831.json.log
detox[48831] DEBUG: [Artifact.js/MOVE_FILE] moving "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/dc0d2b5c-4d65-471e-850e-f86af80747d8.detox.log" to artifacts/ios.sim.debug.2020-02-19 15-07-46Z/detox_pid_48831.log
detox[48831] DEBUG: [DetoxServer.js/DISCONNECT] role=tester, sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8
detox[48831] DEBUG: [DetoxServer.js/DISCONNECT] role=testee, sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8
detox[48831] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=tester not connected, cannot fw action (sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8)
detox[48831] DEBUG: [DetoxServer.js/WS_CLOSE] Detox server connections terminated gracefully
process.log
Filtering the log data using "processImagePath BEGINSWITH "/Users/snowflake/Library/Developer/CoreSimulator/Devices/4D59B341-1D72-4537-A7A6-2685607D41FC/data/Containers/Bundle/Application/0C2DE3FE-41FB-40C4-A0A6-7EC5819FD51E/snowflake.app""
Timestamp Ty Process[PID:TID]
2020-02-19 17:12:50.038 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] JavaScript Timers -> busy Javascript Timers
2020-02-19 17:12:50.038 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] JavaScript Timers -> busy Javascript Timers
2020-02-19 17:12:50.038 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] JavaScript Timers -> busy Javascript Timers
2020-02-19 17:12:50.038 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] JavaScript Timers -> busy Javascript Timers
2020-02-19 17:12:50.038 I snowflake[48884:9d3f4] [com.wix.Detox:WXJSTimerObservationIdlingResource] Removing observed timer 17836
2020-02-19 17:12:50.039 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] WXRunLoopIdlingResource -> busy React Native thread is busy.
2020-02-19 17:12:50.039 I snowflake[48884:9d3f4] [com.wix.Detox:WXJSTimerObservationIdlingResource] Observing timer: 17837 d: 0.001 r: 0
2020-02-19 17:12:50.039 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] WXRunLoopIdlingResource -> busy React Native thread is busy.
2020-02-19 17:12:50.039 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] JavaScript Timers -> busy Javascript Timers
2020-02-19 17:12:50.039 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] JavaScript Timers -> busy Javascript Timers
2020-02-19 17:12:50.039 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] JavaScript Timers -> busy Javascript Timers
2020-02-19 17:12:50.054 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] JavaScript Timers -> busy Javascript Timers
2020-02-19 17:12:50.055 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] JavaScript Timers -> busy Javascript Timers
2020-02-19 17:12:50.055 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] JavaScript Timers -> busy Javascript Timers
2020-02-19 17:12:50.055 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] JavaScript Timers -> busy Javascript Timers
2020-02-19 17:12:50.055 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] JavaScript Timers -> busy Javascript Timers
2020-02-19 17:12:50.055 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] JavaScript Timers -> busy Javascript Timers
2020-02-19 17:12:50.055 I snowflake[48884:9d3f4] [com.wix.Detox:WXJSTimerObservationIdlingResource] Removing observed timer 17837
2020-02-19 17:12:50.055 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] WXRunLoopIdlingResource -> busy React Native thread is busy.
2020-02-19 17:12:50.055 I snowflake[48884:9d3f4] [com.wix.Detox:WXJSTimerObservationIdlingResource] Observing timer: 17838 d: 0.001 r: 0
2020-02-19 17:12:50.056 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] WXRunLoopIdlingResource -> busy React Native thread is busy.
2020-02-19 17:12:50.056 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] JavaScript Timers -> busy Javascript Timers
2020-02-19 17:12:50.056 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] JavaScript Timers -> busy Javascript Timers
2020-02-19 17:12:50.056 Db snowflake[48884:9d39b] [com.wix.Detox:EarlGreyStatistics] JavaScript Timers -> busy Javascript Timers
detox_pid_48831.log
detox[48831] INFO: [DetoxServer.js] server listening on localhost:50871...
detox[48831] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:50871
detox[48831] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8
detox[48831] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8
detox[48831] DEBUG: [exec.js/EXEC_CMD, #0] applesimutils --list --byType "iPhone X"
detox[48831] DEBUG: [exec.js/EXEC_CMD, #1] applesimutils --list --byId 4D59B341-1D72-4537-A7A6-2685607D41FC --maxResults 1
detox[48831] DEBUG: [exec.js/EXEC_CMD, #2] /usr/bin/xcrun simctl uninstall 4D59B341-1D72-4537-A7A6-2685607D41FC com.snowflake.hike
detox[48831] DEBUG: [exec.js/EXEC_TRY, #2] Uninstalling com.snowflake.hike...
detox[48831] DEBUG: [exec.js/EXEC_SUCCESS, #2] com.snowflake.hike uninstalled
detox[48831] DEBUG: [exec.js/EXEC_CMD, #3] /usr/bin/xcrun simctl install 4D59B341-1D72-4537-A7A6-2685607D41FC "/Users/snowflake/DevSquads/snowflake/snowflake-react-native/ios/build/snowflake/Build/Products/Debug-iphonesimulator/snowflake.app"
detox[48831] DEBUG: [exec.js/EXEC_TRY, #3] Installing /Users/snowflake/DevSquads/snowflake/snowflake-react-native/ios/build/snowflake/Build/Products/Debug-iphonesimulator/snowflake.app...
detox[48831] DEBUG: [exec.js/EXEC_SUCCESS, #3] /Users/snowflake/DevSquads/snowflake/snowflake-react-native/ios/build/snowflake/Build/Products/Debug-iphonesimulator/snowflake.app installed
detox[48831] DEBUG: [exec.js/EXEC_CMD, #4] /usr/bin/xcrun simctl terminate 4D59B341-1D72-4537-A7A6-2685607D41FC com.snowflake.hike
detox[48831] DEBUG: [exec.js/EXEC_TRY, #4] Terminating com.snowflake.hike...
detox[48831] DEBUG: [exec.js/EXEC_SUCCESS, #4] com.snowflake.hike terminated
detox[48831] DEBUG: [exec.js/EXEC_CMD, #5] /usr/bin/xcrun simctl get_app_container 4D59B341-1D72-4537-A7A6-2685607D41FC com.snowflake.hike
detox[48831] DEBUG: [exec.js/SPAWN_CMD, #6] [pid=48872] /usr/bin/xcrun simctl spawn 4D59B341-1D72-4537-A7A6-2685607D41FC log stream --level debug --style compact --predicate "processImagePath beginsWith \"/Users/snowflake/Library/Developer/CoreSimulator/Devices/4D59B341-1D72-4537-A7A6-2685607D41FC/data/Containers/Bundle/Application/0C2DE3FE-41FB-40C4-A0A6-7EC5819FD51E/snowflake.app\""
detox[48831] DEBUG: [exec.js/EXEC_CMD, #7] SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/snowflake/Library/Detox/ios/647caee43d053e07344915b0d5b71c85cb0b4733/Detox.framework/Detox" /usr/bin/xcrun simctl launch 4D59B341-1D72-4537-A7A6-2685607D41FC com.snowflake.hike --args -detoxServer "ws://localhost:50871" -detoxSessionId "c5f11579-4c6f-6735-87be-96d91fe111d8" -detoxPrintBusyIdleResources "YES"
detox[48831] DEBUG: [exec.js/EXEC_TRY, #7] Launching com.snowflake.hike...
detox[48831] DEBUG: [exec.js/EXEC_CMD, #8] /usr/bin/xcrun simctl get_app_container 4D59B341-1D72-4537-A7A6-2685607D41FC com.snowflake.hike
detox[48831] INFO: [AppleSimUtils.js] com.snowflake.hike launched. To watch simulator logs, run:
/usr/bin/xcrun simctl spawn 4D59B341-1D72-4537-A7A6-2685607D41FC log stream --level debug --style compact --predicate 'process == snowflake'
detox[48831] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8)
detox[48831] DEBUG: [DetoxServer.js/LOGIN] role=testee, sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8
detox[48831] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=testee, sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8
detox[48831] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 48872]: /usr/bin/xcrun simctl spawn 4D59B341-1D72-4537-A7A6-2685607D41FC log stream --level debug --style compact --predicate processImagePath beginsWith "/Users/snowflake/Library/Developer/CoreSimulator/Devices/4D59B341-1D72-4537-A7A6-2685607D41FC/data/Containers/Bundle/Application/0C2DE3FE-41FB-40C4-A0A6-7EC5819FD51E/snowflake.app"
detox[48831] DEBUG: [exec.js/EXEC_CMD, #9] /usr/bin/xcrun simctl get_app_container 4D59B341-1D72-4537-A7A6-2685607D41FC com.snowflake.hike
detox[48831] DEBUG: [exec.js/SPAWN_CMD, #10] [pid=49499] /usr/bin/xcrun simctl spawn 4D59B341-1D72-4537-A7A6-2685607D41FC log stream --level debug --style compact --predicate "processImagePath beginsWith \"/Users/snowflake/Library/Developer/CoreSimulator/Devices/4D59B341-1D72-4537-A7A6-2685607D41FC/data/Containers/Bundle/Application/0C2DE3FE-41FB-40C4-A0A6-7EC5819FD51E/snowflake.app\""
detox[48831] DEBUG: [exec.js/EXEC_CMD, #11] /usr/bin/xcrun simctl io 4D59B341-1D72-4537-A7A6-2685607D41FC screenshot "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/ac4574f8-0716-40bd-9cdc-bc4dc6d0ffdb.detox.png"
detox[48831] DEBUG: [exec.js/SPAWN_CMD, #12] [pid=49503] /usr/bin/xcrun simctl io 4D59B341-1D72-4537-A7A6-2685607D41FC recordVideo /private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/c0179e52-2fb0-49ab-90b8-30dc9dfa43db.detox.mp4
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync WXRunLoopIdlingResource: React Native thread is busy.
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync WXRunLoopIdlingResource: React Native thread is busy.
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] DEBUG: [exec.js/EXEC_CMD, #13] /usr/bin/xcrun simctl io 4D59B341-1D72-4537-A7A6-2685607D41FC screenshot "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/f98b8fab-208a-4d78-8153-d261dce44d90.detox.png"
detox[48831] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 49503]: /usr/bin/xcrun simctl io 4D59B341-1D72-4537-A7A6-2685607D41FC recordVideo /private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/c0179e52-2fb0-49ab-90b8-30dc9dfa43db.detox.mp4
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] DEBUG: [SimulatorRecordVideoPlugin.js/MOVE_FILE] moving "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/c0179e52-2fb0-49ab-90b8-30dc9dfa43db.detox.mp4" to artifacts/ios.sim.debug.2020-02-19 15-07-46Z/✗ Example should show GET STARTED button/test.mp4
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] DEBUG: [Artifact.js/MOVE_FILE] moving "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/ac4574f8-0716-40bd-9cdc-bc4dc6d0ffdb.detox.png" to artifacts/ios.sim.debug.2020-02-19 15-07-46Z/✗ Example should show GET STARTED button/testStart.png
detox[48831] DEBUG: [Artifact.js/MOVE_FILE] moving "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/f98b8fab-208a-4d78-8153-d261dce44d90.detox.png" to artifacts/ios.sim.debug.2020-02-19 15-07-46Z/✗ Example should show GET STARTED button/testDone.png
detox[48831] INFO: [actions.js] Sync JavaScript Timers: Javascript Timers
detox[48831] INFO: [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[48831] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 49499]: /usr/bin/xcrun simctl spawn 4D59B341-1D72-4537-A7A6-2685607D41FC log stream --level debug --style compact --predicate processImagePath beginsWith "/Users/snowflake/Library/Developer/CoreSimulator/Devices/4D59B341-1D72-4537-A7A6-2685607D41FC/data/Containers/Bundle/Application/0C2DE3FE-41FB-40C4-A0A6-7EC5819FD51E/snowflake.app"
detox[48831] WARN: [Client.js/PENDING_REQUESTS] App has not responded to the network requests below:
(id = 1) invoke: {"target":{"type":"Invocation","value":{"target":{"type":"EarlGrey","value":"instance"},"method":"detox_selectElementWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"detoxMatcherForText:","args":[{"type":"NSString","value":"Personalized to You"}]}}]}},"method":"assertWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"matcherForSufficientlyVisible","args":[]}}]}
(id = -1000) reactNativeReload: {}
That might be the reason why the test "Example should show GET STARTED button" has timed out.
detox[48831] DEBUG: [SimulatorLogRecording.js/MOVE_FILE] moving "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/90c3bf5e-026e-42f8-a462-d8d32e57fd77.detox.log" to artifacts/ios.sim.debug.2020-02-19 15-07-46Z/✗ Example should show GET STARTED button/process.log
detox[48831] DEBUG: [SimulatorLogRecording.js/MOVE_FILE] moving "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/864b0986-f94b-481a-8f81-6132f73f6558.detox.log" to artifacts/ios.sim.debug.2020-02-19 15-07-46Z/4D59B341-1D72-4537-A7A6-2685607D41FC 2020-02-19 15-16-51Z.startup.log
detox[48831] DEBUG: [Artifact.js/MOVE_FILE] moving "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/053ef6fa-1c4f-4f4a-bfc7-c7a0973c182a.detox.log" to artifacts/ios.sim.debug.2020-02-19 15-07-46Z/detox_pid_48831.json.log
detox[48831] DEBUG: [Artifact.js/MOVE_FILE] moving "/private/var/folders/35/t0nqj9vd2zd735xf5d05ybzr0000gn/T/dc0d2b5c-4d65-471e-850e-f86af80747d8.detox.log" to artifacts/ios.sim.debug.2020-02-19 15-07-46Z/detox_pid_48831.log
detox[48831] DEBUG: [DetoxServer.js/DISCONNECT] role=tester, sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8
detox[48831] DEBUG: [DetoxServer.js/DISCONNECT] role=testee, sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8
detox[48831] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=tester not connected, cannot fw action (sessionId=c5f11579-4c6f-6735-87be-96d91fe111d8)
detox[48831] DEBUG: [DetoxServer.js/WS_CLOSE] Detox server connections terminated gracefully

Safari: Cannot establish new session

macOS: version 10.13.4
Safari: version 11.1
Selenium-standalone: version: 6.14.1
Summary: I'm getting "Cannot establish new session" in the driver logs when running automation on an instance of selenium-standalone that was started through a SSH.
Note: If you start selenium-standalone directly on the mac machine without SSH ing everything works perfectly
Steps to reproduce:
1) SSH into a mac device.
2) start selenium-standalone
command: selenium-standalone start -- -role node -nodeConfig safari.json
safari.json:
{
"capabilities":
[
{
"browserName": "safari",
"platform": "MAC",
"maxInstances": 1,
"seleniumProtocol": "WebDriver"
}
],
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 1,
"port": 5555,
"register": true,
"registerCycle": 5000,
"hub": "http://ReplaceWithHubUrl:4449",
"nodeStatusCheckTimeout": 5000,
"nodePolling": 5000,
"role": "node",
"host":"ReplacewithNodeIP",
"unregisterIfStillDownAfter": 60000,
"downPollingLimit": 2,
"debug": false,
"servlets" : [],
"withoutServlets": [],
"custom": {}
}
3) Run the automation (Of course pointed toward the hub)
selenium server logs:
12:12:41.490 INFO - Selenium build info: version: '3.8.1', revision: '6e95a6684b'
12:12:41.491 INFO - Launching a Selenium Grid node
2018-05-24 12:12:44.846:INFO::main: Logging initialized #3650ms to org.seleniumhq.jetty9.util.log.StdErrLog
12:12:44.871 INFO - Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`
12:12:44.877 INFO - Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
12:12:44.879 INFO - Using `new EdgeOptions()` is preferred to `DesiredCapabilities.edge()`
12:12:44.879 INFO - Driver class not found: com.opera.core.systems.OperaDriver
12:12:44.879 INFO - Using `new OperaOptions()` is preferred to `DesiredCapabilities.operaBlink()`
12:12:44.880 INFO - Using `new SafariOptions()` is preferred to `DesiredCapabilities.safari()`
12:12:44.880 INFO - Driver class not found: org.openqa.selenium.phantomjs.PhantomJSDriver
12:12:44.890 INFO - Driver provider class org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities {browserName: internet explorer, ensureCleanSession: true, platform: WINDOWS, version: } does not match the current platform MAC
12:12:44.890 INFO - Driver provider class org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities {browserName: MicrosoftEdge, platform: WINDOWS, version: } does not match the current platform MAC
12:12:44.911 INFO - Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
12:12:44.911 INFO - Using `new EdgeOptions()` is preferred to `DesiredCapabilities.edge()`
12:12:44.911 INFO - Using `new FirefoxOptions()` is preferred to `DesiredCapabilities.firefox()`
12:12:44.912 INFO - Using `new OperaOptions()` is preferred to `DesiredCapabilities.operaBlink()`
12:12:44.912 INFO - Using `new SafariOptions()` is preferred to `DesiredCapabilities.safari()`
12:12:44.917 INFO - Using the passthrough mode handler
2018-05-24 12:12:44.934:INFO:osjs.Server:main: jetty-9.4.7.v20170914
2018-05-24 12:12:44.950:WARN:osjs.SecurityHandler:main: ServletContext#o.s.j.s.ServletContextHandler#ba54932{/,null,STARTING} has uncovered http methods for path: /
2018-05-24 12:12:44.953:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler#ba54932{/,null,AVAILABLE}
2018-05-24 12:12:44.971:INFO:osjs.AbstractConnector:main: Started ServerConnector#d6e7bab{HTTP/1.1,[http/1.1]}{0.0.0.0:5555}
2018-05-24 12:12:44.971:INFO:osjs.Server:main: Started #3775ms
12:12:44.971 INFO - Selenium Grid node is up and ready to register to the hub
12:12:44.976 INFO - Starting auto registration thread. Will try to register every 5000 ms.
12:12:44.976 INFO - Registering the node to the hub: http://qa-docker02.avirat.net:4449/grid/register
12:12:44.987 INFO - The node is registered to the hub and ready to use
Selenium started
2018-05-24 12:12:49.235:INFO:osjshC.ROOT:qtp782378927-10: org.openqa.selenium.remote.server.WebDriverServlet-5e5d171f: Initialising WebDriverServlet
12:12:49.249 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession#5452a53c
12:12:49.251 INFO - /session: Executing POST on /session (handler: BeginSession)
12:12:49.295 INFO - Capabilities are: Capabilities {browserName: safari}
12:12:49.297 INFO - Capabilities {browserName: safari} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.safari.SafariDriverService)
Driver logs:
org.openqa.selenium.SessionNotCreatedException: Cannot establish new session
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'qa01.avirat.net', ip: 'fe80:0:0:0:1854:3678:a42:3622%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.4', java.version: '1.8.0_121'
Driver info: driver.version: unknown
Command duration or timeout: 52.01 seconds
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.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:545)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:209)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:132)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:145)
at cucumber.driver.Factory.createDriver(Factory.java:29)
at cucumber.support.Hooks.beforeScenario(Hooks.java:59)
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 cucumber.runtime.Utils$1.call(Utils.java:31)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.Utils.invoke(Utils.java:25)
at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
at cucumber.runtime.HookDefinitionMatch.runStep(HookDefinitionMatch.java:17)
at cucumber.runner.UnskipableStep.executeStep(UnskipableStep.java:22)
at cucumber.api.TestStep.run(TestStep.java:83)
at cucumber.api.TestCase.run(TestCase.java:58)
at cucumber.runner.Runner.runPickle(Runner.java:80)
at cucumber.runtime.Runtime.runFeature(Runtime.java:119)
at cucumber.runtime.Runtime.run(Runtime.java:104)
at cucumber.api.cli.Main.run(Main.java:36)
at cucumber.api.cli.Main.main(Main.java:18)
Selenium Hub logs
starting selenium hub with configuration:
{
"host": null,
"port": 4444,
"role": "hub",
"maxSession": 50,
"newSessionWaitTimeout": 120000,
"capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
"throwOnCapabilityNotPresent": true,
"jettyMaxThreads": -1,
"cleanUpCycle": 60000,
"browserTimeout": 60000,
"timeout": 90000,
"debug": false
}
19:33:36.875 INFO - Selenium build info: version: '3.7.1', revision: '8a0099a'
19:33:36.878 INFO - Launching Selenium Grid hub
2018-05-24 19:33:37.883:INFO::main: Logging initialized #2333ms to org.seleniumhq.jetty9.util.log.StdErrLog
19:33:37.914 INFO - Will listen on 4444
2018-05-24 19:33:38.014:INFO:osjs.Server:main: jetty-9.4.5.v20170502
2018-05-24 19:33:38.081:INFO:osjs.session:main: DefaultSessionIdManager workerName=node0
2018-05-24 19:33:38.081:INFO:osjs.session:main: No SessionScavenger set, using defaults
2018-05-24 19:33:38.089:INFO:osjs.session:main: Scavenging every 600000ms
2018-05-24 19:33:38.107:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler#57d5872c{/,null,AVAILABLE}
2018-05-24 19:33:38.154:INFO:osjs.AbstractConnector:main: Started ServerConnector#1f1c7bf6{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
2018-05-24 19:33:38.155:INFO:osjs.Server:main: Started #2605ms
19:33:38.155 INFO - Nodes should register to http://10.255.1.238:4444/grid/register/
19:33:38.155 INFO - Selenium Grid hub is up and running
19:33:39.082 INFO - Registered a node http://10.57.85.10:5555
19:34:08.364 INFO - Got a request to create a new session: Capabilities {browserName: safari}
19:34:08.365 INFO - Trying to create a new session on test slot {seleniumProtocol=WebDriver, technologyPreview=false, se:CONFIG_UUID=c82e2553-dfdf-409c-8028-c76da8352368, browserName=safari, maxInstances=1, platform=MAC}
With High Sierra, I had to specify the specific OS version in platform, as well as the safari version as follows (in JS vs Java but same principle):
"safari": {
"browserName": "safari",
"platform": "macOS 10.13",
"version": "11.0",
"port": 4444
},
If this doesn't resolve the problem, the user you end up with on the mac you are SSHing into may not have sufficient permissions to run the driver.

How to debug SessionNotCreatedException?

How to debug SessionNotCreatedException in Firefox/Selenium?
1501668018402 geckodriver INFO Listening on 127.0.0.1:6748
1501668025463 geckodriver::marionette INFO Starting browser C:\Program Files (x86)\Mozilla Firefox\firefox.exe with args ["-marionette"]
1501668037220 Marionette INFO Listening on port 53205
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{moz:firefoxOptions={binary=Optional.empty, args=[], legacy=null, logLevel=null, prefs={}, profile=null}}], required capabilities = Capabilities [{moz:firefoxOptions={binary=Optional.empty, args=[], legacy=null, logLevel=null, prefs={}, profile=null}}]
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'CELKON-RND-PC', ip: '192.168.1.6', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
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.firefox.FirefoxDriver.<init>(FirefoxDriver.java:218)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:125)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:121)
at testpack.testclass.main(testclass.java:16)