Skip to content
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 crashes when a site uses secure cookies #1264

Closed
timcosta opened this issue Feb 6, 2018 · 2 comments · Fixed by #2685
Closed

Cypress crashes when a site uses secure cookies #1264

timcosta opened this issue Feb 6, 2018 · 2 comments · Fixed by #2685
Labels
type: duplicate This issue or pull request already exists

Comments

@timcosta
Copy link

timcosta commented Feb 6, 2018

  • Operating System: macOS 10.12
  • Cypress Version: 1.4.2
  • Browser Version: Chrome 64.0.3282.140

Is this a Feature or Bug?

Bug

Current behavior:

Subsequent get/sets for a cookie that has secure: true set by the server fail with the message Failed to parse or set cookie named "<name>"

Desired behavior:

Requests made to/from servers utilizing secure cookies should work.

How to reproduce:

  1. Use a cookie on your domain that is https/secure restricted
  2. Make a request to a route that will set this cookie
  3. Verify cookie is set successfully
  4. Make another request to same domain for cookie
  5. Request fails with error about parsing cookie

Additional Info (images, stack traces, etc)

I believe this is due to the invalid SSL cert used by Cypress. Setting "chromeWebSecurity": false allowed the subsequent requests to begin working. Possible solution would be to force secure: false on cookie set operations.

@bencao
Copy link

bencao commented Jul 12, 2018

I created a test repo containing the following spec and set "chromeWebSecurity": false on cypress.json, getting "Error Setting cookie failed" error.

describe('My First Test', function() {
  it('Visits the Kitchen Sink', function() {
    cy.visit('https://www.paypal.com')
  })
})
{ Error: Setting cookie failed


  cause:
   Error: Setting cookie failed

   ,
  isOperational: true }
Error: Setting cookie failed

@brian-mann
Copy link
Member

I believe this is a duplicate of: #1321

@brian-mann brian-mann added the type: duplicate This issue or pull request already exists label Jul 12, 2018
@jennifer-shehane jennifer-shehane removed the stage: needs investigating Someone from Cypress needs to look at this label Oct 31, 2018
brian-mann added a commit that referenced this issue Nov 1, 2018
- fixes #1264 
- fixes #1321 
- fixes #1799  
- fixes #2689
- fixes #2688
- fixes #2687 	
- fixes #2686
kuceb pushed a commit that referenced this issue Nov 14, 2018
- fixes #1264
- fixes #1321
- fixes #1799
- fixes #2689
- fixes #2688
- fixes #2687
- fixes #2686
kuceb pushed a commit to kuceb/cypress that referenced this issue Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants