Skip to content

Cypress 14.0.0: App Freezes on Redirect with Multiple Origins and Unresolved Network Requests #30945

Open
@kryshenp

Description

@kryshenp

Current behavior

After updating to Cypress 14.0.0, we encountered an issue where the Cypress app (both in headed and headless modes) freezes and becomes unresponsive. This happens on a Linux-based CI machine as well as locally on a Mac M1, regardless of whether the test is run in Chrome or Electron.

The issue did not occur in Cypress 13.17.0, where the tests ran smoothly.

The test involves a flow across multiple origins. Due to security reasons, I cannot provide a video recording, but here is the step-by-step description of the flow:
1. Log in to the account via the API.
2. Visit the billing page on our baseUrl domain:
https://staging.company.com/appname/profile/qa_tester_ui_1/settings/billing.
3. Click the “Set Up Billing” button, which redirects to the Register Wizard on a different origin:
https://billing-sb.company.com/register-wizard?token=VTJGc2RHVmtYMTl0bUVmbXBQZHBJZlo5MFp1TzBvczk3dElVc1RweHdPQT0=.
4. Click the “Start Setup” button, which redirects to the next tab with the Terms of Service (URL does not change).
5. Check the “Agree Terms of Service” checkbox and click the “Next” button, which redirects to the Pricing tab (the URL remains unchanged).
6. Check the “Agree Pricing” checkbox and click the “Next” button, which should redirect to the “Account” tab. The URL changes to:
https://billing-sb.company.com/sca-dev-2021-1-0/checkout.ssp?is=login&login=T&origin=home&origin_hash=register-wizard?token=VTJGc2RHVmtYMTl0bUVmbXBQZHBJZlo5MFp1TzBvczk3dElVc1RweHdPQT0=&cur=USD#login-register.
7. Instead of the expected “Account” page, we see a spinning loader in the corner of a blank screen. At this point, the Cypress app freezes entirely and becomes unresponsive. The only way to exit is to force quit the app.
8. Upon investigation, I noticed that during the freezing moment, two GET requests are triggered but never resolve:
https://billing-company/sca-dev-2021-1-0/services/LiveOrder.Service.ss?cur=1&internalid=cart&t=1737733129986&c=3441232_SB1&n=2&_=1737733129870
https://billing-sb.company.com/sca-dev-2021-1-0_ss2/extensions/AnchorGroup/GoogleCaptcha/1.0.0/Modules/GoogleCaptchaModule/SuiteScript2/GoogleCaptchaModule.Service.ss?c=3441232_SB1&n=2&_=1737733129871.

These requests appear to remain pending, with no visible status (e.g., 200 or 500), which may indicate an issue with the GoogleCaptchaModule, although we are not certain. When this flow is performed manually, the two GET requests are executed successfully with a 200 status code.

The Cypress runner freezes a few steps after the origin change, so the issue does not appear to be related to the origin change itself.

We also tried directly visiting the URL instead of relying on the redirect triggered by the “Next” button click. However, this did not change the behaviour. The new version of the Cypress runner still enters an infinite loop at the same point in the test.

Desired behavior

The Cypress runner should not freeze during test execution. Instead, the test should continue running smoothly. If an error occurs, the runner should provide a meaningful error message to help identify the issue and guide the debugging process.

Test code to reproduce

describe("Self Billing", () => {
  it("Returning-customer Billing setup flow", () => {
    cy.login("username");

    cy.visit("PROFILE_BILLING");

    cy.get("#username").find("#billingCardFooterToogleButton").click();
    cy.intercept("**/sendRegistrationInfo").as("sendRegistrationInfo");
    cy.get("#username").find("#billingCardBodyContactSetupSetupBilling").click();

    // Billing Portal Get Started step
    cy.wait("@sendRegistrationInfo").then(resp => {
      expect(resp.response?.body.regToken).to.match(/[a-zA-Z0-9]{8}/);
      cy.url().should("eq", `https://billing-sb.company.com/register-wizard?token=${resp.response?.body.regToken}`);
    });
    cy.contains("h2", "GET STARTED").should("have.class", "wizard-steps-item-active");
    cy.contains("button", "Start Setup").click();

    // Billing Portal Terms step
    cy.contains("h2", "TERMS").should("have.class", "wizard-steps-item-active");
    cy.get(".bill-first-data").find("h1").should("have.text", "SUBSCRIPTION TERMS OF SERVICE");
    cy.get("#agreeStep3").click();
    cy.contains("button", "Next").click();

    // Billing Portal Pricing step
    cy.contains("h2", "PRICING").should("have.class", "wizard-steps-item-active");
    cy.get(".register-pricing-tab-titles").within(() => {
      cy.get("[data-tab-content='register-pricing-tab-content-1']").should("have.text", "Azure US (West) Region")
        .and("not.have.class", "active").click();
    });

    cy.get("#agreeStep4").click();
    cy.contains("button", "Next").click();

    // !!! HERE CYPRESS 14 FREEZES !!!

    // Billing Portal Returning Customer Account Login step
    cy.contains("h2", "ACCOUNT").should("have.class", "wizard-steps-item-active");
  });
});

Cypress Version

14.0.0

Node version

v18.17.1

Operating System

MacOs 15.2 locally and Ubuntu 24.04.1 LTS on CI platfotm

Debug Logs

A full debug log from cypress test run is attached 
https://github.com/user-attachments/files/18538836/cypress-debug-log.log

Other

cypress-debug-log.log

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions