-
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 is unable to load site in v3.5.0 due to "Parse Error" #5602
Comments
Which baseurl do you have set? Maybe there is a problem when cypress tries to redirect from http to https or something. Can you provide a simple example using a small express server + nginx + some cypress code? |
As @gabbersepp mentioned, we'll need a way to reproduce this in order to move forward with finding the problem - otherwise we will need to close the issue since there's no way for us to more forward debugging. |
@gabbersepp and @jennifer-shehane I will compile the needed code to debug effectively. |
We are also getting exactly same issue. With cypress version 3.4.1 every application works fine, however when we try to upgrade to latest versions (3.6.0+) then cypress is not able access the site (throwing the same error shared bytes @tmonteith ). Apparently, something changed between 3.4.1 to latest versions of cypress that is causing issue. Note that we are also using ngnix and same configurations that work fine with c.ypress 3.4.1, do not work with cypress 3.6.0. @jennifer-shehane |
@arifmasood are you able to provide a small example? We are using nginx as reverse proxy and I updated to cypress 3.6.1 right now to test this setup. Runs without any problems. Our nginx proxies the traffic from a https site to a local http IIS site, if this is relevant. |
@gabbersepp I cannot share details of scripts or website over here, however I have already sent an email with some details to cypress support team. |
@arifmasood thanks! |
I'm seeing the same error (without nginx proxy), just a NextJS app running on Interestingly it works fine on the latest version providing I run in Chrome and not the Electron browser |
any updates here? |
@tmonteith I believe this is an "Parse Error" related to the All others in this thread - if you are still experiencing an issue in the latest Cypress, and you do not get a "Parse Error", please check for another issue that matches the error you are getting. If you are getting the "Parse Error", please share your |
I found a workaround. If I run it using |
@flotwig Using 3.8.0 we get the same "Parse Error" in some environments, but not others.
while this one does work with no problems
Could it be the lowercase format? Edit. I just saw that with the latest update we're now getting a "Parse Error: Invalid header value char" and not just the "Parse Error" we had from 3.5.0 and up.
|
@mr-winter I spent some time trying out sending those Do you think you could share your application's repository, or if that is unavailable, a reproducible example that I can run on my machine to see the issue? You can use |
@flotwig Here are our Set Cookie values: set-cookie: ASP.NET_SessionId=h24hhyymnziynqjybxkym0l1; path=/; HttpOnly |
@tmonteith Please provide a reproducible example - a repo with server code + test run that demonstrates the issue. Using these |
@flotwig I put up an example that throws the "Parse Error: Invalid header value char" error on just a simple |
@flotwig how do we use this node_option? I updated to Cypress 3.8.3 in the hope this is fixed but I'm still getting the same issue - though I do not know how to make use of this --http-parser=legacy option. This is what I was trying to do even in basic form: My package.json has the following command built-in: "cy:open": "cypress open", And in cmd (just in a basic form to see if NODE_OPTIONS works): C:\Dev\Projects\x>set NODE_OPTIONS=--http-parser=legacy |
This doesn't seem to work for me. Does anyone have some other solutions? |
@flotwig any ideas to the above? |
|
@toniton how are you running it?
This is all I get.. and can't seem to put it in the package.json command either. Any help much appreciated, I've updated to cypress@4.0.0 but it's still the same for me. |
@add1ct3dd
|
Weird, I get the same output (formatted the command to work in windows):
What node version are you on? I'm currently on 8.12.0. |
@add1ct3dd I'm currently using |
@flotwig It will be great if you can let me know about the status of this issue. |
@natkrish We are waiting for electron/electron#21694 to be released in Electron 9 so we can use it. Once we can use In the meantime, the only workaround is to update your web server to send headers that do not contain non-printable ASCII characters. |
@flotwig If you dont mind confirming that the above issue with electron will also impact when running tests on chrome? |
@natkrish Yep, it will be affected, this is an issue in the Cypress server, so it will affect any browser. |
@flotwig great thanks for letting me know about it. |
Upgrading to Electron 9 (where this bug is presumably fixed) is blocked by our inability to upgrade to Electron 8 detailed in this PR: #6555 |
@flotwig is it correct to believe that v4.2.0 will have the fix for this? |
@tmonteith 4.2.0 does not have a fix for this, however, now that we're running >= Electron 8.1.0 it's possible to fix this issue. I'm working on a fix in #5988 that should make it into the next release. |
The code for this is done in cypress-io/cypress#5988, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior:
When attempting to resolve our site, Cypress throws an error. This was not an issue on older versions of Cypress. Our NGINX config is fairly vanilla and hasnt changed since we deployed it several months ago
error
Desired behavior:
Our site loads on newer versions of Cypress (3.5.0) and up.
Steps to reproduce: (app code and test code)
example code:
Steps to reproduce.
npx cypress open
Click spec from GUI and let test start. Error is thrown immediately upon attempting to resolve the page.
Versions
v3.5.0
Cypress desktop, v3.5.0, MAcOS 10.13.6, Electron(Chrome v78)
The text was updated successfully, but these errors were encountered: