question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

On cypress run, error "We failed to trash the existing run results"

See original GitHub issue

Current behavior:

Running cypress run emits an error:

Warning: We failed to trash the existing run results.

This error will not alter the exit code.

Error: Command failed: /Users/jennifer/Library/Caches/Cypress/3.1.2/Cypress.app/Contents/Resources/app/packages/server/node_modules/trash/lib/macos-trash /Users/jennifer/Dev/cypress-example-kitchensink/cypress/screenshots/examples
“examples” couldn’t be moved to the trash.

    at ChildProcess.exithandler (child_process.js:282:12)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:921:16)
    at Socket.stream.socket.on (internal/child_process.js:348:11)
    at emitOne (events.js:115:13)
    at Socket.emit (events.js:210:7)
    at Pipe._handle.close [as _onclose] (net.js:549:12)

Desired behavior:

Not error when trashing folders within videos folder.

Steps to reproduce:

All I did was cypress run on a previous run cypress-example-kitchensink project. Of course on subsequent runs of of cypress run do not produce the same error. 😞

Versions

Cypress 3.1.2 Mac High Sierra

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:19
  • Comments:26 (5 by maintainers)

github_iconTop GitHub Comments

7reactions
adamchenweicommented, Apr 18, 2019

It seems the problem only happens when a snapshot is open by an application somewhere else while cypress is trying to clean the directory, so it can’t. At least that’s seems how I fixed it, by closing the app that still viewing the snapshot images.

Hope it helps

3reactions
jaxfellowcommented, Oct 7, 2022

Still exists in 10.9.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - Trash/delete screenshots before Cypress runs via npx ...
Cypress does not record videos or screenshots during cypress open , so there will be nothing to trash.
Read more >
Screenshots and Videos - Cypress Documentation
Cypress clears any existing screenshots before cypress run . If you do not want to clear your screenshots folder before a run, you...
Read more >
cypress-io/cypress - Gitter
@dwelle I run cypress run and then echo $? and it's always 0 ... what reporter should I use to get a minimal...
Read more >
Testing Time Zones in Parallel - Gleb Bahmutov
Running the same Cypress tests with different browser time zones in ... Our test will just confirm the time zone text is present,...
Read more >
Configurations in Cypress and How to Disable Default ...
Moreover, when we do Cypress open or do cypress run, Cypress open, or runs all the test present in the Integration folder. But...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found