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

I am unable to login with valid username and password on a website - timeout #2911

Closed
johnnylcp opened this issue Dec 7, 2018 · 5 comments · May be fixed by paulbaudrier/cypress#54, noahblon/cypress#65 or paulbaudrier/cypress#89

Comments

@johnnylcp
Copy link

johnnylcp commented Dec 7, 2018

Is this a Feature or Bug?

bug

Current behavior:

I get the following error when I use a valid username and password to login to the moviedb webpage.
I have tried to increase pageloadtimeout value to 120000 but to no avail.
The weird thing is when I use a invalid password or invalid username and press the Login button. It works.

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.

Desired behavior:

With a valid username and password. I should be able to press the Login button

Steps to reproduce: (app code and test code)

This is my code:

describe('Login in', function () {`
    it('allows you to log in', () => {
        cy.viewport(1920, 1080)
        cy.visit('https://www.themoviedb.org/login')
        const username="johnnymovie"
        const pw = "p4ssword";

        cy.get('.k-form').find('[type="text"]').type('johnnymovie')
        cy.get('.k-form').find('[type="password"]').type(pw)
        cy.get('.k-form').submit()
        //cy.get('.flex > .k-button').should('contain', 'Login').click()
    })
})

Versions

cypress version: 3.1.2
OS: Windows 10
browser: chrome

@jennifer-shehane
Copy link
Member

Hey @johnnylcp, if you open the devtools console, you can see an error being printed on successful login:

Mixed Content: The page at 'https://www.themoviedb.org/__/#/tests/integration/examples/misc.spec.js' was loaded over HTTPS, but requested an insecure form action 'http://www.themoviedb.org/u/johnnymovie'. This request has been blocked; the content must be served over HTTPS.

This error is due to the browser's security checks and can be disabled within Cypress by setting chromeWebSecurity to false in your cypress.json

@johnnylcp
Copy link
Author

Thanks jennifer. That worked

@mdp27
Copy link

mdp27 commented Sep 25, 2019

I just had a similar issue where my site would not load the page after login even though the login credentials were successful and I could log in manually with the same account. The Cypress test timed out after 60 seconds with a page load error and I was stuck until I saw this. Changing the chromeWebSecurity to false did the trick.

@prudhvidandamudi
Copy link

@jennifer-shehane

I am in the same situation wherein our organization, there are multiple domain switches in the same tests. Also switching from https to HTTP protocol. when I am using chromeWebSecurity to false in mycypress.json it works well. But some of the pages are refusing to display content and displaying blank screen because of using chromeWebSecurity to false

Refused to display 'https://nve75756.sprint.dynatracelabs.com/#deploy' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'

what is the work around?

@jennifer-shehane
Copy link
Member

If you believe you are experiencing bug in Cypress, open a new issue with a fully reproducible example that we can run end to end on our machines.

For questions, check out our community chat, it can be helpful for debugging or answering questions on how to use Cypress.

@cypress-io cypress-io locked and limited conversation to collaborators Dec 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants