protractor: Protractor tests hanging in Chrome after navigating to initial data url
After the recent Chrome update I’ve been having issues getting my specs to run using ChromeDriver. The test execution stalls after trying to navigate to the first data URL. It seems that the URL gets garbled somehow on its way into the browser, as it ends up as: “data:,” in the URL field.
Here is the output from the driver:
A Jasmine spec timed out. Resetting the WebDriver Control Flow. The last active task was:
WebDriver.navigate().to(data:text/html,<html></html>)
The chrome driver version is 2.10, and the browser version is 36.0.1985.143
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Reactions: 2
- Comments: 61 (7 by maintainers)
So
export LANG=en_US.UTF-8
fixed that for me. But it’s really ugly.@beniamin-kis thanq now it is working
@hankduan I am getting this on an incredibly simple, single spec suite.
WHAT SOLVED MY PROBLEM:
I noticed one consistency in comments that many folks have been trying to connect to localhost when they faced this. So I did. To solve this I had to simply change this line
await browser.get( "localhost:9000" );
to thisawait browser.get( "http://localhost:9000/#/members" );
Seems like this issue: https://bugs.chromium.org/p/chromedriver/issues/detail?id=1552
I have a different issue, though. Sometimes my tests are hanging at start with the “data:text/html,<html></html>” url in the browser. And then after 30 seconds or so, the URL changes and my app is open (angular app). This only happens with Chrome. Firefox loads the page instantly.
It happens when manually navigating to the app, as well.
I’m still encountering this issue with the following (up to date) dependencies:
protractor
version4.0.9
webdriver-manager
version10.2.7
chromedriver
version2.25.426935
chrome
version54.0.2840.87
For the time being I switched to using Canary with the following settings within
protractor.conf.js
:@ShrutiDalvi i tried , allScriptsTimeout: 900000 and getting same error. this is what i got: error.
NOTE: also i tried
return browser.ignoreSynchronization = true;
at least chrome redirect me to calculatorURL but them nothing more happens and got same error.the example is simple but i dont get the issue
I was also running into this issue and found out it occurred when I used the getText() function on an element within my page object. Doing the same from within the actual test did not produce any errors.
I hope that helps.