
1) "before each" hook for "Approve an instance, for AWS provider, with the default data"
0 passing (1m)
1 failing
1) Test
"before each" hook for "Test":
CypressError: Timed out after waiting '60000ms' for your remote page to load.
Your page did not fire its 'load' event within '60000ms'.
You can try increasing the 'pageLoadTimeout' value in 'cypress.json' to wait longer.
Browsers will not fire the 'load' event until all stylesheets and scripts are done downloading.
When this 'load' event occurs, Cypress will continue running commands.
Because this error occurred during a 'before each' hook we are skipping the remaining tests in the current suite: 'Test...'
at Object.cypressErr (http://localhost:60970/__cypress/runner/cypress_runner.js:67594:11)
at Object.throwErr (http://localhost:60970/__cypress/runner/cypress_runner.js:67559:18)
at Object.throwErrByPath (http://localhost:60970/__cypress/runner/cypress_runner.js:67586:17)
at timedOutWaitingForPageLoad (http://localhost:60970/__cypress/runner/cypress_runner.js:57781:17)
at http://localhost:60970/__cypress/runner/cypress_runner.js:58390:18
at tryCatcher (http://localhost:60970/__cypress/runner/cypress_runner.js:6846:23)
at http://localhost:60970/__cypress/runner/cypress_runner.js:2163:41
at tryCatcher (http://localhost:60970/__cypress/runner/cypress_runner.js:6846:23)
at Promise._settlePromiseFromHandler (http://localhost:60970/__cypress/runner/cypress_runner.js:4868:31)
at Promise._settlePromise (http://localhost:60970/__cypress/runner/cypress_runner.js:4925:18)
at Promise._settlePromise0 (http://localhost:60970/__cypress/runner/cypress_runner.js:4970:10)
at Promise._settlePromises (http://localhost:60970/__cypress/runner/cypress_runner.js:5045:18)
at Async._drainQueue (http://localhost:60970/__cypress/runner/cypress_runner.js:1778:16)
at Async._drainQueues (http://localhost:60970/__cypress/runner/cypress_runner.js:1788:10)
at Async.drainQueues (http://localhost:60970/__cypress/runner/cypress_runner.js:1662:14)
The test should not fail in cy.visit() command.
cy.clearCookie('react').clearCookie('angular');
cy.clearLocalAndSessionStorage();
cy.getURLByEnv().then(url => {
cy.visit(url);
cy.loginThroughRequest(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
cy.reload();
});
Sorry for not providing the app's url.
I get the same behavior if try to run the tests with cypress open or cypress run.
I don't know if it's a OS issue or its an issue with the steps I wrote or caching.
The problem occurs randomly, sometimes disconnected/connected the ethernet cable and the tests worked. Sometimes I retry running the tests and it works.
It's important to state that before running each spec I do clearCache and localStorage as it caused problems in the past.
Cypress: 3.1.0
NodeJS: 8.12.0
OS: MacOS Mojave 10.14
Any solution is welcomed. Thanks in advance!
This is the local Storage when the visit command fails.

@vpetrache It appears that your application is not firing it's load event within 60 seconds.
Have you tried increasing the timeout to allow more time for your page to load? cy.visit('url', { timeout: 80000 })
Can you verify that your app is firing the load event and Cypress is incorrectly logging this error anyway?
I encountered a similar issue very often. even the same test. sometimes it just fails. I wonder if anyway that we can debug or capture more log for troubleshooting.
```
CypressError: Timed out after waiting '50000ms' for your remote page to load.
Your page did not fire its 'load' event within '50000ms'.
You can try increasing the 'pageLoadTimeout' value in 'cypress.json' to wait longer.
Browsers will not fire the 'load' event until all stylesheets and scripts are done downloading.
When this 'load' event occurs, Cypress will continue running commands.
Because this error occurred during a 'before all' hook we are skipping the remaining tests in the current suite: 'Account Setup'
```
I also encountered this issue. We are running our app in a docker container on the bitbucket pipelines, and then run cypress tests which randomly fail (we reran it a few times, and each time other tasks fail). After bumping the value to 3 minutes it seems not to happen anymore.
@EdwinMeijne @jennifer-shehane Increasing the load timeout to 120000 fixed the issue. Thanks for the solution.
I have to come back from my previous statement; I just had failing tests again. I will bump now to 5 minutes to see if that resolves it as we add more tests (we are mainly writing tests currently)
@EdwinMeijne We're having the same issue. Identical setup
We're also experiencing the same issue, with a React SPA, even though the page is visibly done loading in the screenshot taken by Cypress. This only happens in CI, and also only randomly.
We'll need a reproducible example to reopen this issue. Can anyone provide a way to reproduce this?
After tuning the timeouts to 30000 we haven't run into this issue in CI. Sometimes on very busy machines. If people still need help with the bitbucket setup, etc. feel free to ask
Everything works perfectly locally, but when ran on Bitbucket Pipelines, it flakes out consistently.
Adding cy.visit('url', { timeout: 30000 }) solved it. Thanks!
Something about Docker makes it need more time.
I wonder if there is a way to retry the commands once or twice before failing? that way we wound't need to bump the timeout too high because if the page randomly got stuck on loading, it doesn't matter how long the wait it, because it just makes the whole testing suite to be very slow.
@rodrigovolkmer There is an issue open regarding retrying tests / commands here: https://github.com/cypress-io/cypress/issues/1313 with some current workarounds to implement this.
How can we just try a retry, if cy.visit() fails once?
@canderson22 See this thread: https://github.com/cypress-io/cypress/issues/1313 Also this plugin: https://github.com/Bkucera/cypress-plugin-retries
before(()=>{
cy.visit((URL, {timeout: 80000 }); //Color Screen
cy.login();
});
url is redirection, meaning its callas login.aspx but get back default.aspx. Server redirects it to different page.
"before all" hook for "Test numeric field":
CypressError: Timed out after waiting `80000ms` for your remote page to load.
Your page did not fire its `load` event within `80000ms`.
You can try increasing the `pageLoadTimeout` value in `cypress.json` to wait longer.
Browsers will not fire the `load` event until all stylesheets and scripts are done downloading.
When this `load` event occurs, Cypress will continue running commands.
Because this error occurred during a `before all` hook we are skipping the remaining tests in the current suite: `Test screen feature II`
at timedOutWaitingForPageLoad (URL__cypress/runner/cypress_runner.js:144463:13)
at (URL/__cypress/runner/cypress_runner.js:145424:16
at tryCatcher ((URL/__cypress/runner/cypress_runner.js:10384:23)
at(URL/__cypress/runner/cypress_runner.js:5506:41
at tryCatcher ((URL/__cypress/runner/cypress_runner.js:10384:23)
at Promise._settlePromiseFromHandler ((URL/__cypress/runner/cypress_runner.js:8319:31)
at Promise._settlePromise ((URL/__cypress/runner/cypress_runner.js:8376:18)
at Promise._settlePromise0 ((URL/__cypress/runner/cypress_runner.js:8421:10)
at Promise._settlePromises ((URL/__cypress/runner/cypress_runner.js:8497:18)
at _drainQueueStep ((URL/__cypress/runner/cypress_runner.js:5091:12)
at _drainQueue ((URL/__cypress/runner/cypress_runner.js:5084:9)
at Async.../../node_modules/bluebird/js/release/async.js.Async._drainQueues ((URL/__cypress/runner/cypress_runner.js:5100:5)
at Async.drainQueues ((URL/__cypress/runner/cypress_runner.js:4970:14)
From Your Spec Code:
at Context.eval ((URL/__cypress/tests?p=cypress\integration\screen-feature-2.rkumar.spec.js:18:8)
I had this same error, and realized I hadn't updated Cypress for a VERY LONG time. haha. I was at version 3.8.2. I updated to 4.8.0 and it worked perfect.
I am facing this issue because domain changes on my app in between. Any solution?
Most helpful comment
I encountered a similar issue very often. even the same test. sometimes it just fails. I wonder if anyway that we can debug or capture more log for troubleshooting.
```
CypressError: Timed out after waiting '50000ms' for your remote page to load.
Your page did not fire its 'load' event within '50000ms'.
You can try increasing the 'pageLoadTimeout' value in 'cypress.json' to wait longer.
Browsers will not fire the 'load' event until all stylesheets and scripts are done downloading.
When this 'load' event occurs, Cypress will continue running commands.
Because this error occurred during a 'before all' hook we are skipping the remaining tests in the current suite: 'Account Setup'
```