cypress: Error: Failed to parse or set cookie named
Current behavior:
When using a cookie with attribute Secure using a HTTP connection an error is thrown and tests are aborted:
Error: Failed to parse or set cookie named “<JSESSIONID>”.
For more context, see https://github.com/cypress-io/cypress/issues/1321#issuecomment-462647518
Desired behavior:
Cypress should continue to run tests and ignore cookie, perhaps showing a warning about trying to set a secure cookie on a non-secure connection.
Steps to reproduce: (app code and test code)
- Use a non-encrypted connection (http)
- Navigate Cypress to a url which tries to set a
Securecookie as response
Versions
Cypress 3.1.5 (3.1.0 works fine), any OS, both Electron and Chrome are affected.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 8
- Comments: 15 (4 by maintainers)
@jennifer-shehane I would like to re-open this issue as I am unable to catch the exception using
uncaught:exceptionand Cypress just straight up crashes when the set cookie error occurs. This halts all execution, which I think is pretty bad.support/index.js
Run
I was able to confirm that this started happening on 3.1.1, so for now I’m going with 3.1.0 as @sweoggy suggested.
Unfortunately I don’t have a reproducible example I can share at this moment 😞