Closed ToBeKedge closed 2 years ago
I'm having the same issue. Any idea on how to fix this?
override after:run
Start generate report process
Read and merge jsons from "reports\.jsons"
Screenshots folder "C:\xxxxxxx\top-level\cypress\reports\screenshots" not found, nothing to copy
An error was thrown in your plugins file while executing the handler for the after:run event.
The error we received was:
Error: Pattern reports\.jsons/*.json matched no report files
at C:\xxxxxxx\top-level\cypress\node_modules\mochawesome-merge\lib\index.js:14:11
at Array.map (<anonymous>)
at C:\xxxxxxx\top-level\cypress\node_modules\mochawesome-merge\lib\utils.js:3:46
at merge (C:\xxxxxxx\top-level\cypress\node_modules\mochawesome-merge\lib\index.js:82:17)
at mergeAndCreate (C:\xxxxxxx\top-level\cypress\node_modules\cypress-mochawesome-reporter\lib\generateReport.js:12:24)
at generateReport (C:\xxxxxxx\top-level\cypress\node_modules\cypress-mochawesome-reporter\lib\generateReport.js:56:20)
at afterRunHook (C:\xxxxxxx\top-level\cypress\node_modules\cypress-mochawesome-reporter\lib\index.js:35:9)
at Object.handler (C:\xxxxxxx\top-level\cypress\cypress.config.js:24:15)
at invoke (C:\Users\P93003672-la\AppData\Local\Cypress\Cache\10.3.0\Cypress\resources\app\node_modules\@packages\server\lib\plugins\child\run_plugins.js:43:18)
at C:\Users\P93003672-la\AppData\Local\Cypress\Cache\10.3.0\Cypress\resources\app\node_modules\@packages\server\lib\plugins\util.js:59:14
Please create a repo with the problem and steps to reproduce the issue so I can have a look.
Thanks.
Hi @LironEr
I have made 2 tests
In that case, the generation of the report working fine
In that case, the generation of the report failed
In summary: I think it is due to the folder configuration and the reporter doesn't really support any other folder than the default one (and it works previous version of cypress and reporter).
Based on the second test, I made a third test: I moved the cypress.config.ts to the workspace root and everything works. So is it a problem of the reporter or of cypress itself?
Just released a fix, can you please verify it works?
npm i --save-dev cypress-mochawesome-reporter@3.2.1-rc.0
Thank you 👍
Hi @LironEr I have just test the fix and it seems it is working fine! Thanks a lot for your work!
Hi @LironEr thanks for the fix.
Environment
What happened?
After migration of cypress (from 9.2.1 to 10.3.1) and cypress-mochawesome-reporter (from 2.3.0 to 3.2.0), I get this error
An error was thrown in your plugins file while executing the handler for the after:run event.
When I try the previous version, all is working fine but with last version, I don't understand how to fix this issue. And I get this issue on my both environment.
Config file
cypress.config.ts
Relevant log output
cypress-mochawesome-reporter.log
Anything else?
No response