-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Error on cy.visit to site with invalid content-type is very confusing #3101
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
Comments
I'm not seeing where you are going in terms of suggestions. We display the content-type as |
but it is not |
It seems that this is throwing here: https://github.com/cypress-io/cypress/blob/develop/packages/server/lib/util/headers.js#L6 which the modules docs say
Initially called from here: https://github.com/cypress-io/cypress/blob/develop/packages/server/lib/server.coffee#L394 I don't know why it's doing this :/ |
Related issue: #1727 |
Released in |
We've changed our implementation some regarding this issue. If a site's If it does not look like HTML, then it will still error as shown above in this issue. The code for this is done in #4321, but this has yet to be released. We'll update this issue and reference the changelog when it's released. |
Released in |
Cypress 3.1.4
When visiting a site with invalid content-type, like this one https://dlive.tv/ it returns content type with extra
,text/html
in charset.The following Cypress tests just visits this site
and here is the Cypress UI
Here are the relevant logs from running with
DEBUG=cypress:* npx cypress open
in this caseI think we can display a much better and helpful error in this case
The text was updated successfully, but these errors were encountered: