Skip to content
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

page loads successfully, but cypress throws, pageload timeout error in case cross origin and iframe type of page only in chrome. #28235

Closed
swapnilAlgamwar opened this issue Nov 3, 2023 · 6 comments
Labels
browser: chrome stage: needs information Not enough info to reproduce the issue stale no activity on this issue for a long period

Comments

@swapnilAlgamwar
Copy link

swapnilAlgamwar commented Nov 3, 2023

Current behavior

Cypress fails to detect page load event in case cross origin and iframe type of web page.
Note : same code has been working fine on electron but fails on chrome.
image

Desired behavior

Page load timeout should not be seen, after page load is success.

Test code to reproduce

describe("template spec", () => {
  it("passes", () => {
    cy.visit("http://localhost:4200/ ");


    cy.get('[data-cy="login-auth-login-button"]').click({ force: true });

    //cy.get('#usercentrics-root').shadow().find('button[data-testid="uc-accept-all-button"]');
let otp =12456;
    const sentArgs = { myotp: otp };
    cy.origin(
      "https://someurl.com/login",
      { args: sentArgs },
      ({ myotp }) => {
        cy.get('input[type="email"]').type("[email protected]");

        cy.get('input[type="password"]').type("XXX");

        cy.get(".auth0-label-submit").click();
        
        cy.wait(10000);
        cy.get('input[id="code"]').type(myotp + "{enter}");

        //cy.click({ force: true });
        //cy.get('[data-cy="login-auth-login-button"]').click({ force: true });
      }
    );

Cypress Version

13.3.2

Node version

v18.16.1.

Operating System

Windows 10 Enterprise

Debug Logs

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.config.js` 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.
    at Context.eval (webpack://multi_factor_authentication/./cypress/e2e/mfatest.cy.js:15:7)
From Your Spec Code:
    at Context.eval (webpack://multi_factor_authentication/./cypress/e2e/mfatest.cy.js:15:7)

Other

No response

@jennifer-shehane
Copy link
Member

@swapnilAlgamwar Is this a new error in 13.3.2? Can you try downgrading to another version to see if this is resolved?

Is the page load timeout from the first load of the page or on the cross origin page load?

A reproducible example that we can run would be ideal.

@jennifer-shehane jennifer-shehane added browser: chrome stage: needs information Not enough info to reproduce the issue labels Nov 3, 2023
@aubincc
Copy link

aubincc commented Dec 11, 2023

Problem met :

  • on Chrome and Edge (not Electron, not Firefox)
  • with Cypress 13, 12 (and 11 with experimentalSessionAndOrigin true)
  • in a cy.visit() located in the validate() of the awesome cy.session() command.

I had not noticed it before.

How I trigger it :

  • launch Cypress npx cypress open --e2e
  • select any browser (Electron, Firefox, Chrome, Edge)
  • click "Start E2E Testing in (previously selected browser)
  • click on one of your tests
  • close the current browser windows
  • click on Chrome or Edge
  • click "Start E2E Testing in (Chrome or Edge)
  • click on one of your tests 💥

Sorry I haven't had the time to make an isolated test for that.

@williamjameswillis
Copy link

williamjameswillis commented Dec 19, 2023

we have the same error being thrown when we upgrade Edge or Chrome to version 120, and its only in headless mode... the same tests pass fine in headed mode

setting chromeWebSecurity 'fixes' the issue but its obviously a sub optimal workaround

exact same tests run without error in headless mode in Edge or Chrome 119 or lower so assuming its related to the security changes in chromium 120

@aubincc
Copy link

aubincc commented Jan 25, 2024

  • chromeWebSecurity: false makes no difference in my case
  • Chrome 121 doesn't change anything

@cypress-app-bot
Copy link
Collaborator

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label Jul 24, 2024
@cypress-app-bot
Copy link
Collaborator

This issue has been closed due to inactivity.

@cypress-app-bot cypress-app-bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser: chrome stage: needs information Not enough info to reproduce the issue stale no activity on this issue for a long period
Projects
None yet
Development

No branches or pull requests

5 participants