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

Taking screenshot failed due to TypeError: Cannot read property 'apply' of undefined after previously failed run #69

Closed
hailee0710 opened this issue Nov 29, 2020 · 8 comments

Comments

@hailee0710
Copy link

When running a test with this plugin, after a failed run (any error, such as: assertion failure), the next run will always throw error when taking screenshot. Here is the detail error:
Command: screenshot cypress_runner.js:199793 Error: TypeError: Cannot read property 'apply' of undefined at https://www.marbodal.se/:3655:16 From previous event: at takeScreenshot (https://www.marbodal.se/__cypress/runner/cypress_runner.js:159366:13) at Context.screenshot (https://www.marbodal.se/__cypress/runner/cypress_runner.js:159458:14) at Context.<anonymous> (https://www.marbodal.se/__cypress/runner/cypress_runner.js:169999:21) at https://www.marbodal.se/__cypress/runner/cypress_runner.js:169423:15 From previous event: at runCommand (https://www.marbodal.se/__cypress/runner/cypress_runner.js:169402:8) at next (https://www.marbodal.se/__cypress/runner/cypress_runner.js:169548:14) at https://www.marbodal.se/__cypress/runner/cypress_runner.js:169576:16 From previous event: at next (https://www.marbodal.se/__cypress/runner/cypress_runner.js:169548:34) From previous event: at Promise.catch.err.name (https://www.marbodal.se/__cypress/runner/cypress_runner.js:169589:37) From previous event: at run (https://www.marbodal.se/__cypress/runner/cypress_runner.js:169582:21) at $Cy.cy.<computed> [as visit] (https://www.marbodal.se/__cypress/runner/cypress_runner.js:170039:11) at Context.runnable.fn (https://www.marbodal.se/__cypress/runner/cypress_runner.js:170263:21) at callFn (https://www.marbodal.se/__cypress/runner/cypress_runner.js:104396:21) at Test.../driver/node_modules/mocha/lib/runnable.js.Runnable.run (https://www.marbodal.se/__cypress/runner/cypress_runner.js:104383:7) at https://www.marbodal.se/__cypress/runner/cypress_runner.js:175798:28 From previous event: at Object.onRunnableRun (https://www.marbodal.se/__cypress/runner/cypress_runner.js:175786:17) at $Cypress.action (https://www.marbodal.se/__cypress/runner/cypress_runner.js:166429:28) at Test.Runnable.run (https://www.marbodal.se/__cypress/runner/cypress_runner.js:174172:13) at Runner.../driver/node_modules/mocha/lib/runner.js.Runner.runTest (https://www.marbodal.se/__cypress/runner/cypress_runner.js:105055:10) at https://www.marbodal.se/__cypress/runner/cypress_runner.js:105181:12 at next (https://www.marbodal.se/__cypress/runner/cypress_runner.js:104964:14) at https://www.marbodal.se/__cypress/runner/cypress_runner.js:104974:7 at next (https://www.marbodal.se/__cypress/runner/cypress_runner.js:104876:14) at Hook.<anonymous> (https://www.marbodal.se/__cypress/runner/cypress_runner.js:104937:7) at next (https://www.marbodal.se/__cypress/runner/cypress_runner.js:175719:22) at https://www.marbodal.se/__cypress/runner/cypress_runner.js:175741:11 From previous event: at onNext (https://www.marbodal.se/__cypress/runner/cypress_runner.js:175738:57) at done (https://www.marbodal.se/__cypress/runner/cypress_runner.js:104336:5) at https://www.marbodal.se/__cypress/runner/cypress_runner.js:104401:11 From previous event: at callFn (https://www.marbodal.se/__cypress/runner/cypress_runner.js:104399:14) at Hook.../driver/node_modules/mocha/lib/runnable.js.Runnable.run (https://www.marbodal.se/__cypress/runner/cypress_runner.js:104383:7) at https://www.marbodal.se/__cypress/runner/cypress_runner.js:175798:28 From previous event: at Object.onRunnableRun (https://www.marbodal.se/__cypress/runner/cypress_runner.js:175786:17) at $Cypress.action (https://www.marbodal.se/__cypress/runner/cypress_runner.js:166429:28) at Hook.Runnable.run (https://www.marbodal.se/__cypress/runner/cypress_runner.js:174172:13) at next (https://www.marbodal.se/__cypress/runner/cypress_runner.js:104898:10) at https://www.marbodal.se/__cypress/runner/cypress_runner.js:104942:5 at timeslice (https://www.marbodal.se/__cypress/runner/cypress_runner.js:98868:27)

Restart Cypress temporarily fix the issue until the next failed run.

@mjhea0
Copy link
Collaborator

mjhea0 commented Nov 29, 2020

I need to be able to recreate this. Is the project that you're seeing this error on open source? If not, please provide the Cypress config along a sample of the tests.

@hailee0710
Copy link
Author

I need to be able to recreate this. Is the project that you're seeing this error on open source? If not, please provide the Cypress config along a sample of the tests.

I can add you to my project/repo. Does that sound OK for you ?

@mjhea0
Copy link
Collaborator

mjhea0 commented Dec 1, 2020

yes

@guidiego
Copy link

guidiego commented Jan 5, 2021

I got the same error!

@mjhea0
Copy link
Collaborator

mjhea0 commented Jan 6, 2021

I have not been able to recreate this. Can you share a repo or something with me so I can at least reproduce the error?

@guidiego
Copy link

guidiego commented Jan 6, 2021

@mjhea0 In that moment I remove the plugin to be able to run, but you can found my code at: open-nps/open-nps

@mjhea0
Copy link
Collaborator

mjhea0 commented Jan 6, 2021

@guidiego can you configure the plugin so I can see it breaking on GitHub Actions? Maybe do that on a new branch and then I'll fork it to see if I can recreate and fix locally.

@mjhea0
Copy link
Collaborator

mjhea0 commented Jun 22, 2021

Closing due to lack of activity.... feel free to reopen

@mjhea0 mjhea0 closed this as completed Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants