Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

nightwatch does not work with selenium node-firefox-debug:3.5+ #1628

Closed
Zechtitus opened this issue Nov 1, 2017 · 31 comments
Closed

nightwatch does not work with selenium node-firefox-debug:3.5+ #1628

Zechtitus opened this issue Nov 1, 2017 · 31 comments
Labels

Comments

@Zechtitus
Copy link

Zechtitus commented Nov 1, 2017

This issue was referenced before in #1600 and was closed as the original author was able to go back to 3.4. Not being able to use nightwatch with a current firefox build is still an issue though.

I tried @yak80 solution in that issue and found it to work as expected. Would like this issue reopened as we are still stuck using 3.4 which is quite dated.

a quick recap of the issue. If you try to use various methods like click with the 3.6 selenium docker version you will get an error message like this:

  localizedMessage: 'Element reference not seen before: undefined\nBuild info: version: \'3.6.0\', revision: \'6fbf3ec767\', time: \'2017-09-27T16:15:40.131Z\'\nSystem info: host: \'055e4e3d90a0\', ip: \'172.21.0.4\', os.name: \'Linux\', os.arch: \'amd64\', os.version: \'4.9.49-moby\', java.version: \'1.8.0_131\'\nDriver info: driver.version: unknown',
  systemInformation: 'System info: host: \'055e4e3d90a0\', ip: \'x.x.x.x\', os.name: \'Linux\', os.arch: \'amd64\', os.version: \'4.9.49-moby\', java.version: \'1.8.0_131\'',
  supportUrl: null,
  cause: null,
  suppressed: [],
  message: 'Element reference not seen before: undefined\nBuild info: version: \'3.6.0\', revision: \'6fbf3ec767\', time: \'2017-09-27T16:15:40.131Z\'\nSystem info: host: \'055e4e3d90a0\', ip: \'x.x.x.x\', os.name: \'Linux\', os.arch: \'amd64\', os.version: \'4.9.49-moby\', java.version: \'1.8.0_131\'\nDriver info: driver.version: unknown',
  hCode: 1093878616,
  class: 'org.openqa.selenium.JavascriptException',
  buildInformation: null }```
@vpatton-paa
Copy link

I'm not sure if this is the same issue or not, but...

I am using Selenium 3.7.1 and Firefox 56, my tests work fine in Chrome 60, but when I try the same tests with no changes, firefox is unable to find any of the selectors. I see this repeatedly in the log of the selenium server and then it fails the test with the error message:

Timed out while waiting for element to be visible for 10000 milliseconds. - Expected "visible" but got: "not visible"

Here is the selenium log:
13:12:24.725 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@12dc17dc 13:12:24.725 INFO - Handler thread for session bce5df1d-926e-d445-a365-803c18430258 (firefox): Executing POST on /session/bce5df1d-926e-d445-a365-803c18430258/elements (handler: ServicedSession) 13:12:24.734 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@12dc17dc 13:12:24.734 INFO - Handler thread for session bce5df1d-926e-d445-a365-803c18430258 (firefox): Executing GET on /session/bce5df1d-926e-d445-a365-803c18430258/element/undefined/displayed (handler: ServicedSession) 13:12:25.256 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@12dc17dc 13:12:25.256 INFO - Handler thread for session bce5df1d-926e-d445-a365-803c18430258 (firefox): Executing GET on /session/bce5df1d-926e-d445-a365-803c18430258/element/undefined/displayed (handler: ServicedSession) 13:12:25.802 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession@12dc17dc 13:12:25.802 INFO - Handler thread for session bce5df1d-926e-d445-a365-803c18430258 (firefox): Executing GET on /session/bce5df1d-926e-d445-a365-803c18430258/element/undefined/displayed (handler: ServicedSession)

@Zechtitus
Copy link
Author

@vanpatton does it work with the branch provided by yak80?

@vpatton-paa
Copy link

When you responded, thats what I was trying and yes it does fix it. I totally missed the end of his post where he had a fix.

@romandrahan
Copy link

Same here.

@straris
Copy link

straris commented Nov 21, 2017

#1600 issue was re-opened, should we close this one?

@mAiNiNfEcTiOn
Copy link

mAiNiNfEcTiOn commented Nov 22, 2017

The question is more about, why on Earth is this PR #1604 still open? Shouldn't it have been merged by now? It does meet the specs: https://w3c.github.io/webdriver/webdriver-spec.html#x11-elements

Where it says:

The web element identifier is the string constant "element-6066-11e4-a52e-4f735466cecf"

@romandrahan
Copy link

romandrahan commented Nov 22, 2017

@mAiNiNfEcTiOn, exactly.

@straris, this is different issue, that is opened specially for PR #1604, so it must remain opened.

@Zechtitus
Copy link
Author

Double checking - did this make it into 0.9.19? I am running into other issues regarding firefox which are still locking me into having to use 3.4

#1683
I was actually trying to verify this issue and that latest firefox was working when I ran into 1683. Might be a configuration issue?

@ViljarVoidula
Copy link

ViljarVoidula commented Dec 28, 2017

@Zechtitus I updated my project to latest nightwatch version - still having this problem .
Selenium grid setup:

Meta -

Image(s):
<hub,firefox_node_debug>
Docker-Selenium Image Version(s):
,3.8.1-chlorine
Docker Version:
Docker version 17.09.1-ce, build 19e2cf6
OS:
Ubuntu 16.04 x64
4.10.0-42-generic

Expected Behavior -

Firefox node not driopping connection

Actual Behavior -

selenium-hub    | 10:58:30.509 DEBUG - Opening connection {}->http://172.18.0.4:5555
selenium-hub    | 10:58:30.509 DEBUG - Connecting to /172.18.0.4:5555
selenium-hub    | 10:58:30.510 DEBUG - Connection established 172.18.0.2:44878<->172.18.0.4:5555
selenium-hub    | 10:58:30.510 DEBUG - http-outgoing-6: set socket timeout to 6602000
selenium-hub    | 10:58:30.510 DEBUG - Executing request POST /wd/hub/session HTTP/1.1
selenium-hub    | 10:58:30.510 DEBUG - Target auth state: UNCHALLENGED
selenium-hub    | 10:58:30.510 DEBUG - Proxy auth state: UNCHALLENGED
selenium-hub    | 10:58:30.510 DEBUG - http-outgoing-6 >> POST /wd/hub/session HTTP/1.1
selenium-hub    | 10:58:30.510 DEBUG - http-outgoing-6 >> Connection: close
selenium-hub    | 10:58:30.511 DEBUG - http-outgoing-6 >> Host: 127.0.0.1:4444
selenium-hub    | 10:58:30.511 DEBUG - http-outgoing-6 >> Content-Type: application/json; charset=UTF-8
selenium-hub    | 10:58:30.511 DEBUG - http-outgoing-6 >> Content-Length: 545
selenium-hub    | 10:58:30.511 DEBUG - http-outgoing-6 >> User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_151)
selenium-hub    | 10:58:30.511 DEBUG - http-outgoing-6 >> Accept-Encoding: gzip,deflate
selenium-hub    | 10:58:30.511 DEBUG - http-outgoing-6 >> "POST /wd/hub/session HTTP/1.1[\r][\n]"
selenium-hub    | 10:58:30.512 DEBUG - http-outgoing-6 >> "Connection: close[\r][\n]"
selenium-hub    | 10:58:30.512 DEBUG - http-outgoing-6 >> "Host: 127.0.0.1:4444[\r][\n]"
selenium-hub    | 10:58:30.512 DEBUG - http-outgoing-6 >> "Content-Type: application/json; charset=UTF-8[\r][\n]"
selenium-hub    | 10:58:30.512 DEBUG - http-outgoing-6 >> "Content-Length: 545[\r][\n]"
selenium-hub    | 10:58:30.512 DEBUG - http-outgoing-6 >> "User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_151)[\r][\n]"
selenium-hub    | 10:58:30.512 DEBUG - http-outgoing-6 >> "Accept-Encoding: gzip,deflate[\r][\n]"
selenium-hub    | 10:58:30.512 DEBUG - http-outgoing-6 >> "[\r][\n]"
selenium-hub    | 10:58:30.512 DEBUG - http-outgoing-6 >> "{[\n]"
selenium-hub    | 10:58:30.513 DEBUG - http-outgoing-6 >> "  "desiredCapabilities": {"acceptSslCerts":true,"browserName":"firefox","javascriptEnabled":true,"log":true,"marionette":true,"name":"default","se:CONFIG_UUID":"1dccac46-516f-4d8f-9865-edab74893374"},[\n]"
selenium-hub    | 10:58:30.513 DEBUG - http-outgoing-6 >> "  "capabilities": {[\n]"
selenium-hub    | 10:58:30.513 DEBUG - http-outgoing-6 >> "    "desiredCapabilities": {"acceptSslCerts":true,"browserName":"firefox","javascriptEnabled":true,"log":true,"marionette":true,"name":"default","se:CONFIG_UUID":"1dccac46-516f-4d8f-9865-edab74893374"},[\n]"
selenium-hub    | 10:58:30.513 DEBUG - http-outgoing-6 >> "    "firstMatch": [[\n]"
selenium-hub    | 10:58:30.513 DEBUG - http-outgoing-6 >> "      {"browserName":"firefox","se:CONFIG_UUID":"1dccac46-516f-4d8f-9865-edab74893374"}[\n]"
selenium-hub    | 10:58:30.513 DEBUG - http-outgoing-6 >> "    ][\n]"
selenium-hub    | 10:58:30.513 DEBUG - http-outgoing-6 >> "  }[\n]"
selenium-hub    | 10:58:30.513 DEBUG - http-outgoing-6 >> "}"
firefox_1       | 2018-01-05 10:58:30.516:INFO:osjshC.ROOT:qtp1016925085-14: org.openqa.selenium.remote.server.WebDriverServlet-3b0090a4: Initialising WebDriverServlet
firefox_1       | 10:58:30.536 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession@44ea83f
firefox_1       | 10:58:30.541 INFO - /session: Executing POST on /session (handler: BeginSession)
firefox_1       | 10:58:30.626 INFO - Capabilities are: Capabilities {acceptSslCerts: true, browserName: firefox, javascriptEnabled: true, log: true,marionette: true, name: default}
firefox_1       | 10:58:30.628 INFO - Capabilities {acceptSslCerts: true, browserName: firefox, javascriptEnabled: true, log: true, marionette: true,name: default} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.firefox.GeckoDriverService)
firefox_1       | 1515149910671 geckodriver     INFO    geckodriver 0.19.1
firefox_1       | 1515149910678 geckodriver     INFO    Listening on 127.0.0.1:31819
firefox_1       | 1515149910841 mozrunner::runner       INFO    Running command: "/usr/bin/firefox" "-marionette" "-profile" "/tmp/rust_mozprofile.KjkHHCmcV3O1"
firefox_1       | 1515149911372 Marionette      INFO    Enabled via --marionette
firefox_1       | Failed to read: session.screen0.titlebar.left
firefox_1       | Setting default value
firefox_1       | Failed to read: session.screen0.titlebar.right
firefox_1       | Setting default value
firefox_1       | 1515149912686 Marionette      INFO    Listening on port 45203
firefox_1       | 1515149912815 Marionette      DEBUG   Register listener.js for window 2147483649
firefox_1       | 10:58:32.848 INFO - Detected dialect: W3C
selenium-hub    | 10:58:32.874 DEBUG - http-outgoing-6 << "HTTP/1.1 200 OK[\r][\n]"
selenium-hub    | 10:58:32.874 DEBUG - http-outgoing-6 << "Connection: close[\r][\n]"
selenium-hub    | 10:58:32.874 DEBUG - http-outgoing-6 << "Date: Fri, 05 Jan 2018 10:58:30 GMT[\r][\n]"
selenium-hub    | 10:58:32.874 DEBUG - http-outgoing-6 << "Expires: Thu, 01 Jan 1970 00:00:00 GMT[\r][\n]"
selenium-hub    | 10:58:32.875 DEBUG - http-outgoing-6 << "Cache-Control: no-cache[\r][\n]"
selenium-hub    | 10:58:32.875 DEBUG - http-outgoing-6 << "Content-Type: application/json;charset=utf-8[\r][\n]"
selenium-hub    | 10:58:32.875 DEBUG - http-outgoing-6 << "Content-Length: 473[\r][\n]"
selenium-hub    | 10:58:32.875 DEBUG - http-outgoing-6 << "Server: Jetty(9.4.7.v20170914)[\r][\n]"
selenium-hub    | 10:58:32.875 DEBUG - http-outgoing-6 << "[\r][\n]"
selenium-hub    | 10:58:32.875 DEBUG - http-outgoing-6 << "{"value":{"sessionId":"974cc51f-39ea-4bd7-a325-4fe554e93c0b","capabilities":{"moz:profile":"/tmp/rust_mozprofile.KjkHHCmcV3O1","rotatable":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"pageLoadStrategy":"normal","moz:headless":false,"moz:accessibilityChecks":false,"acceptInsecureCerts":false,"browserVersion":"57.0.2","platformVersion":"4.10.0-42-generic","moz:processID":114,"browserName":"firefox","platformName":"linux","moz:webdriverClick":false}}}"
selenium-hub    | 10:58:32.876 DEBUG - http-outgoing-6 << HTTP/1.1 200 OK
selenium-hub    | 10:58:32.876 DEBUG - http-outgoing-6 << Connection: close
selenium-hub    | 10:58:32.876 DEBUG - http-outgoing-6 << Date: Fri, 05 Jan 2018 10:58:30 GMT
selenium-hub    | 10:58:32.876 DEBUG - http-outgoing-6 << Expires: Thu, 01 Jan 1970 00:00:00 GMT
selenium-hub    | 10:58:32.876 DEBUG - http-outgoing-6 << Cache-Control: no-cache
selenium-hub    | 10:58:32.876 DEBUG - http-outgoing-6 << Content-Type: application/json;charset=utf-8
selenium-hub    | 10:58:32.876 DEBUG - http-outgoing-6 << Content-Length: 473
selenium-hub    | 10:58:32.876 DEBUG - http-outgoing-6 << Server: Jetty(9.4.7.v20170914)
selenium-hub    | 10:58:32.923 DEBUG - http-outgoing-6: Close connection
selenium-hub    | 10:58:32.924 DEBUG - Connection discarded

Using nightwatch JS as testframework:
output:
`Running: Open player
INFO Request: POST /wd/hub/session

  • data: {"desiredCapabilities":{"browserName":"firefox","javascriptEnabled":true,"acceptSslCerts":true,"platform":"ANY","marionette":true,"log":true,"name":"default"}}
  • headers: {"Content-Type":"application/json; charset=utf-8","Content-Length":159}
    INFO Response 200 POST /wd/hub/session (2526ms) { value:
    { sessionId: '974cc51f-39ea-4bd7-a325-4fe554e93c0b',
    capabilities:
    { 'moz:profile': '/tmp/rust_mozprofile.KjkHHCmcV3O1',
    rotatable: false,
    timeouts: { implicit: 0, pageLoad: 300000, script: 30000 },
    pageLoadStrategy: 'normal',
    'moz:headless': false,
    'moz:accessibilityChecks': false,
    acceptInsecureCerts: false,
    browserVersion: '57.0.2',
    platformVersion: '4.10.0-42-generic',
    'moz:processID': 114,
    browserName: 'firefox',
    platformName: 'linux',
    'moz:webdriverClick': false } } }

Error retrieving a new session from the selenium server

Connection refused! Is selenium server started?
{ value:
{ sessionId: '974cc51f-39ea-4bd7-a325-4fe554e93c0b',
capabilities:
{ 'moz:profile': '/tmp/rust_mozprofile.KjkHHCmcV3O1',
rotatable: false,
timeouts: [Object],
pageLoadStrategy: 'normal',
'moz:headless': false,
'moz:accessibilityChecks': false,
acceptInsecureCerts: false,
browserVersion: '57.0.2',
platformVersion: '4.10.0-42-generic',
'moz:processID': 114,
browserName: 'firefox',
platformName: 'linux',
'moz:webdriverClick': false } } }`

@Zechtitus
Copy link
Author

@beatfactor - Hey would you have any idea on why this is an issue?

@straris
Copy link

straris commented Jan 23, 2018

@beatfactor Looks like the issue was referenced in another repository too, pointing to Nightwatch.
SeleniumHQ/docker-selenium#646

I can confirm, running firefox in a selenium grid setup fails but not in standalone
Chrome doesn't have the issue.

Setup:
geckodriver 0.19.1
selenium hub & node 3.8.1
nightwatch 0.9.19

Also broken on 0.9.17

@mAiNiNfEcTiOn
Copy link

@straris

When I tested a few months ago, if you ran the ªselenium grid* with the config -enablepassThrough false the payload that came from the Gecko driver would get standardized (and wouldn't break for Chrome, only other browser I tested) ...

Now, the way I see this is, either the Gecko driver project fixes its payload to retrieve the same as the other browsers OR all drivers should align on the payload responses for all procedures under the WebDriver's standard.

@straris
Copy link

straris commented Jan 24, 2018

@mAiNiNfEcTiOn I didn't have any luck with -enablepassThrough false either

@mAiNiNfEcTiOn
Copy link

mAiNiNfEcTiOn commented Jan 24, 2018

@straris

first, my bad, the casing was incorrect. It should be -enablePassThrough false

if you're using the docker-selenium image, bear in mind that they do not allow to change it via the docker-run:

It's running with this config: https://github.com/SeleniumHQ/docker-selenium/blob/master/Hub/generate_config

(Check bottom of this file: https://hub.docker.com/r/selenium/hub/~/dockerfile/ )

The best way to test it is locally, setting a hub: java -jar selenium-server-standalone-3.8.1.jar -role hub -enablePassThrough false

@straris
Copy link

straris commented Jan 25, 2018

@mAiNiNfEcTiOn indeed I followed exactly what you suggested, I skipped the whole docker setup and tried it with a local hub and node.

java -jar selenium-server-standalone-3.8.1.jar -enablePassThrough false -role hub
and for the node
java -Dwebdriver.gecko.driver=/pathToGeckodriver -Dwebdriver.chrome.driver=/pathToChromedriver -jar selenium-server-standalone-3.8.1.jar -role node -hub http://localhost:4444/grid/register

Let me know if you get the chance to test it too.

@straris
Copy link

straris commented Jan 25, 2018

@mAiNiNfEcTiOn , @Zechtitus I managed to workaround the issue by setting the enablePassThrough false not on the hub but on the nodes

@ViljarVoidula
Copy link

@straris @mAiNiNfEcTiOn in docker-compose you can try for both hub and nodes. I'm currently unable to access computer for a while because of vacation but would appreciate if somebody could tell me if it works.

environment:
- SE_OPTS=-enablePassThrough false

@Zechtitus
Copy link
Author

@ViljarVoidula no luck with this setting on hub or the firefox node

@straris
Copy link

straris commented Jan 26, 2018

@Zechtitus did you have give it a try with 3.8.1?

@Zechtitus
Copy link
Author

@straris - I was using the latest flag as of last night. I will fiddle some more today if I get the chance.
Is that setting reflected in the hub console btw? Not even sure if it is getting applied.

@straris
Copy link

straris commented Jan 26, 2018

@Zechtitus seleniumServerHost:port/grid/console?config=true&configDebug=true should show the hub configuration

@Zechtitus
Copy link
Author

Zechtitus commented Jan 26, 2018

still no luck. Here is the details from the hub console

Config for the hub :
browserTimeout : 120
debug : false
help : false
jettyMaxThreads : -1
port : 4444
role : hub
timeout : 60
enablePassThrough : false
cleanUpCycle : 5000
host : xxx.xxx.xxx.xxx
maxSession : 5
hubConfig : /opt/selenium/config.json
capabilityMatcher : org.openqa.grid.internal.utils.DefaultCapabilityMatcher
newSessionWaitTimeout : -1
throwOnCapabilityNotPresent : true
registry : org.openqa.grid.internal.DefaultGridRegistry
Config details :
hub launched with : -browserTimeout 120 -debug false -help false -jettyMaxThreads -1 -port 4444 -role hub -timeout 60 -enablePassThrough false -cleanUpCycle 5000 -host 172.20.0.2 -maxSession 5 -hubConfig /opt/selenium/config.json -capabilityMatcher org.openqa.grid.internal.utils.DefaultCapabilityMatcher -newSessionWaitTimeout -1 -throwOnCapabilityNotPresent true -registry org.openqa.grid.internal.DefaultGridRegistry
the final configuration comes from :
the default :
browserTimeout : 0
debug : false
help : false
port : 4444
role : hub
timeout : 1800
enablePassThrough : true
cleanUpCycle : 5000
capabilityMatcher : org.openqa.grid.internal.utils.DefaultCapabilityMatcher
newSessionWaitTimeout : -1
throwOnCapabilityNotPresent : true
registry : org.openqa.grid.internal.DefaultGridRegistry

updated with params :
browserTimeout : 120
debug : false
help : false
jettyMaxThreads : -1
port : 4444
role : hub
timeout : 60
enablePassThrough : true
cleanUpCycle : 5000
maxSession : 5
capabilityMatcher : org.openqa.grid.internal.utils.DefaultCapabilityMatcher
newSessionWaitTimeout : -1
throwOnCapabilityNotPresent : true
registry : org.openqa.grid.internal.DefaultGridRegistry

and the logs from the firefox docker:

21:14:01.433 INFO - Handler thread for session 9e23cec0-9919-46fa-9d22-b002e47b5299 (firefox): Executing DELETE on /session/9e23cec0-9919-46fa-9d22-b002e47b5299 (handler: ServicedSession)
21:14:01.541 INFO - To downstream: {"value": {}}
21:14:01.545 INFO - Removing session org.openqa.selenium.remote.server.ServicedSession@6c3a1c22
21:14:01.553 INFO - To downstream: {"value":{"error":"session not created","message":"Tried to run command without establishing a connection","stacktrace":"stack backtrace:\n   0:           0x4edb3c - backtrace::backtrace::trace::hc4bd56a2f176de7e\n   1:           0x4edb72 - backtrace::capture::Backtrace::new::he3b2a15d39027c46\n   2:           0x4409a1 - webdriver::error::WebDriverError::new::h81babdd86c977032\n   3:           0x4280ea - <webdriver::server::Dispatcher<T, U>>::run::h2119c674d7b88193\n   4:           0x4029b9 - std::sys_common::backtrace::__rust_begin_short_backtrace::h21d98a9ff86d4c25\n   5:           0x40be65 - std::panicking::try::do_call::h5cff0c9b18cfdbba\n   6:           0x5e6a6c - panic_unwind::__rust_maybe_catch_panic\n                        at /checkout/src/libpanic_unwind/lib.rs:99\n   7:           0x41eb22 - <F as alloc::boxed::FnBox<A>>::call_box::h413eb1d9d9f1c473\n   8:           0x5df13b - alloc::boxed::{{impl}}::call_once<(),()>\n                        at /checkout/src/liballoc/boxed.rs:692\n                         - std::sys_common::thread::start_thread\n                        at /checkout/src/libstd/sys_common/thread.rs:21\n                         - std::sys::imp::thread::{{impl}}::new::thread_start\n                        at /checkout/src/libstd/sys/unix/thread.rs:84"}}

and the hub docker logs:

1:12:52.027 INFO - Registered a node http://172.16.127.127:5555
21:12:52.027 WARN - Cleaning up stale test sessions on the unregistered node http://172.16.127.127:5555
21:12:56.901 INFO - Got a request to create a new session: Capabilities {acceptSslCerts: true, browserName: firefox, javascriptEnabled: true, marionette: true, name: TrumpWheel}
21:12:56.903 INFO - Trying to create a new session on test slot {seleniumProtocol=WebDriver, se:CONFIG_UUID=4a8488fc-7c45-4385-9078-bc94efd6fc66, browserName=firefox, maxInstances=1, moz:firefoxOptions={log={level=info}}, version=57.0.4, applicationName=, platform=LINUX}
21:14:01.427 WARN - session ext. key 9e23cec0-9919-46fa-9d22-b002e47b5299 has TIMED OUT due to client inactivity and will be released.

@Zechtitus
Copy link
Author

is this issue related to #1456?

@Zechtitus
Copy link
Author

@straris tried pretty much everything I can with the enablePassThrough setting and no luck. Tried this on hub, firefox, both and no change in the Connection refused status being returned from nightwatch when trying to connect to firefox.

BTW - SeleniumHQ/docker-selenium#647 seems to indicate that setting this would show no difference in the console.

@straris
Copy link

straris commented Feb 5, 2018

@Zechtitus that is interesting, in my case the only thing I did was setting enablePassThrough to both hub and nodes, although according to a comment in the issue you mentioned:

Yesterday I found out that even if in the node it shows enablePassThrough=true when you pass SE_OPTS=-enablePassThrough false, the setting works.

It looks like it's not a nightwatch issue though, should we create one for selenium?

@Zechtitus
Copy link
Author

@straris - think this is a nightwatch issue and how firefox works with it. You can make firefox work with latest standalone-firefox but not the node variants. I also read that enablePassThrough was a depreciated feature which will be removed shortly... If not already in subsequent docker releases for selenium

@davidlinse
Copy link
Contributor

From my experience it is almost always related to compatibility issues between the version(s) of Firefox and the used webdriver binary. I can highly recommend to have a look at Zalenium

regards

@ViljarVoidula
Copy link

@davidlinse
Zalenium is not an option for everybody cause of their licence terms . Zalenium images and SeleniumHQ images are both maintained by diemol, who was helpful enough to troubleshoot this issue and he aswell pointed out that this is nightwatch issue .

@hogarthj
Copy link

For what it is worth "SE_OPTS=-enablePassThrough false" on testing for me today does not appear to be working for me with:

{
  "src_folders" : ["tests"],
  "output_folder" : "reports",
  "custom_commands_path" : "",
  "custom_assertions_path" : "",
  "page_objects_path" : "",
  "globals_path" : "",

  "test_settings" : {
    "default" : {
      "launch_url" : "https://www.google.com",
      "selenium_port"  : 4444,
      "selenium_host"  : "hub",
      "silent": false,
      "log_screenshot_data": false,
      "end_session_on_fail": false,
      "screenshots" : {
        "enabled" : true,
        "on_failure": true,
        "path" : "screenshots"
      }
    },
    "chrome": {
      "desiredCapabilities": {
        "browserName": "chrome"
      }
    },
    "firefox": {
      "desiredCapabilities": {
        "browserName": "firefox",
        "marionette": true
      }
    }

  }
}

The result is:

[Github / Github Demo] Test Suite
=====================================

Running:  Demo test GitHub
INFO Request: POST http://hub:4444/wd/hub/session 
 - data:  {"desiredCapabilities":{"browserName":"firefox","javascriptEnabled":true,"acceptSslCerts":true,"platform":"ANY","name":"Github / Github Demo"}} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":143}
INFO Response 200 POST http://hub:4444/wd/hub/session (3259ms) { value: 
   { sessionId: '3c6807ad-bffc-4535-8d0c-bf806972edc1',
     capabilities: 
      { 'moz:profile': '/tmp/rust_mozprofile.gRUOgfsAgs9n',
        rotatable: false,
        timeouts: { implicit: 0, pageLoad: 300000, script: 30000 },
        pageLoadStrategy: 'normal',
        'moz:headless': false,
        'moz:accessibilityChecks': false,
        acceptInsecureCerts: false,
        browserVersion: '58.0',
        platformVersion: '4.14.16-300.fc27.x86_64',
        'moz:processID': 782,
        browserName: 'firefox',
        platformName: 'linux',
        'moz:webdriverClick': true } } }

Error retrieving a new session from the selenium server

Connection refused! Is selenium server started?
{ value: 
   { sessionId: '3c6807ad-bffc-4535-8d0c-bf806972edc1',
     capabilities: 
      { 'moz:profile': '/tmp/rust_mozprofile.gRUOgfsAgs9n',
        rotatable: false,
        timeouts: [Object],
        pageLoadStrategy: 'normal',
        'moz:headless': false,
        'moz:accessibilityChecks': false,
        acceptInsecureCerts: false,
        browserVersion: '58.0',
        platformVersion: '4.14.16-300.fc27.x86_64',
        'moz:processID': 782,
        browserName: 'firefox',
        platformName: 'linux',
        'moz:webdriverClick': true } } }

Also 3.9 was just released and that drops passthrough entirely so doesn't work there so a new approach is needed to handle the webdriver session with firefox.

chris-tn added a commit to chris-tn/nightwatch that referenced this issue Feb 23, 2018
markafitzgerald1 added a commit to markafitzgerald1/cribbage-analyst that referenced this issue Jul 15, 2018
Candidate resolution of issue #33, "Resolve Travis CI Nightwatch
failures since #32 resolution".  Moving away from PhantomJS as its
development has been discontinued
(ariya/phantomjs#15344), its latest and final
version (2.1.1) does not support Web Fonts
(https://stackoverflow.com/q/23404658/1840078) which were recently
added to this project, it does not work with any version of Selenium
beyond 3.5.3 save for 3.7.1 based on my own testing (perhaps related:
Firefox on Selenium 3.5+ breakage:
nightwatchjs/nightwatch#1628), local download
of Google Fonts is hard to automate and PhantomJS user-agent cannot be
changed without likely modifications to Nightwatch.

Also: updated gulp-nightwatch to latest non-broken version - 1.0.0 is
broken (tatsuyafw/gulp-nightwatch#55)... and
depends on [email protected] which is still in beta.

Replaced slower and less reliable pause(time) calls with
.waitForElementPresent(selector, time) calls to increase e2e test
clarity and reliability.
@stale
Copy link

stale bot commented Nov 14, 2018

This issue has been automatically marked as stale because it has not had any recent activity.
If possible, please retry using the latest Nightwatch version and update the issue with any relevant details. If no further activity occurs, it will be closed. Thank you for your contributions.

@stale stale bot added the stale label Nov 14, 2018
@beatfactor
Copy link
Member

should be fixed in v1.0.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants