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

fix: do not override existingSession setup #21226

Merged

Conversation

samtsai
Copy link
Contributor

@samtsai samtsai commented Apr 27, 2022

Use existingSession.setup instead of overriding with server stored
session because of string serialization.

This applies the fix mentioned by @bahmutov #17805 (comment)

User facing changelog

Fixed an issue with cy.session where hard refresh of a test in open mode would fail to recreate the session due to a TypeError: existingSession.setup is not a function.

How has the user experience changed?

Before
Screen Shot 2022-04-27 at 11 23 12 AM

After
Screen Shot 2022-04-27 at 11 23 28 AM

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?
  • Have new configuration options been added to the cypress.schema.json?

@samtsai samtsai requested a review from a team as a code owner April 27, 2022 15:27
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 27, 2022

Thanks for taking the time to open a PR!

@samtsai samtsai requested review from jennifer-shehane and removed request for a team April 27, 2022 15:27
@CLAassistant
Copy link

CLAassistant commented Apr 27, 2022

CLA assistant check
All committers have signed the CLA.

@samtsai samtsai force-pushed the issue-17805-existing-session branch from 7978074 to 80eb88a Compare April 27, 2022 15:28
@jennifer-shehane jennifer-shehane requested review from emilyrohrbough and removed request for jennifer-shehane April 27, 2022 15:30
Use `existingSession.setup` instead of overriding with server stored
session because of string serialization.
@samtsai samtsai force-pushed the issue-17805-existing-session branch from 80eb88a to acaeaf8 Compare April 27, 2022 15:50
@emilyrohrbough
Copy link
Member

@samtsai This issue has been on my radar for getting Sessions ready for GA support (hopefully soon) and am grateful for your contribution!

@samtsai
Copy link
Contributor Author

samtsai commented Apr 27, 2022

@samtsai This issue has been on my radar for getting Sessions ready for GA support (hopefully soon) and am grateful for your contribution!

Glad to help! I love using Cypress every day and am looking forward to this feature.

@samtsai
Copy link
Contributor Author

samtsai commented Apr 27, 2022

I don't have access to re-run those failing tests but from what I can see I don't think it's caused by my test. The failing one is labeled flaky.

@emilyrohrbough
Copy link
Member

@samtsai ahh thanks for calling this out! I've been trying to keep an eye on this and got distracted. Just kicked if off again.

@emilyrohrbough emilyrohrbough merged commit 51b4bdc into cypress-io:develop Apr 28, 2022
@samtsai samtsai deleted the issue-17805-existing-session branch April 28, 2022 23:09
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 9, 2022

Released in 9.6.1.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v9.6.1, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cypress session validation failure results in a 'existingSession.setup is not a function' error
4 participants