Error: Failed to parse or set cookie named
See original GitHub issueCurrent 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.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:15 (4 by maintainers)
Top Results From Across the Web
Cypress Error: Failed to parse or set cookie named
We received this error at the network level: Error: Failed to parse or set cookie named "cookie-name". The stack trace is as follows:...
Read more >56211 - chrome.cookies fails for localhost domains - Monorail
Call chrome.cookies.set({domain: "localhost", name: "foo", value: "bar", ... Get: Error during cookies.set: Failed to parse or set cookie named "foo".
Read more >Edit-This-Cookie - Bountysource
Failed to create a new cookie with error "Unchecked runtime.lastError: Failed to parse or set cookie named [new cookie name]" $ 0 ·...
Read more >Troubleshooting AWS IoT Greengrass
Error : Failed to parse /<greengrass-root>/config/config.json. ... Set the postStartHealthCheckTimeout property in the Greengrass configuration file.
Read more >Issue 31456: SimpleCookie fails to parse any cookie if an ...
from http.cookies import SimpleCookie >>> cookie_string = "ASDF=stuff; ... print(BaseCookie('first=morsel second=morsel')) Set-Cookie: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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 😞
Since this issue hasn’t had activity in over a year, we’ll close the issue until we can confirm this is still happening.
Please comment if there is new information to provide concerning the original issue and we’d be happy to reopen.