Error when running all snapshots
See original GitHub issueHi, thanks for the amazing plugin!!!
There is a possible bug, as when I run all tests in the cypress browser I receive following error:
CypressError: cy.task('cypress-plugin-snapshot:matchText') failed with the following error:
> Error: Cannot load snapshot file. File "__snapshots__/__all.snap does not contain valid JSON or javascript
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:24 (7 by maintainers)
Top Results From Across the Web
Troubleshoot stuck EBS snapshots - AWS
The ConcurrentSnapshotLimitExceeded error might occur for the following reasons: You have too many snapshots running concurrently.
Read more >Solved: Snapshots fail with "A general system error occurr...
When the snapshots finished that appear all the veeam backups snapshot as described in this article. Delete all snapshots and Veeam backup runs...
Read more >Troubleshoot Reporting Snapshots - Salesforce Help
If field mappings failed, the snapshot still runs, but the run history shows that there was a partial error. A reporting snapshot could...
Read more >Error during snapshot retention task - how to solve ... - Opster
How to troubleshoot Elasticsearch/OpenSearch log "Error during snapshot retention task" a ... Get all currently running tasks on all nodes of the cluster....
Read more >Error In Dropping Snapshots Process - During Data Collections
Information in this document applies to any platform. Symptoms. EBS Source version 12.2.4. VCP 12.2.4.1. Errors when running Data Collections ...
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
So the workaround I can offer for now is to fix
Cypress.spec
object by looking at the__filename
in each spec file. Here is the code to place intocypress/support/index.js
. It is a utility function that formsCypress.spec
from passed filenameFrom each spec file (that wants to use snapshots)
I have been playing with this in https://github.com/bahmutov/objection-example using this approach to run all specs with snapshots
IMO this issue should be mentioned on the README as it’s a huge blocker for me, I only found out after implementing and writing tests (using
.only
while writing tests) to find the error in the GUI test runner after I ran all my tests which made all my work previously useless.Please consider adding an eye-catching warning or ‘caveat’ section which mentions this issue so that other users of this package will not share the same experience I had or at the very least, know of this important bug.
Hope Cypress gets the fix in soon, :fingers
(added a PR as a suggestion for a new section in the README file: https://github.com/meinaart/cypress-plugin-snapshots/pull/37)