"This session already exists." error with cy.session() command in test runner. #30674
Unanswered
steperry
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I've been using the cy.session() command recently and while it seems useful, I've run into some simple issues that will likely force me to abandon it. Anyone know if these are bugs, or am I just not using it correctly?
Sometimes this error will appear in the test runner: "This session already exists. You may not create a new session with a previously used identifier."
I understood that the command would automatically restore the existing session with the same name, so what would cause it to return an error like this? I am using the cacheAcrossSpecs option because all of my tests should be able to share the same session. If cypress has determined the session is no longer valid, should it not just recreate it?
Additionally, when this error happens in the test runner, there is no longer a "Clear All Sessions" button, and this is probably the time when it would be most useful. If I change my session name so the test starts working again, I regain access to the "Clear All Sessions" button.
Thanks for any help.
Beta Was this translation helpful? Give feedback.
All reactions