Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

browser.get() and browser.takeScreenshot() won't resolve. #3066

Closed
jacksierkstra opened this issue Mar 25, 2016 · 10 comments
Closed

browser.get() and browser.takeScreenshot() won't resolve. #3066

jacksierkstra opened this issue Mar 25, 2016 · 10 comments

Comments

@jacksierkstra
Copy link

Bug report

  • Node Version: v4.2.1
  • Protractor Version: 3.2.2
  • Browser(s): chrome
  • Operating System and Version Windows 7
  • Your protractor configuration file
  • A relevant example test
    Do a regular browser.get('http://google.com');
  • Output from running the test
    Timeout after x sec.
  • Steps to reproduce the bug
    Do a regular browser.get('http://google.com');
  • The URL you are running your tests against (if relevant)
    Localhost (not relevant).

After upgrading to protractor 3.2.2 (was 3.2.1) I suddenly see all kind of problems with resolving promises. After I downgrade to 3.2.1, the problem is gone. Can anybody look into this?

@juliemr
Copy link
Member

juliemr commented Apr 2, 2016

Can you clarify what "all kinds of problems" means?

@jacksierkstra
Copy link
Author

Sure. "all kinds of problems" means that both of the aforementioned promises won't resolve. It might be the case that more promises won't resolve, but I haven't tested this. Anyway, it should be really easy to reproduce with the information above. If you need anymore information, please let me know.

@juliemr
Copy link
Member

juliemr commented Apr 4, 2016

We have tested protractor against chrome and it works fine. Please make sure that you've run npm install with version 3.2.2 to get the newest dependencies.

@teddyhwang
Copy link

I've also noticed that when I upgraded from 3.2.1 to 3.2.2, browser.get(browser.baseUrl) seems to just hang and the test suite would eventually timeout. The app is on Angular v1.2.29.

@jpzwarte
Copy link

jpzwarte commented Apr 7, 2016

I'm having the same issue here, but downgrading protractor does not do the trick. This spec often resolves, but sometimes also times out:

    fit('asdf', function () {
        browser.driver.get('http://google.com').then(function () {
            console.log('google', arguments);
        });
    });
Using ChromeDriver directly...
[launcher] Running 1 instances of WebDriver
Started
google { '0': null }
.


Ran 1 of 3 specs
1 spec, 0 failures
Finished in 1.304 seconds
[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #1 passed
Using ChromeDriver directly...
[launcher] Running 1 instances of WebDriver
Started
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
F

Failures:
1) Stream page asdf
  Message:
    Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
  Stack:
    Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
        at Timeout._onTimeout (/Users/jeroen/Projects/vooruit/frontend/vooruit/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1909:23)

Ran 1 of 3 specs
1 spec, 1 failure
Finished in 10.019 seconds

Could this maybe be related to Chrome itself? I'm running Version 51.0.2700.0 dev (64-bit).

@jacksierkstra
Copy link
Author

Additional info from my side:
Angular version: 1.2.25
Chrome version: 49.0.2623.112 m
Windows version: Windows 7 (64-bit)
Chromedriver version: 2.21.2

Still the same problem. Updating protractor from 3.2.1 to 3.2.2 results in the above problem.

@sjclemmy
Copy link

I've just been setting up Protractor on a new project and I've been having 'all kinds of problems' also. Lots of inconsistent behaviour relating to the control flow. I've switched to Firefox and behaviour is as expected.
I have exact same version of Chrome - 49.0.2623.112.

@jpzwarte
Copy link

My problems are gone! I'm not sure what did the trick, perhaps a newer version of Chrome. I'm currently running 51.0.2704.19 dev (64-bit). Chrome and Firefox both behave the same now.

@juliemr
Copy link
Member

juliemr commented Apr 25, 2016

I believe this is due to #3115 - which made things fail for older versions of Angular. It is fixed in v3.3.0.

@juliemr juliemr closed this as completed Apr 25, 2016
@igniteram
Copy link
Contributor

igniteram commented Apr 28, 2016

@teddyhwang The "baseurl" in protractor config file is an internal key to the config object so the browser won't recognize it as a browser's property, try passing "baseurl" directly - browser.get(baseUrl);
This would tell the browser to get the specific url and wait for angular to render, this happens internally.

@cnishina please correct me if I am wrong!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants