-
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
Cypress will not load localhost content in Google Chrome #4235
Comments
We run literally thousands of tests against Cypress that don't do anything more special than this - so there has to be something else going on with your system that's causing this. Do you have a proxy environment variable set somewhere? Like Can you visit your It looks like this... https://docs.cypress.io/guides/references/proxy-configuration.html#View-proxy-settings-in-Cypress |
Can you also run your tests with the DEBUG env var on? Like this... |
No PROXY settings set anywhere. I created a new folder and made the most basic test (screenshot attached); turns out Chrome will not let me go anywhere, not just localhost. Electron works just fine (attached a screen shot of that log too). |
Thank you for helping us get to the bottom of this. Can you paste the entire DEBUG logs, either here, or to http://pastebin.com if it can't fit in a GitHub comment? |
large DEBUG log
|
Ty for the edit, copy & paste defeated me :) |
Hello, Got the same problem since upgrade to 3.3.0. Version Cypress: 3.3.0 Debug
|
@alegout Hmm, your localhost application uses HTTPS? Can you visit this URL in a normal browser? https://localhost/en/project/bo/article/add Are you behind a corporate proxy? @shaunforan Is your site on localhost running over HTTPS as well? |
Yes it uses HTTPS and url is working. No corporate proxy. |
@alegout Can you share the entire output of your DEBUG logs please? Can you also send me a screenshot of Chrome when it fails to open the page at https://localhost? Thanks for helping to debug 😄 I'll try to reproduce submitting a form over HTTPS on localhost and see if I can get it to fail. |
I tried to reproduce the issue (in PR: #4239) by setting up a simple HTML |
No, mine is running over http. I do have an Express server running on port 8080 to host my data, so when I run my app, I have my server on 8080 (Express) and the frontend on 3000 (Create React App). |
thanks @flotwig Can you please test with a form in multipart/form-data like this:
|
i tested on your PR #4239, it's failing when form use
Can you confirm? EDIT: i test on a form with post method but not have Thanks |
@flotwig Application running in Docker, exposing Corporate proxy with exceptions given for Relevant debug log:
cypress.json: So I noticed that cypress is trying to use a Proxy socket towards |
I have exactly the same issue as the original issue (v3.3.0) |
@ulmanA run cypress with debug and check if the corresponding lines are also undefined or if they are something else, it might some id, project name or config key value that is there instead of |
Hey @MichaelHindley and @ulmanA, let's move discussion of this to a different issue: #4240 - the original issue in this thread was not behind a proxy, so it's a little different. |
@shaunPDX I spent some time trying to reproduce your issue but could not, do you think you could share a video of your screen as the issue is occurring? |
Yes I can, no worries (sorry for the delay, it's been a LONG week). I'll try to get it recorded today or tomorrow. |
So this is interesting; a co-worker reached out me and says that he can not run via localhost either. We work at a major apparel company, and we DO have a company proxy in place, but up until recently this has not been an issue. I will record the video, but I think that there might definitely be an underlying issue on our end too....I'll dig deep on my end and see what I can find. |
@shaunPDX We made a lot of changes in Cypress 3.3.0 to improve proxy support, but there were some regressions as well. I forgot to mention, you might want to try Cypress 3.3.1, we fixed some small bugs related to the proxy changes in there as well. |
@johnarizona
|
I just had me 3rd report of an employee at my company who is no longer able to run Cypress using Chrome any longer. We have both tried downgrading to 3.2.0 (which did not work either), but 3.3.0 and 3.3.1 both fail. I wonder if it has something to do with Chrome itself? I have upload a .mov file showing what is happening when I try to run Cypress with Chrome against a localhost:3000 frontend using a localhost:8080 backend. Video: https://vimeo.com/339124077 |
Hi folks. I am experiencing the same issue as @shaunPDX. I did the same thing, creating a new create-react-app, adding Cypress v3.3.1, and running the example specs with the same results. Works fine with Electron 61. I also happen to work for a major apparel company, so maybe there is an issue with company proxying? The video matches my experience. |
@aziparu What is your OS and browser version? Can you share your proxy settings, as seen in Cypress? I've tried doing the exact same thing:
...and I can't reproduce the issue - I'm on Linux with Chrome 74 and Cypress 3.3.1. |
Hi @flotwig. I'm using MacOS 10.14.5 and Chrome v74.0.3729.169. Cypress sees no active proxy configuration |
@aziparu Hey, thanks for the information. Can you also provide your entire |
@shaunPDX can you also post your logs again using Cypress Refer to the comment here: #4235 (comment) We're trying to reproduce on our end, and the logs can help make all the difference. |
Hey folks, thanks for helping us out. I'm unable to get the logs to you today, but I think I can get them for you on Monday. Have a nice weekend! |
@flotwig @brian-mann Here are my logs: debug logs
|
Edit: #Mondays Logssfora2$ DEBUG=cypress:* ./node_modules/.bin/cypress open cypress:cli cli starts with arguments ["/Users/sfora2/.nvm/versions/node/v10.6.0/bin/node","/Users/sfora2/Projects/docker-poc/frontend/e2e_testing/node_modules/.bin/cypress","open"] +0ms cypress:cli NODE_OPTIONS is not set +0ms cypress:cli program parsing arguments +3ms cypress:cli opening Cypress +1ms cypress:cli parsed cli options {} +155ms cypress:cli opening from options {"project":"/Users/sfora2/Projects/docker-poc/frontend/e2e_testing"} +0ms cypress:cli command line arguments ["--project","/Users/sfora2/Projects/docker-poc/frontend/e2e_testing"] +0ms cypress:cli verifying Cypress app +0ms cypress:cli checking environment variables +1ms cypress:cli checking if executable exists /Users/sfora2/Library/Caches/Cypress/3.3.1/Cypress.app/Contents/MacOS/Cypress +5ms cypress:cli Binary is executable? : true +2ms cypress:cli binaryDir is /Users/sfora2/Library/Caches/Cypress/3.3.1/Cypress.app +0ms cypress:cli Reading binary package.json from: /Users/sfora2/Library/Caches/Cypress/3.3.1/Cypress.app/Contents/Resources/app/package.json +0ms cypress:cli Found binary version 3.3.1 installed in: /Users/sfora2/Library/Caches/Cypress/3.3.1/Cypress.app +3ms cypress:cli { verified: true } +4ms cypress:cli is Verified ? true +2ms cypress:cli needs to start own Xvfb? false +0ms cypress:cli spawning, should retry on display problem? false +1ms cypress:cli spawning Cypress with executable: /Users/sfora2/Library/Caches/Cypress/3.3.1/Cypress.app/Contents/MacOS/Cypress +5ms cypress:cli spawn args [ '--project', '/Users/sfora2/Projects/docker-poc/frontend/e2e_testing', '--cwd', '/Users/sfora2/Projects/docker-poc/frontend/e2e_testing' ] { detached: false, stdio: 'inherit' } +0ms cypress:ts Running without ts-node hook in environment "production" +0ms cypress:server:cypress starting cypress with argv [ '/Users/sfora2/Library/Caches/Cypress/3.3.1/Cypress.app/Contents/MacOS/Cypress', '--project', '/Users/sfora2/Projects/docker-poc/frontend/e2e_testing', '--cwd', '/Users/sfora2/Projects/docker-poc/frontend/e2e_testing' ] +0ms cypress:server:args argv array: [ '/Users/sfora2/Library/Caches/Cypress/3.3.1/Cypress.app/Contents/MacOS/Cypress', '--project', '/Users/sfora2/Projects/docker-poc/frontend/e2e_testing', '--cwd', '/Users/sfora2/Projects/docker-poc/frontend/e2e_testing' ] +0ms cypress:server:args argv parsed: { _: [ '/Users/sfora2/Library/Caches/Cypress/3.3.1/Cypress.app/Contents/MacOS/Cypress' ], project: '/Users/sfora2/Projects/docker-poc/frontend/e2e_testing', cwd: '/Users/sfora2/Projects/docker-poc/frontend/e2e_testing' } +3ms cypress:server:args options { _: [ '/Users/sfora2/Library/Caches/Cypress/3.3.1/Cypress.app/Contents/MacOS/Cypress' ], project: '/Users/sfora2/Projects/docker-poc/frontend/e2e_testing', cwd: '/Users/sfora2/Projects/docker-poc/frontend/e2e_testing', config: {} } +1ms cypress:server:args argv options: { _: [ '/Users/sfora2/Library/Caches/Cypress/3.3.1/Cypress.app/Contents/MacOS/Cypress' ], project: '/Users/sfora2/Projects/docker-poc/frontend/e2e_testing', cwd: '/Users/sfora2/Projects/docker-poc/frontend/e2e_testing', config: {}, projectRoot: '/Users/sfora2/Projects/docker-poc/frontend/e2e_testing' } +0ms cypress:server:appdata path: /Users/sfora2/Library/Application Support/Cypress/cy/production +0ms cypress:server:cypress starting in mode interactive +425ms cypress:server:appdata path: /Users/sfora2/Library/Application Support/Cypress/cy/production +488ms cypress:server:appdata path: /Users/sfora2/Library/Application Support/Cypress/cy/production/cache +4ms cypress:server:appdata path: /Users/sfora2/Library/Application Support/Cypress/cy/production/browsers +3s cypress:server:timers queuing timer id 1 after 500 ms +0ms cypress:server:timers child received timer id 1 +0ms cypress:server:timers child sending timer id 1 +507ms cypress:server:timers clearing timer id 1 from queue { '1': { args: [], ms: 500, cb: [Function] } } +510ms cypress:server:saved_state making saved state from /Users/sfora2/Library/Caches/Cypress/3.3.1/Cypress.app/Contents/Resources/app/packages/server +0ms cypress:server:saved_state for project path /Users/sfora2/Projects/docker-poc/frontend/e2e_testing +0ms cypress:server:saved_state state path for project /Users/sfora2/Projects/docker-poc/frontend/e2e_testing +2ms cypress:server:appdata path: /Users/sfora2/Library/Application Support/Cypress/cy/production/projects/e2e_testing-ff3ee4f9221c7287b2453f3e59d1fffa/state.json +523ms cypress:server:saved_state full state path /Users/sfora2/Library/Application Support/Cypress/cy/production/projects/e2e_testing-ff3ee4f9221c7287b2453f3e59d1fffa/state.json +0ms cypress:server:saved_state making new state file around /Users/sfora2/Library/Application Support/Cypress/cy/production/projects/e2e_testing-ff3ee4f9221c7287b2453f3e59d1fffa/state.json +0ms cypress:server:file get values from /Users/sfora2/Library/Application Support/Cypress/cy/production/projects/e2e_testing-ff3ee4f9221c7287b2453f3e59d1fffa/state.json +0ms cypress:server:file attempt to get lock on /Users/sfora2/Library/Application Support/Cypress/cy/production/projects/e2e_testing-ff3ee4f9221c7287b2453f3e59d1fffa/state.json +0ms cypress:server:file gettin lock succeeded or failed for /Users/sfora2/Library/Application Support/Cypress/cy/production/projects/e2e_testing-ff3ee4f9221c7287b2453f3e59d1fffa/state.json +4ms cypress:server:file read /Users/sfora2/Library/Application Support/Cypress/cy/production/projects/e2e_testing-ff3ee4f9221c7287b2453f3e59d1fffa/state.json +0ms cypress:server:file read succeeded or failed for /Users/sfora2/Library/Application Support/Cypress/cy/production/projects/e2e_testing-ff3ee4f9221c7287b2453f3e59d1fffa/state.json +2ms cypress:server:file attempt to unlock /Users/sfora2/Library/Application Support/Cypress/cy/production/projects/e2e_testing-ff3ee4f9221c7287b2453f3e59d1fffa/state.json +0ms cypress:server:timers queuing timer id 2 after 2000 ms +15ms cypress:server:timers clearing timer id 2 from queue { '2': { args: [], ms: 2000, cb: [Function: timeoutTimeout] } } +1ms |
Hey everyone, we just released version 3.3.2 of Cypress with a ton of network improvements and bugfixes. Can you guys try updating your Cypress version to 3.3.2 and seeing if you still experience this issue? 🤞 |
@flotwig Finally got a chance to use the latest, which is currently version 3.4.1. It works in Chrome! I'm using v75. |
Just verified this is now fixed with Cypress v3.4.1 and Chrome 75. Thank you! |
So I hate to say this, but the issue is popping up again for Chrome 78. It appears that Cypress is ignoring the cypress.json settings for the port and opening the node server on a random port which of course doesn't work. Frustrating. |
Just encountered this issue too. Was unable to load any page with Edit: Cypress 3.6.1 |
This issue's case was resolved in 3.3.1, so there is likely something newly introduced that is not covered in our current tests. Please open a new issue with a reproducible example. |
Current behavior:
Cypress will not load an application being served from localhost in Google Chrome after the update to version 3.3.0. This is causing all tests to not run and Cypress will just hang while returning a 500 error with each request to the application. NOTE: Electron 59 works just fine.
Desired behavior: Cypress will load the application and run the tests in both Chrome and Electron.
Steps to reproduce: (app code and test code)
Versions
Cypress: 3.3.0
Google Chrome: 74.0.3729.157
Electron: 59
OSX: 10.14.4
The text was updated successfully, but these errors were encountered: