cypress: __/#/tests/... page errors 404 - page not found on Chrome 72+

Is this a Feature or Bug?

BUG

Current behavior:

Sometimes when I run all tests I have such error: image

Important thing that I noticed If i remove tests “group_page.js” (check gif) it seems that the problem disappeared. “group_page.js” using different page: cy.visit(https://localhost:5002) for testing when the other tests that crashing using cy.visit(https://localhost:5000) error2

Check this gif, I had to run 3 times RUN ALL TESTS to make it work. Before always failed at login_page.js

I was trying hardcode url in cy.visit() (before I had url from cypress.json). The same result.

Steps to reproduce:

Run a few tests that include cy.visit(https://localhost:5002) for 1st test and cy.visit(https://localhost:5000) for 2nd test.

Versions

Cypress: 3.0.1 Windows 10 Chrome

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 7
  • Comments: 34 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Current Workaround

Add the code below to your cypress/plugins/index.js file to fix the 404 issue:

module.exports = (on) => {
  on('before:browser:launch', (browser = {}, args) => {
    if (browser.name === 'chrome') { 
      // ^ make sure this is your browser name, you may 
      // be using 'canary' or 'chromium' for example, so change it to match!
      args.push('--proxy-bypass-list=<-loopback>')
      return args
    }
  })
}

I’ve opened a PR to fix this is Cypress here: https://github.com/cypress-io/cypress/pull/3049

Released in 3.1.5.

This is still happening to me in 3.2.0

@acailly Probably service-worker just covering the real issue. Still investigating

I’m having the same issue, and am struggling to debug it. It works fine when running against localhost, but when I try running it against a deployed version of the application from my computer, I get 404 instead of the cypress runner application. The 404 page shown is the 404 page generated by our application (using Vue). This makes sense, because the URL path is /__/ which should result into a 404 in our application. Something seems to prevent the cypress runner from starting up, instead it loads the application directly.

This happens both when I run a single spec file and when I run all.

+1 We’re having the same issue

I want to add in that I have this same issue. Thought upgrading to 3.x branch would fix this but persists as it did in the 2.x branch.

I have two spec files, each testing a different user experience. One is on one domain, one is on another. The first spec file to run (alpha order first) completes without issue. When it tries to go to the second spec file it refreshes, runs the first spec file again, then when it hits the second spec file for a second time, results in a 404 not found for the /#/tests/__all path.

If I run each file individually the tests complete successfully. This is problematic as these run after each release and therefore both files need to be able to run for each request.

This occurs via interactive mode. If I run it via command line the first spec file completes successfully and the second file hangs. Cypress never terminates, which is also problematic.

Cypress 2.1.0 or 3.0.1 Windows 10 Chrome