-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Error retrieving a new session (UnsupportedCommandException) when using start_process: true #470
Comments
This is probably not a nightwatch issue. Could this be related to your problem? http://stackoverflow.com/questions/16214915/unable-to-call-firefoxdriver-constructor |
No, I don't have anything like that in my I tried adding the
works, while running it through nightwatch doesn't. This is exactly the same arguments nightwatch is passing it, so I suspected it might be concurrency related. I instrumented nightwatch to give me the stderr of the child process, and indeed it reveals a
I'm not sure what is causing this, though. |
I did some more debugging and it appears that the problem is caused by the pipe that
so that the stdin gets attached to |
Ah, I see. Good catch. This must be a Linux specific issue then? |
Do you know why would the stdin pipe would cause this exception? This is pretty non-standard and I'd like to have more insight into the problem. |
I'm not sure.
No. I initially thought something in selenium might be blocking on the pipe, but the error happens even if I call I'd love to understand this better myself, but regardless it makes sense to avoid creating a pipe to stdin since it's not going to write anything to it anyway. |
But the behaviour might change in the future. The way I see it, this is more like a workaround to the actual issue so I'd prefer at least to know what the issue is. Are you using a docker or Xvfb? Does this issue following offer any new insight? Or this one? |
No, I'm not using docker or xvfb, so none of those issues seem relevant. I've dug a little deeper and so far it looks like node (via libuv) is actually using a unix domain socket instead of a pipe. I've been able to reproduce the problem using this script.
Still not sure why this causes problems, though. |
which type of Linux are you using? On Thu, May 28, 2015 at 6:47 PM, Andreas Hammar [email protected]
|
Arch Linux |
Hmm ok, I've only used nightwatch on Ubuntu and I think the majority of On Thu, May 28, 2015 at 10:16 PM, Andreas Hammar [email protected]
|
How about reporting an issue to libuv then? |
@ahammar Thanks! This solved my issue after I've solved https://github.com/beatfactor/nightwatch/issues/266#issuecomment-109352785 . @beatfactor This is happening on my Kubuntu 15.04. Would it be possible to expect a fix for this thing so that it would work for Ubuntu as well as the other native OSs (Windows, Mac)? |
+1 as i am seeing the same issue as initially reported on os x yosemite with latest packages... |
@benmarten I can't reproduce on yosemite - what's your package.json look like and what versions are you running? |
@sknopf Oh sorry, false alert... It works with firefox and phantomjs. Previously I was testing it with chrome.... which wasn't working. But it's probably a chromedriver issue in my setup... |
@benmarten ok - yeah sounds like it.. |
@ahammar I had the same issue on Arch Linux and the solution really was to adjust the
I switched the |
#470 (comment) |
Nope, I have no idea why. But it made it work. |
I confirm that the "fix" by @gregmuellegger is the "solution" for arch ... |
I have found an interesting thing about this problem. First of all, here is the beginning my
As @gregmuellegger remarked, when the first line starts with However, it would be better not to need root access, right? My guess was that ArchLinux resolves localhost to ::1 when it is not starting the line (why? no idea). And then, nightwatch communicates well with selenium on my computer if You can also use ipv4 addresses for both configurations ( Hope that it helps! |
I see this on Ubuntu. Swapping localhost and localhost.localdomain in /etc/hosts works, but this really shouldn't be required. Please re-open, as this issue is not fixed. Editing /etc/hosts is only a workaround. |
Alright, we'll get it merged in the next version. |
Awesome! Thank you! |
* adds alternative command 'npm run test-e2e-bg' * workaround nightwatchjs/nightwatch#470
Any news on this? |
A similar behavior seems to be reproducable using Windows 10 as well. Fortunately, I managed to fix it:
Anyway, hth |
i got a different issue and it seems have some samiler with this issue , i want test android web app automation on chrome, but i got error value when using the function browser.contexts(), i start selenium-server local by command: java -Xms456m -Xmx1000m -jar node_modules\selenium-server\lib\runner\selenium-server-standalone-2.52.0.jar -role webdriver -hub http://127.0.0.1:4444/grid/register/ -maxSession 15 -browser "browserName=chrome, maxInstances=15, platform=WIN8" -Dwebdriver.chrome.driver=node_modules/.bin/chromedriver.cmd in linux the function browser.contextx() will return 👍 |
When automatically starting Selenium using
start_process: true
I get this error.nightwatch.json
:tests/google.js
Setting
start_process
tofalse
and starting Selenium manually withjava -jar selenium-server-standalone-2.45.0.jar
, everything works:Relevant version info: nightwatch 0.6.12, selenium 2.45, firefox 38.0.1 on Arch Linux 4.0.4-1
The text was updated successfully, but these errors were encountered: