-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
__/#/tests/... page errors 404 - page not found on Chrome 72+ #1872
Comments
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 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 |
Wanted to add to my previous comment with additional information. I have been testing this and I can't seem to get this to work when it's on the same domain, either. The second feature I wanted to test is a self-hosted feature, meaning it's a JS file that other sites would add to their site. I was testing it on a different domain that we own. However, I have since created a page to host this for testing on the same domain as the other tests and it still does this same behavior as before. So I don't believe this to just be an issue because of two different domains. I believe this is an issue with the tests being broken out into multiple spec files. Even though neither test file inherits from the other I am able to replicate that the first file completes, runs a second time (for some unknown reason) and then the second test file stalls. I have been trying to see if I can get all tests to run in a single spec file, but so far that has proved unsuccessful for some unknown reason I am still trying to determine. I tested this on both 2.x and 3.x versions and the problem persists when tests are split between files. |
@bgp1 Did you find any workaround so far? |
My workaround is to host the second application on the same domain as the first (I just created a page on there to trigger it) and then included all of the tests for both applications in a single spec file. Working for me, although not ideal. |
:/ I can't do the same thing. So I have to wait for fix... |
How long it can be in stage: "needs investigating"? |
@jennifer-shehane is it possible that you are going to fix it soon? |
I was not able to reproduce this issue. I visited 2 websites on spec1.js context('Site 1', () => {
beforeEach(() => {
cy.visit('http://localhost:8080/commands/actions')
})
it('get an el', () => {
cy.get('.action-email')
})
}) spec2.js context('Site 2', () => {
beforeEach(() => {
cy.visit('http://localhost:3030/')
})
it('gets el', () => {
cy.contains('Features')
})
}) @pklejnowski There is some other factor that is influencing the crash and will have to have a reproducible issue in order to begin investigating what the issue is. |
@bgp1 In reference to your comment:
The first test file is not running again, but since we did go to a different url in the main window browser, the first test in the Command Line does have to re - render, so it * looks * like it is running again, when the Command is just rendering to the fresh page. |
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. |
I have the same Issue as @Gachapen. A "/_" is added to the app's URL and it's loaded in the chrome address bar not in the cypress-created view within. describe('create content', function () {
it('opening app', function () {
cy.wait(1000),
cy.visit('https://dev.site.com');
});
}); and the result is our App's 404 page on For me it might be an issue that I'm using an external URL. |
If it helps, I ran into this problem by following the tutorial. Steps I followed:
Then create a describe('My First Test', function() {
it('Visits the Kitchen Sink', function() {
cy.visit('https://example.cypress.io')
})
}) Then click on this file in cypress GUI:
Node version: 8.11.1 |
thank you @acailly . That really did help because it made me check the examples again. Did you check wether your The browser also navigated to example.cypress.io but successfully: |
@jennifer-shehane @acailly @SimoneDahmen |
@vadymkukhtinOD I don't see any registered service-worker in the application tab of dev tools |
I don't have any service-worker and this problem still occurs in my application. |
This comment has been minimized.
This comment has been minimized.
@acailly Probably service-worker just covering the real issue. Still investigating |
This comment has been minimized.
This comment has been minimized.
@jennifer-shehane any updates or workaround since it's bit of a hinderance when writing test cases. |
Unfortunately we cannot investigate an issue if no reproducible example is provided. Can anyone provide a way to reproduce this exactly? |
@jennifer-shehane I am working on a Mac, have a parent folder with one cypress child and one yarn child. In the yarn child I have the app files, in the cypress/integration I have my tests files. Both child folders have their own git repository. That very integration folder I open in cypress (cypress I have in my applications so I'm not starting it via terminal). When reproducing this again, I noticed that the first script I run after opening cypress works, but the ones afterwards don't. So when I close/stop the remote chrome window and try to run another test file, I will have this issue. |
@SimoneDahmen Ok, you are running cypress in what we call 'global mode'. I'm still a bit confused as to what your project directory looks like and which part you are opening in global mode from the screenshots and information given.
|
I'm running into this same issue and it appears to be caused by Chrome/Chromium not respecting the Here's a snippet of those {"params":{"priority":"HIGHEST","url":"http://127.0.0.1:8080/__/#/tests/integration/test.js"},"phase":1,"source":{"id":180,"type":1},"time":"8498558","type":2},
{"phase":1,"source":{"id":180,"type":1},"time":"8498559","type":100},
{"phase":2,"source":{"id":180,"type":1},"time":"8498559","type":100},
{"params":{"load_flags":9217,"method":"GET","privacy_mode":0,"url":"http://127.0.0.1:8080/__/#/tests/integration/test.js"},"phase":1,"source":{"id":180,"type":1},"time":"8498559","type":96},
{"phase":1,"source":{"id":180,"type":1},"time":"8498559","type":99},
{"phase":2,"source":{"id":180,"type":1},"time":"8498559","type":99},
{"phase":1,"source":{"id":180,"type":1},"time":"8498559","type":113},
{"phase":2,"source":{"id":180,"type":1},"time":"8498559","type":113},
{"phase":1,"source":{"id":180,"type":1},"time":"8498559","type":114},
{"params":{"entry_hash":"0x52f2db36893f29dc"},"phase":1,"source":{"id":181,"type":13},"time":"8498559","type":355},
{"params":{"key":"http://127.0.0.1:8080/__/"},"phase":0,"source":{"id":181,"type":13},"time":"8498559","type":356},
{"phase":0,"source":{"id":181,"type":13},"time":"8498559","type":379},
{"phase":0,"source":{"id":181,"type":13},"time":"8498559","type":380},
{"params":{"net_error":-411},"phase":2,"source":{"id":180,"type":1},"time":"8498559","type":114},
{"phase":1,"source":{"id":180,"type":1},"time":"8498559","type":115},
{"params":{"entry_hash":"0x52f2db36893f29dc"},"phase":1,"source":{"id":182,"type":13},"time":"8498559","type":355},
{"params":{"key":"http://127.0.0.1:8080/__/"},"phase":0,"source":{"id":182,"type":13},"time":"8498559","type":356},
{"phase":0,"source":{"id":182,"type":13},"time":"8498559","type":360},
{"phase":0,"source":{"id":182,"type":13},"time":"8498559","type":361},
{"phase":2,"source":{"id":180,"type":1},"time":"8498559","type":115},
{"phase":1,"source":{"id":180,"type":1},"time":"8498559","type":116},
{"params":{"address_family":0,"allow_cached_response":true,"host":"127.0.0.1:8080","is_speculative":false},"phase":1,"source":{"id":183,"type":0},"time":"8498559","type":3},
{"phase":2,"source":{"id":183,"type":0},"time":"8498559","type":3},
{"phase":2,"source":{"id":180,"type":1},"time":"8498559","type":116},
{"params":{"is_preconnect":false,"url":"http://127.0.0.1:8080/__/#/tests/integration/test.js"},"phase":1,"source":{"id":184,"type":23},"time":"8498559","type":151},
{"phase":1,"source":{"id":180,"type":1},"time":"8498559","type":137},
{"params":{"source_dependency":{"id":184,"type":23}},"phase":0,"source":{"id":180,"type":1},"time":"8498559","type":152},
{"params":{"source_dependency":{"id":180,"type":1}},"phase":0,"source":{"id":184,"type":23},"time":"8498559","type":152},
{"phase":1,"source":{"id":184,"type":23},"time":"8498559","type":23},
{"params":{"pac_string":"DIRECT"},"phase":0,"source":{"id":184,"type":23},"time":"8498560","type":25},
{"phase":2,"source":{"id":184,"type":23},"time":"8498560","type":23},
{"params":{"proxy_server":"DIRECT"},"phase":0,"source":{"id":184,"type":23},"time":"8498560","type":153}, Notice the last line: Here's another snippet of those same logs, this time connecting to the same local server using my computer's network IP instead of {"params":{"priority":"HIGHEST","url":"http://10.0.0.249:8080/__/#/tests/integration/test.js"},"phase":1,"source":{"id":195,"type":1},"time":"8515014","type":2},
{"phase":1,"source":{"id":195,"type":1},"time":"8515015","type":100},
{"phase":2,"source":{"id":195,"type":1},"time":"8515015","type":100},
{"params":{"load_flags":9216,"method":"GET","privacy_mode":0,"url":"http://10.0.0.249:8080/__/#/tests/integration/test.js"},"phase":1,"source":{"id":195,"type":1},"time":"8515015","type":96},
{"phase":1,"source":{"id":195,"type":1},"time":"8515015","type":99},
{"phase":2,"source":{"id":195,"type":1},"time":"8515015","type":99},
{"phase":1,"source":{"id":195,"type":1},"time":"8515015","type":113},
{"phase":2,"source":{"id":195,"type":1},"time":"8515015","type":113},
{"phase":1,"source":{"id":195,"type":1},"time":"8515015","type":114},
{"params":{"entry_hash":"0xfcb31c53c472bc92"},"phase":1,"source":{"id":196,"type":13},"time":"8515015","type":355},
{"params":{"key":"http://10.0.0.249:8080/__/"},"phase":0,"source":{"id":196,"type":13},"time":"8515015","type":356},
{"phase":0,"source":{"id":196,"type":13},"time":"8515015","type":357},
{"params":{"net_error":-2},"phase":0,"source":{"id":196,"type":13},"time":"8515015","type":359},
{"phase":2,"source":{"id":196,"type":13},"time":"8515015","type":355},
{"params":{"net_error":-2},"phase":2,"source":{"id":195,"type":1},"time":"8515015","type":114},
{"phase":1,"source":{"id":195,"type":1},"time":"8515015","type":115},
{"params":{"entry_hash":"0xfcb31c53c472bc92"},"phase":1,"source":{"id":197,"type":13},"time":"8515015","type":355},
{"params":{"key":"http://10.0.0.249:8080/__/"},"phase":0,"source":{"id":197,"type":13},"time":"8515015","type":356},
{"phase":0,"source":{"id":197,"type":13},"time":"8515015","type":360},
{"phase":0,"source":{"id":197,"type":13},"time":"8515015","type":361},
{"phase":0,"source":{"id":197,"type":13},"time":"8515015","type":362},
{"phase":2,"source":{"id":195,"type":1},"time":"8515016","type":115},
{"phase":1,"source":{"id":195,"type":1},"time":"8515016","type":116},
{"phase":2,"source":{"id":195,"type":1},"time":"8515016","type":116},
{"params":{"is_preconnect":false,"url":"http://10.0.0.249:8080/__/#/tests/integration/test.js"},"phase":1,"source":{"id":198,"type":23},"time":"8515016","type":151},
{"phase":1,"source":{"id":195,"type":1},"time":"8515016","type":137},
{"params":{"source_dependency":{"id":198,"type":23}},"phase":0,"source":{"id":195,"type":1},"time":"8515016","type":152},
{"params":{"source_dependency":{"id":195,"type":1}},"phase":0,"source":{"id":198,"type":23},"time":"8515016","type":152},
{"phase":1,"source":{"id":198,"type":23},"time":"8515016","type":23},
{"params":{"pac_string":"PROXY localhost:58283"},"phase":0,"source":{"id":198,"type":23},"time":"8515016","type":25},
{"phase":2,"source":{"id":198,"type":23},"time":"8515016","type":23},
{"params":{"proxy_server":"PROXY localhost:58283"},"phase":0,"source":{"id":198,"type":23},"time":"8515016","type":153}, This time, Cypress' proxy server is being used: Additional notes:
|
Released in |
Change ExtensionSelenium to add an argument to ChromeOptions to not bypass localhost when proxying, thanks to: cypress-io/cypress#1872 (comment) for the syntax to use with `proxy-bypass-list`. Update changes in ZapAddOn.xml file.
It's not working in headless mode |
Hey @smoothdvd, could you open a new issue with a reproducible example of your problem? This issue has been fixed and likely you are experiencing a similar issue due to another cause. Thanks! |
Same issue with cypress 3.1.5 and chrome 72. Same issue with localhost site. I tried to add the temp code to plugins but I see that the argument already there: |
This is still happening to me in 3.2.0 |
I also am still seeing this exact issue on 3.2.0 |
Hey if you're experiencing a similar issue, could you open a new issue with a complete reproducible example of your problem? Thanks! |
Is this a Feature or Bug?
BUG
Current behavior:
Sometimes when I run all tests I have such error:
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 usingcy.visit(https://localhost:5000)
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
The text was updated successfully, but these errors were encountered: