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
Protractor tests fail on chrome v56 & v57 - chrome not reachable #4164
Comments
Hmm, these issues can be tough to debug; i've seen this happen intermittently on Debian boxes with versions of Chromedriver/Selenium and it's usually fixed by a patch in either of those projects. There's often nothing that we can do in Protractor core but we can try to remove as many variables as possible. Do you have an example repository that I can use to try and repro on an ubuntu VM? I'm assuming this probably happens regardless of the code, but do you also experience it running the example repo? Also, what is your exact chrome version? |
Yeah, this one was a total pain to debug. This definitely seems like a chrome issue, but wanted to see if maybe this was known, or my brain is just being dumb. I sent it to chrome... so we'll see. Solution for now is DO NOT UPGRADE CHROME PAST v55 UNDER ANY CIRCUMSTANCE :) |
Also... in an unrelated issue... GO BUCKY!!!1! |
Sweet! (as in 16) Thanks, Nick. |
I am also having the same problem on my mac. |
@joshuacano (and anyone else) can you post your full specs:
I'm not able to reproduce on OSX |
Update web driver for chrome v57 |
This occurs for me as well, whether I use So I cannot run Protractor at all on a CI server (CodeBuild on Ubuntu 14.04). |
So I'm not crazy! Well... about this. @dinvlad, I was able to run my CI by reverting to Chrome v55, which works with Protractor 5.x. |
Interesting, this could be a nix + chrome issue then |
Without Xvfb, I was able to run Karma using the '--headless' option for Chrome as well on Cloud9. But Protractor refuses to eat it for some reason (it does run Chrome with that option, but still hangs). That could indicate Protractor's issue. @qualityshepherd, could you try running Chrome with |
@NickTomlin Apologies for not responding earlier. I could not reproduce the problem via the standalone example you gave. I diagnosed the issue and it is related to running an old version of karma with the latest protractor. I had to upgrade karma to get this to work correctly. |
So I've got a bit more consistency with this. Karma runs fine for 57 both on what I consider "local" system (Cloud9), even though it's headless, and "remote" (CI on AWS), but only when I use However, Protractor fails to run with this flag on either system. I use the same Chrome flags for both frameworks. At this point it appears that either Protractor or ChromeDriver are unable to communicate with Chrome given these flags. Protractor still does run with Xvfb on the "local" system though (a bit of good news). |
UPDATE: Got it to work! According to https://bugs.chromium.org/p/chromedriver/issues/detail?id=878, it's ChromeDriver that doesn't like mixing Chrome's
@qualityshepherd, you might be interested in using this option instead of Xvfb - see if that solves your issues as well. Granted that doesn't address the problem with Xvfb itself, but if we can avoid another tool that's even better, IMO. |
Neat! I was not aware of the For others, here's the gist... |
[rant] Have I mentioned that automation is silly and should be avoided? |
What's failing? |
I'm going to go ahead and close this since it seems to be a chromedriver issue and there's nothing really actionable on the protractor side of things. Sounds like there are a few ongoing threads here that it might be useful to collect even if this issue closes. It may be worth creating (and then answering) a StackOverflow question about this as "documentation" as well. Thanks for doing digging and discovery here; y'all are awesome 😄 |
Yeah, there's some weird stuff going on in chromedriver currently. I can't quite nail down the exact issue. My rant above was a day where my ci build stopped working (likely Codeship change), which was a similar issue to this one. I got it fixed, then the next morning, my fix broke :) Fun times. I was also seeing funky behavior using the later chromedriver version... which seems to resolve only when backing up to v2.25 (with chrome v55). Which is what I'm running successfully now. I think there's also an issue whereby Protractor will select the older chromedriver installed (eg. if you had 2.27 & 2.29, i'll use 2.27). Assuming this is not the expected behavior (@NickTomlin?), this is very likely causing some of the random issues people are reporting around the internets. |
Probly an afterthought, but I also noticed that too many Github API attempts to download some Chromedriver files lead to throttling errors, and fail builds as a result because Protractor cannot download some jars. Not sure if this needs to be addressed on the Protractor or Chromedriver side (if at all; i.e. we cannot do anything about it unless there are other "mirrors" for those files). |
FYI guys, --headless is neat but it's extremely new. It's only in Chrome 59, which as of this date is still in beta. You might see chromedriver bugs specific to headless or specific to that version of chrome. Issues like this are most likely not related to Protractor, but to the combination of Selenium Standalone server, chromedriver, and Chrome that you're using. Except for cases where Protractor is accidentally using an outdated chromedriver or failing to download it, those are things we can fix. We've had some issues with people having a globally installed version of webdriver-manager that was different than their project, which can sometimes cause problems like that. |
SOLVED: I found some time to investigate this, and finally figured it out. Something in Chrome v56+ changed, so that if you're running it via Protractor (or anything), on a Linux server, as root, it will not start and fail your tests. Yes, yes... don't run as root. Whatever. This really sucked because it worked up to v56, and I didn't see a notice of the change. It also took days to debug and refactor around. So there you go... the solution is to not run chrome as root. Create a new user to run your tests with. But add them to sudoers so you can start xvfb ;) |
And yeah, @heathkit, I've had webdriver-manager sometimes use the older chromedriver, when multiple are installed. It got me to do a All these great tools come with so many sharp edges :) Really glad there are great resources like github, and stackoverflow to help sort them out. Hope my answer above somes some folks some time, as so many answers have saved mine. |
Hopefully, --headless will become stable enough so we don't have to run Xvfb in the first place. So far, I hadn't had any issues with it. Also, not sure why but it's actually already in 58 on the 'stable' branch. As judged by 'google-chrome-stable' package. |
Agreed... I'd love to see all the browsers allow headless runs. I'd love to run Safari at all 🚎 Oh Safari... the new IE6 |
@qualityshepherd Could you post examples here of your solution? This error is killing me when running tests on Codeship
Example? |
Sure @rafaelcs, you just need to create a new user on your linux box, add them to sudo, and run your tests as that user. I have a script that builds my servers, so I added the following to automate the creation of a new user:
|
@qualityshepherd I am seeing the same issue in the Jenkins job. Tests run fine locally on Mac, but not on Jenkins server which is on Linux. I don't have access to our Jenkins server :|
|
This error is no longer happening to me since when I changed my projects to circleCI and before starting the tests I install the latest version of chrome on the server (linux) via command line. Example:
|
Also works for me with CircleCI, although I din't have to install the browser - just use |
Faced similar issue with a Docker image (https://hub.docker.com/r/webnicer/protractor-headless/). This thread helped me to realize the issue. Using an older image associated with Chrome 55 fixed the issue. |
With latest version of Chrome, Protractor not working. I am just able to load the URL. Further commands like sendleys,getText etc are not working. No error shown in log. Chrome version: 66 |
update webdriver manager also
Thanks
Ajitabh Ranjan
Mob: 9430331985
…On Tue, May 15, 2018 at 11:09 AM, stemkar123 ***@***.***> wrote:
With latest version of Chrome, Protractor not working. I am just able to
load the URL. Further commands like sendleys,getText etc are not working.
No error shown in log.
Chrome version: 66
Protractor- 5.3.0
ChromeDriver- 2.38
selenium-server-standalone- 3.12.0
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4164 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AOad57mC7_Ydp5j8nR36s-UzpQMDNYAgks5tymn5gaJpZM4MheuL>
.
|
somehow I am able to send keys. But there is another issue I am facing i.e webelement is not getting clicked with click() function. I have to use "browser.executeScript("arguments[0].click();", )" statement to click & this is working fine. Any idea why this is happening & how to resolve this |
I run Protractor tests on an Ubuntu 16 server via xvfb. This was working fine with 4.0.14 and google-chrome-stable v54. When I updated to Protractor 5.1.1 (which requires Chrome v55+), and chrome 57 (latest), my tests stopped working, and would timeout with:
Impact:
Does not occur with chrome v54 or v55
Occurs with both
directConnect
and when specifying the correctseleniumServerJar
in configOccurs with latest Protractor v4x and v5x
Node v6.10.0
The text was updated successfully, but these errors were encountered: