-
Notifications
You must be signed in to change notification settings - Fork 2.3k
protractor hangs indefinitely on "[launcher] Running 1 instances of WebDriver" - when running with xvfb #2419
Comments
I opened that other issue. In my case, I was running protractor inside of Vagrant and had port 4444 forwarded in my Vagrantfile. protractor silently failed/hung in this scenario |
I had the same issue but it got fixed when I ran
but
|
Oddly both styles seem to work now. I'm not sure but I think the nature of the tests may also determine whether protractor hangs or not. I had a test that was infinitely trying to reach a nonexistent location because I hadn't set the |
I'm getting hanging behaviour, running tests with sharding on Codeship CI. I run the same tests with Firefox and Chrome - I've split these into 2 separate config files but other than the browser setting they're the same. The process sometimes hangs at the end of the Chrome file, and sometimes at the end of the Firefox one (and, if I'm very lucky, sometimes doesn't hang :)) Consistently seems to be "1 instances" left running (rather than 2 or more). It's run as a foreground process so no help from @caninemwenja 's comment... |
I've got a similar issue, where it hangs at
about 50% of the time. It will hang there indefinitely. However, even if it hangs you can start other instances which may or may not succeed in the same manner. |
I've experienced the issue both with and without |
Yeah, I've just confirmed that the same things happens with directConnect and standalone selenium. |
Also seeing the problem, but only on our Ubuntu build servers. Haven't seen the issue yet on the Windows servers. Using Google Chrome 44.0.2403.130 and ChromeDriver 2.15.322448. |
I don't know how significant it is, but its also our Ubuntu build servers which are affected. We have fedora, ubuntu, and OSX systems, but its only the Ubuntu servers which hang at the ChromeDriver start up. |
Ubuntu for me too. Using Chromium 43.0.2357.130 and ChromeDriver 2.16. It works now though (with no apparent change). |
We're on Ubuntu too (- using Codeship and their servers are based on Ubuntu Trusty) |
We're on Ubuntu as well (updated issue description with system information "Ubuntu 12.04.5 LTS (GNU/Linux 3.13.0-37-generic x86_64)"). |
The ubuntu servers also use Xvfb (X Virtual Frame Buffer) to use the browser without a window manager. |
Interesting; i've experienced some weird hang ups on Debian (wheezy) when using |
If you're having problems racing with Xvfb startup try using
Also, you can get more logs from chromedriver itself. Those often have more details about what went wrong (but often don't have enough useful info, either). Often we have to look into the chrome debug logs, too. See http://stackoverflow.com/questions/31662828/how-to-access-chromedriver-logs-for-protractor-test for suggestions on how to get additional chromedriver logs. |
Yup, using |
We have put xvfb in our init scripts, so as far as I know it is running soon after startup. Unless there is something else that needs to be done to make sure that it's "Ready" to accept connections, then I think xvfb is "ready" in my case. |
@tullmann We also have xvfb running from the beginning and some of the tests run fine before the hanging. But thanks for the chromedriver logs hint. Will try that as soon as possible. |
I'm using windows server 2012. If I run |
I managed to enable chrome driver logs (using this method).
In my logs folder I count the occurences in all log files:
|
You can hide/avoid the "multiple threads in process gpu-process" by adding Its odd that chromedriver isn't timing out (it looks like you're waiting an hour or more?). You might get more useful information from the chrome logs about what's going on. (The "DevTools request" stuff is from chromedriver trying to establish a basic connection to chrome -- it just polls repeatedly until it gets a connection). It looks like chromedriver receives no reply, but doesn't timeout either ... might be worth comparing this log to a "normal" case to see what the differences are in your setup.) To get more chrome debug logging add the following arguments to chrome's arguments (in your protractor config): |
Seems like enabling chrome logs fixes a race condition. The build job with chrome logging enabled refuses to hang while the build job without logging still hangs on a regular basis. |
Also enabled logging and still had it hang, but the log has perhaps something useful at the end:
The |
I'm hoping that this is fixed with the new version of chromedriver in Protractor 2.3.0 and higher. Can anyone confirm? |
@juliemr we've had it running for a few days now and a few hundred builds on 2.4 and haven't seen it hang, so yes, that seems to have fixed it. |
Whee! Closing - please open up a new issue if this crops up again. |
This should help with flakyness on chrome tests, especially e2e. For more information see: - angular/protractor#2419 (comment) - angular/protractor#2419 (comment)
This should help with flakyness on chrome tests, especially e2e. For more information see: - angular/protractor#2419 (comment) - angular/protractor#2419 (comment)
This should help with flakyness on chrome tests, especially e2e. For more information see: - angular/protractor#2419 (comment) - angular/protractor#2419 (comment)
@cnishina the problem for Protractor here is that we should time out, instead of hanging, with a reasonable error, if chrome can't start up. Can you take this one? |
Hi everyone! I plan to look into the hanging error and improve error reporting. On a side note, I just created a Jenkins server this weekend to try out a few Protractor tests. It appears there are Xvfb issues. If you are using Jenkins, there is an Xvfb plugin. This is my setup:
Console output snippets:
|
I'm facing the same issue on Windows. When I try to debug my tests from VSCode Protractor hangs forever at
My VSCode launch config runs a powershell script starting the SUT and selenium server in separate processes (using the Start-Process cmdlet). Only after both respond with HTTP 200 the launch config invokes protractor. VSCode debug setup is similar to that of Webstorm as described in the protractor docs. VSCode eventually invokes protractor like follows:
I also tried using Simply executing the tests from gulp (using gulp-angular-protractor) works fine though. The only difference I can see between the two (apart from debugger config) is that when running via gulp selenium, browsersync and protractor share standardInput/Output, while in debug mode they are separate. But that wouldn't make a difference, would it? |
I'm facing a similar problem on Windows 7 without xvfb. Tests will run but the process never terminate:
If I use the following command (copied from the angular quickstart):
It will hang at the last command. |
I got the same issue on running protractor tests in gitlab CI via docker executor. At the beginning tests run fast and everything is good but after some period of time (30-40 min) tests become extremely slow and protractor hangs out.
Protractor 4.0.9, chrome 53, chromederiver 2.24 |
We also had this issue and I can confirm that doing Protractor 5.0.0 |
We have the protractor hanging after
even when using the DBUS_SESSION_BUS_ADDRESS workaround. It happens about 20-30% of the cases in our Jenkins builds (even on the very same Jenkins slave). node.js 6.9.5 protractor is started by a npm script (in package.json): chromedriver logs are enabled by the following shell script line (run by the pre npm script): Xvfb is started before webdriver in a similar style (nohup + background) I just checked the chromedriver log and it shows:
Does anyone know how to track this down or how can I provide more debugging information (when it happens)? |
I updated chromedriver to 2.29 and chrome to 57. It still happened.
However on successful runs this also happens and the log continues:
It seems that https://bugs.chromium.org/p/chromedriver/issues/detail?id=1298 is the related bug report, which was closed without any real solution. |
I have this random issue too. npm logs:
Selenimu logs:
Then nothing until timeout. |
Great news for everyone in the thread: from version 59 Chrome will be supporting headless mode, so xvfb will not be needed anymore. Details are here: https://developers.google.com/web/updates/2017/04/headless-chrome |
Hm, the issue with headless chrome (v. 59) is, that sendkey interactions are not supported (you can not enter data into an input field 👎 ) See https://bugs.chromium.org/p/chromedriver/issues/detail?id=1772 |
I am getting similar issue where 1 instance of webdriver remains forever until I abort the test run in jenkins. Protractor hangs at Setup (protractor | headless chrome | docker | jenkins) Docker image : protractor.conf.js
Tried using : ENV DBUS_SESSION_BUS_ADDRESS /dev/null as suggested in docker file but error still exist. |
Any progress with this issue? I am using protractor 5.4.0 with "protractor-cucumber-framework": "6.0.0", and if some test fails in parallel mode, instance of webdriver is not shut down and hangs indefinitely. |
seeing this as well
|
Also seeing this. At first it would only happen intermittently and could be fixed with a restart, now it seems to happen every time. /** Protractor configuration */
exports.config = {
...
capabilities: {
browserName: 'chrome',
loggingPrefs: {
browser: 'SEVERE',
},
chromeOptions: {
args: [
'--allow-running-insecure-content',
'--use-fake-device-for-media-stream',
'--use-fake-ui-for-media-stream',
'--window-size=1920,1080',
'--enable-gpu-rasterization',
'--enable-impl-side-painting',
'--no-first-run',
'--no-sandbox',
'--incognito',
'--headless',
'--disable-infobars',
'--disable-session-crashed-bubble',
'--noerrdialogs',
'--disable-touch-adjustment',
'--disable-touch-events',
'--disable-pinch',
'--overscroll-history-navigation=0',
'--disable-setuid-sandbox',
'--js-flags="--expose-gc"',
]
}
},
directConnect: true,
framework: 'jasmine',
getPageTimeout: 5000,
allScriptsTimeout: 5000,
...
}; |
(#4966) |
Same issue when running parallel tests. Commenting |
I am still facing same error. below is my config:
}, },
} Please help me , I am stuck |
Guys & girls, seems like I have just found a workaroung, not very nice but at least working: |
I've been through this case before. |
At first glance this issue seems to be related with #1764 but I don't see how a network issue can cause the hanging here (
directConnect
is set totrue
). So here is the setup:protractor-config.js
Here is an extract of the essential parts of the Jenkins Job console log:
Note that it is not always the same tests scenario which leads to the hanging.
Same problems with node 0.10.33 as with 0.12.7.
Using Ubuntu 12.04.5 LTS (GNU/Linux 3.13.0-37-generic x86_64).
The text was updated successfully, but these errors were encountered: