cypress
cypress copied to clipboard
cy.origin not working
Current behavior
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.ts 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: Agent List
export const login = (isAdminUser: boolean = false) => {
cy.visit('http://localhost:4200/');
cy.origin('https://login.example.com', () => {
Desired behavior
cy.origin should redirect to the url
Test code to reproduce
export const login = (isAdminUser: boolean = false) => {
cy.visit('http://localhost:4200/');
cy.origin('https://login.example.com', () => {
Cypress Version
13.5.1
Node version
16.20.2
Operating System
macOS 14.1.1
Debug Logs
No response
Other
There is no debug log to share as there is no error that is being seen. The only thing in my environment that changed is that macOS got updated
I have noticed the same behavior on our CI.
The difference between success and fail is an update from chrome 118 to 119. After installing Chrome 119 local I was able to reproduce this behavior. For now I'm going to just downgrade my CI's chrome to 118.
Probably new Chrome version is producing different load event behavior or something :thinking:
On my end issue seems to be occurring for electron as well. Electron Version 106
It worked after I downgraded to chrome 118. Maybe you would need to look into downgrading your electron :eyes:
I'm not sure if this is a bug for Cypress or Chrome/Chromium but hopefully there will be a fix :pray:
It seems that cypress is removing the origin from the request and even putting it back with intercept no longer works in Chrome 119. People in managed corporate environments can't control their Chrome version.
We'll need a piece of code we can run in order to investigate. Otherwise we can't look into what is going wrong in this situation. Can anyone provide an example we can fully run?
export const login = () => {
cy.visit('http://localhost:4200/');
cy.origin('https://qa-login.example.com', () => {
cy.get('#email').type(Cypress.env('APP_LOGIN_USER'));
cy.get('#password').type(Cypress.env('APP_LOGIN_PASS'));
cy.get('#submit-button').click();
});
};
This is the shared login function we have which fails to call cy.origin
@sufian1985 I wonder if visiting an https url on the visit might help? We've been having some issues crop up with http -> https upgrades since Chrome changed their logic around upgrade in more recent versions.
Did try it. It does not help.
Hey, Did you mange to solved this?
Nope...still facing this issue
I'm having the same issue. The test runs fine locally but in GitHub's CI, the page waits for Page Load then errors out after clicking "Next" in Google Authenticator after inputting the email address.
For me issue was macOS Private relay. Disabling it in my iCloud settings seems to have resolved my issues. Coincidently I found the fox by accident yesterday