-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
"socket hang up" on Nightwatch v1.0.14 mid-test #1936
Comments
@beatfactor Any idea what this could be caused by? I am getting this error both on my local testing setup as well as an CI setup (external linux based Jenkins server, which runs tests on a selenoid cluster). |
I've faced the same issue. Using Nightwatch v.1.0.17. Here is my config:
|
I'm getting the same with Firefox, also in the middle of a test run. Mac OS X
Sidenote: |
Update: The problem does still occur for me on the earliest version of nightwatch, 1.0.18 (chromedriver 2.45.0, selenium-server 3.141.59, Google Chrome 71.0.3578.98). |
I've faced this error, when testing for new tab being opened and trying to get URL or page elements too quickly before the page is loaded. The following fails:
But adding a 1s pause resolves it:
|
facing same issue with 500 post error with Response 500 POST /wd/hub/session/d9bc44a9a748a07cdf8cb15aace10797/element/0.2789049356657476-23/elements (121ms) |
After we started using Moon for parallel tests, again, we had the same "socket hang up" error.
Adding timeout with enough large value helped to solve the problem. |
I am not able to reliably reproduce the error. The same tests would sometimes throw this error and sometimes don't. Regardless, it does not affect the outcome of the test. In my particular case it happens when there's a spinner on the screen and I am waiting for the an element to be present. Have tried the |
Running into the same issue with latest [email protected] and nightwatch v1.0.19
|
+1 having the same issue sporadically - not able to reproduce consistently |
How about the workaround that @Deep27 suggested? |
Seeing this as well more often than not. I will try the workaround, but when time is of the essence it isn't optimal to make the tests take longer. Is there a root cause known? Seeing this when running with test_workers on Nightwatch v1.0.19, Chrome v74.0.3729.169, chromedriver v2.46.0 |
The workaround partially mitigates but does not totally eradicate the issue - testing with the latest nightwatch version. #1936 (comment) this seems to be the closest to reproducing it but still not enough info (and I can't reproduce in isolation). This also is confirmed a regression with v1 - did not happen with older versions. |
I updated the chrome version to 75.0.1 and somehow I don't see this issue on my machine anymore. |
For anyone who is running in to this, I can tell this is a network issue and I have a reliable re-pro described in #2147. However, I get different behavior on CentOS vs Ubuntu. It would be helpful for whoever running into this issue to report:
|
I think there might be more than one issue here. I don't think it is necessarily always a network issue, simply because this didn't seem to be happening on older versions. If somehow it is connected to the network issue, it means that in older versions of nightwatch this was somehow handled gracefully. |
My team has been running into this issue during a package upgrade endeavor. We downgraded Nightwatch to the last known working version for us (1.0.19) and still encountered the error. Downgrading Node to a prior version (10.7.0) fixed the issue. I'm not sure which versions will also work - we're trying to figure that out now. I'm also not sure how Node is involved in the issue yet (do newer Node versions have a bug, or is there some change that Nightwatch hasn't accounted for?). I'll post again when I have more information. |
This problem manifests between Node 10.15.0 (working) and 10.15.1 (breaking). With the delta in the changelog, I'm not surprised that a patch version caused the break. It may take some digging to figure out what changed that couldn't caused this issue in Nightwatch though. I've upgraded Nightwatch as part of this test as well and the breaking/working is consistent with Node versions. |
@LoganBarnett thanks for your insights. Can you tell us which OS platform your team is using to run the tests? And if you don't mind too much, it would be awesome if you could tell us a little bit about your project here: #2154 |
@beatfactor Our test suite is running on the Docker Node.JS image as a base. So in that sense, it's a Debian based Linux. This is our Dockerfile: FROM node:10.15.0
ARG UID=<REDACTED>
ARG GID=<REDACTED>
ARG USER=<REDACTED>
USER root
RUN (groupadd $USER -g $GID || true) \
&& (useradd -Nlm $USER -g $GID -u $UID || true)
# Work around for https://github.com/nodejs/docker-node/issues/1013 (adapted from an example in the comments)
RUN echo "deb http://deb.debian.org/debian jessie main" > /etc/apt/sources.list
RUN echo "deb http://security.debian.org jessie/updates main" >> /etc/apt/sources.list
RUN apt-get update
# seems to be needed to properly install chromedriver
RUN apt-get install -y libnss3
# chrome - instructions from https://www.linuxbabe.com/desktop-linux/how-to-install-google-chrome-on-debian-the-easy-way
RUN curl -sL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y google-chrome-stable
# upgrade yarn version: from https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#upgradingdowngrading-yarn
ENV YARN_VERSION 1.15.2
RUN curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
&& ln -snf /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
&& ln -snf /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz
USER <REDACTED> As for #2154, I left a comment some weeks back here, but I'm happy to add more to it if you feel like that's useful :) For more notes on reproduction, I've seen tests work when we run just one on our local machines (latest MacOS). I suspect it needs to have something long-running enough to trigger the issue, but I don't make this claim with certainty. Of course as I find out more I'll chime in. |
Same issue here since we migrated from nightwatch 0.9.20 to 1.3.6 and it doesn't always happen:
|
- fixed handling of sesion creation errors during test case run to be reported as test errors - fixed retries for session creation - errors are now reported only after retry limit is reached
I think I've found the root cause and created #2455 to fix it. I've discovered that the error occurs after the request for creating session times out. This case is handled properly at the test suite start, but not for during individual tests. If one test closes session using |
Which NW version will carry the fix? |
Is this issue being addressed? |
I'm getting this issue too, would be good to know if it's getting progressed |
Yes, a fix will be released in the next version, which is already in master and should be available in NPM by early next week. |
Cool 👌🏻
czw., 27 sie 2020, 13:57 użytkownik Andrei Rusu <[email protected]>
napisał:
… Yes, a fix will be released in the next version, which is already in
master and should be available in NPM by early next week.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1936 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMUVMH3OSGPYXA35VCPZ2ZTSCZCZRANCNFSM4GGT7BWQ>
.
|
Perfect! Thank you :) 🙏 |
@beatfactor do you know if this is now fixed and what version of Nightwatch we should upgrade to? |
It’s fixed in 1.4, which is in master already and will be published later
today.
…On Fri, 4 Sep 2020 at 14:16, Rich Matthews ***@***.***> wrote:
@beatfactor <https://github.com/beatfactor> do you know if this is now
fixed and what version of Nightwatch we should upgrade to?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1936 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADGNMQWLRV7UXZWFEQ2TY3SEDLCVANCNFSM4GGT7BWQ>
.
|
this issue is there in 1.3.6 and 1.4.3 while not in 0.9.12 (that is quiet old version to use) |
unfortunately I switched to 1.4.3 counting that no more hangup will happen on Azure devops but unfortunately I caught it too :( |
@shreev1 Can you elaborate on the kind of errors you have been seeing? Have you set |
I am also facing same issue like socket hang up error: I tested with nightwatch 1.3.6, 1.4.3 and 1.5.0 as well but issue is still reproducible and it appears in between execution of tests in parallel. in which version this issue will be fixed? |
I also get this error when running in parallel. Last update was two months ago. Any update? |
Having the same error on 1.5.1 |
I had this problem consistently when attempting to run tests in parallel and was able to resolve the issue by adding this to my test_settings ...
|
UPD: looks like the problem occurs due to me using chromium Running on Ubuntu
nightwatch.json directly from the documentation:
package.json :
Running:
|
Seeing this bumping from [email protected] to 1.6.4. with Node 14.16.0.
|
@wegry can you open a new issue please? |
@beatfactor after trying again with the latest Node LTS (14.17.0), I was unable to repro on two subsequent runs. If I run into it again, I'll open an issue. |
This issue has been automatically marked as stale because it has not had any recent activity. |
Still seeing this issue with Nightwatch 2.3.0 with Chromedriver 103 and Chrome 103 running on node 14.18.1
|
Hey @s9tpepper can you raise another issue regarding this if you are still facing problems related to chromedriver |
I am getting this error in 1.0.14. It seems mostly similar to #1788.
The error always appears mid-test, after many instructions have been completed sucessfully. It appears at a random point during the test, and at that point all following nightwatch instructions fail with this error.
I am using [email protected], [email protected], [email protected] on Windows 10 Enterprise (1709 Build 16299.785).
Edit: My nightwatch config looks like this: https://gist.github.com/lukasbach/f121ec9a4b7a7c337d2ebb0140476d37
The text was updated successfully, but these errors were encountered: