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

Protractor timing out instantly on some tests #622

Closed
nat-n opened this issue Mar 19, 2014 · 5 comments
Closed

Protractor timing out instantly on some tests #622

nat-n opened this issue Mar 19, 2014 · 5 comments

Comments

@nat-n
Copy link

nat-n commented Mar 19, 2014

Some tests are failing with an error like the following using Version 0.20.1

Error: Timed out waiting for Protractor to synchronize with the page after 2147483.648 seconds. Please see https://github.com/angular/protractor/blob/master/docs/faq.md

allScriptsTimeout is set to 1100000000000000000

The test page doesn't have any use of $timeout or $http or anything like that. I'm not calling waitForAngular anywhere, but am calling browser.sleep(100).then... in the beforeEach function.

Somehow protractor thinks it's been waiting for 2147483.648 seconds, or for it to timeout pretty much instantly.

@nat-n
Copy link
Author

nat-n commented Mar 19, 2014

Ironically extending, extending the sleep time in the beforeEach from 100 to 200 make the error go away... solves my problem but still looks like a bug in that the error doesn't make sense.

Maybe also worth noting is that which tests trigger this error doesn't seem to be particularly deterministic/consistent, but it may be something to do with calling isPresent or isDisplayed on the object returned by element(protractor.By.id('...'))

Edit: apparently setting browser.ignoreSynchronization = true makes the problem go away more reliably, does this make sense? Does this make sense given that the only asynchronous feature of the page is loading templates for a view and loading the template for the directive being tested?

Could be that the only "bug" here is the reporting of 2147483.648 seconds?

@juliemr
Copy link
Member

juliemr commented Mar 20, 2014

It'd be helpful to know what browser you're testing against (they treat timeouts differently)

@juliemr
Copy link
Member

juliemr commented Mar 20, 2014

Got it! Your allScriptsTimeout is so big that it overflows! Try knocking off a few of those zeros to '1100000000'

@juliemr
Copy link
Member

juliemr commented Mar 20, 2014

Follow-up probably of no interest - unfortunately the overflow is occurring on the on the Driver side of the Test -> Driver protocol. So, Protractor can't easily warn about the overflow, unless we figure out the limits based on the type of driver.

FYI - you can set allScriptsTimeout to 0 if you want there to be no timeout.

@nat-n
Copy link
Author

nat-n commented Mar 20, 2014

Thanks a bunch. Setting a sane timeout banishes the insane timeout errors. I'm using chrome.

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

No branches or pull requests

2 participants