cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.66k stars 3.16k forks source link

The Test Runner unexpectedly exited via a exit event with signal SIGABRT - Assertion `(env) != nullptr' failed #8865

Open daftspaniel opened 3 years ago

daftspaniel commented 3 years ago

Current behavior

Test suites sometimes crashing after successful run.

    ✔  All specs passed!                        16:16      356      356        -        -        -  

/root/.cache/Cypress/5.4.0/Cypress/Cypress[242]: ../../third_party/electron_node/src/api/callback.cc:226:MaybeLocal<v8::Value> node::MakeCallback(v8::Isolate *, Local<v8::Object>, Local<v8::Function>, int, Local<v8::Value> *, node::async_context): Assertion `(env) != nullptr' failed.
The Test Runner unexpectedly exited via a exit event with signal SIGABRT

Please search Cypress documentation for possible solutions:

https://on.cypress.io

Check if there is a GitHub issue describing this crash:

https://github.com/cypress-io/cypress/issues

Consider opening a new issue.

Desired behavior

Good exit code

Test code to reproduce

With assistance I can perhaps narrow this down from 356 tests. Some suites work fine but two continually fail.

Versions

Cypress 5.40 Linux running on CircleCI

jonataswalker commented 3 years ago

Same issue on Azure Pipeline.

andreasremdt commented 3 years ago

I can confirm the same thing happening on Jenkins (Ubuntu 18.04). If desired, I can provide additional debug logs or information.

jennifer-shehane commented 3 years ago

Yes, DEBUG logs may be helpful. Perhaps this is due to Electron upgrade in 5.4.0. https://github.com/cypress-io/cypress/pull/8406

andreasremdt commented 3 years ago

I just uploaded the last part of the debug log, since it's huge. Seems to be an issue with Electron indeed. Let me know if you need the entire log, I would look for an option to limit the test cases then.

cypress.log

TomaszG commented 3 years ago

Any update on this? Is there some more information needed? I'm facing the issue as well after upgrading to 5.5.0.

kamiloski commented 3 years ago

Bug still exists in 5.5.0

daftspaniel commented 3 years ago

@jennifer-shehane Do you need additional logs on this or the ones Andrea provided sufficient? Many thanks.

diggabyte commented 3 years ago

Also seeing in 5.5.0 (electron)

laurentpierson commented 3 years ago

I'm also getting the same issue with Cypress 5.5.0 when running Electron headless.

mathew-ferry13 commented 3 years ago

Same issue here - Started with 5.4.0 and not fixed in 5.5.0. Everything was working fine with 5.3.0

tamaserdfalvi commented 3 years ago

Also seeing this both when building with Jenkins (Ubuntu) and locally on OSX Catalina

tkharuk commented 3 years ago

Initially, I thought it happens due to retries and some flaky tests since some of my tests do fail at least once.

hannalapitanware commented 3 years ago

@jennifer-shehane is it possible to provide approximate Cypress version with fixes? Thank you in advance!

tamaserdfalvi commented 3 years ago

Just saw Cypress 5.6.0 coming out, but if it isn't fixed in that, we have to stick to 5.3.0 unfortunately as otherwise all our test runs will fail in Jenkins, making it absolutely unusable :(

jonataswalker commented 3 years ago

Sad because cy.route2() is just a great new feature.

It's true that it is a 5.3.0 feature but there were a lot of fixes after that.

mathew-ferry13 commented 3 years ago

Just upgraded to Cypress 5.6.0 and experienced the same issue

TomaszG commented 3 years ago

Is there any workaround for it? I would like to update Cypress to the latest version, however, this issue blocks me as it breaks the whole CI process. Are there any plans of fixing it in the near future? If not then I may think of supressing the exit code returned by the Cypress using e.g. custom docker entry point or something similar.

Manuel-Suarez-Abascal commented 3 years ago

I have encountered the same issue after upgrading to the latest Cypress version from 5.1.*. I wonder if there is any resolution for it?

Cypress version: 5.6.0 OS: Ubuntu 18.04.5 LTS

jennifer-shehane commented 3 years ago

There is a situation where Cypress will occasionally exit with SIGABRT, SIGTERM, or SIGSEGV and a non-zero exit code when experimentalSourceRewriting is set to true. Please follow this issue for updates if your SIG error disappears when setting experimentalSourceRewriting: false. https://github.com/cypress-io/cypress/issues/9208

This may not be the issue for everyone in this thread however, so we will leave this issue open to track the cause of any other SIGABRT errors.

andreasremdt commented 3 years ago

In our example, we don't (and never have) use experimentalSourceRewriting, but still, since the release of Cypress 5.4.0, every single test run on our CI (Jenkins) fails. Can I provide you with any more information, such as logs?

vincentaudoire commented 3 years ago

We're facing the same issue on GitHub Action. Here's some of the logs:

/home/runner/.cache/Cypress/5.6.0/Cypress/Cypress[5808]: ../../third_party/electron_node/src/api/callback.cc:226:MaybeLocal<v8::Value> node::MakeCallback(v8::Isolate *, Local<v8::Object>, Local<v8::Function>, int, Local<v8::Value> *, node::async_context): Assertion `(env) != nullptr' failed.
200
Error: The Test Runner unexpectedly exited via a exit event with signal SIGABRT
201

202
Please search Cypress documentation for possible solutions:
203

204
https://on.cypress.io
205

206
Check if there is a GitHub issue describing this crash:
207

208
https://github.com/cypress-io/cypress/issues
209

210
Consider opening a new issue.
211

212
----------
213

214
Platform: linux (Ubuntu - 16.04)
215
Cypress Version: 5.6.0
216
    at /home/runner/work/private-signup/private-signup/node_modules/cypress/lib/errors.js:279:17
217
    at tryCatcher (/home/runner/work/private-signup/private-signup/node_modules/bluebird/js/release/util.js:16:23)
218
    at Promise._settlePromiseFromHandler (/home/runner/work/private-signup/private-signup/node_modules/bluebird/js/release/promise.js:547:31)
219
    at Promise._settlePromise (/home/runner/work/private-signup/private-signup/node_modules/bluebird/js/release/promise.js:604:18)
220
    at Promise._settlePromise0 (/home/runner/work/private-signup/private-signup/node_modules/bluebird/js/release/promise.js:649:10)
221
    at Promise._settlePromises (/home/runner/work/private-signup/private-signup/node_modules/bluebird/js/release/promise.js:729:18)
222
    at Promise._fulfill (/home/runner/work/private-signup/private-signup/node_modules/bluebird/js/release/promise.js:673:18)
223
    at Promise._resolveCallback (/home/runner/work/private-signup/private-signup/node_modules/bluebird/js/release/promise.js:466:57)
224
    at Promise._settlePromiseFromHandler (/home/runner/work/private-signup/private-signup/node_modules/bluebird/js/release/promise.js:559:17)
225
    at Promise._settlePromise (/home/runner/work/private-signup/private-signup/node_modules/bluebird/js/release/promise.js:604:18)
226
    at Promise._settlePromise0 (/home/runner/work/private-signup/private-signup/node_modules/bluebird/js/release/promise.js:649:10)
227
    at Promise._settlePromises (/home/runner/work/private-signup/private-signup/node_modules/bluebird/js/release/promise.js:729:18)
228
    at Promise._fulfill (/home/runner/work/private-signup/private-signup/node_modules/bluebird/js/release/promise.js:673:18)
229
    at Promise._resolveCallback (/home/runner/work/private-signup/private-signup/node_modules/bluebird/js/release/promise.js:466:57)
230
    at Promise._settlePromiseFromHandler (/home/runner/work/private-signup/private-signup/node_modules/bluebird/js/release/promise.js:559:17)
231
    at Promise._settlePromise (/home/runner/work/private-signup/private-signup/node_modules/bluebird/js/release/promise.js:604:18) {
232
  known: true
233
}
234
Error: The Test Runner unexpectedly exited via a exit event with signal SIGABRT
kamiloski commented 3 years ago

There is a situation where Cypress will occasionally exit with SIGABRT, SIGTERM, or SIGSEGV and a non-zero exit code when experimentalSourceRewriting is set to true. Please follow this issue for updates if your SIG error disappears when setting experimentalSourceRewriting: false. #9208

This may not be the issue for everyone in this thread however, so we will leave this issue open to track the cause of any other SIGABRT errors.

Doesn't work for me v 5.6.0

jonataswalker commented 3 years ago

At least on Azure Pipeline v6.0.0 solved this issue.

I guess it was the electron upgrade.

nschonni commented 3 years ago

Worked on the initial v6.0.0 dependabot PR, then started failed again, so I don't think it's addressed Edit: Run failing with same error with 6.0.0 https://github.com/canada-ca/ore-ero/runs/1453019251?check_suite_focus=true#step:12:876

DBLaci commented 3 years ago

It works for me with 6.0.0 (docker image using gitlab runner with docker) I use this image: https://hub.docker.com/layers/cypress/included/6.0.0/images/sha256-8d7aac452aa0444d3c62ae27afd519587da662e1401c2542c0024359ad59a8d9?context=explore

kamiloski commented 3 years ago

in v6.0.0 for me still occurs :(

daftspaniel commented 3 years ago

With 6.0.0 and twelve jobs, Two failed with the following messageon CircleCI:

/root/.cache/Cypress/6.0.0/Cypress/Cypress[249]: ../../third_party/electron_node/src/api/callback.cc:247:MaybeLocal<v8::Value> node::MakeCallback(v8::Isolate *, Local<v8::Object>, Local<v8::Function>, int, Local<v8::Value> *, node::async_context): Assertion `(env) != nullptr' failed.
The Test Runner unexpectedly exited via a exit event with signal SIGABRT
tamaserdfalvi commented 3 years ago

@jennifer-shehane : would it be possible maybe to make Electron version configurable? That might be a temporary cure. Based on this topic and on my experiences it's the most likely source of problem, and as long as it persists unfortunately we all have to stick with V5.3.0 no matter what upgrades you're introducing :(

vincentaudoire commented 3 years ago

On GitHub action setting the browser to "chrome" seemed to have solved the issue. Hope that helps!

rasmusrim commented 3 years ago

How do you set it to chrome if you do not use the github action, but instead run npx cypress run?

bahmutov commented 3 years ago

npx cypress run —browser chrome

Sent from my iPhone

On Dec 4, 2020, at 07:50, Rasmus notifications@github.com wrote:

 How do you set it to chrome if you do not use the github action, but instead run npx cypress run?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

rasmusrim commented 3 years ago

Thanks @bahmutov, but I thought chrome was the default browser?

bahmutov commented 3 years ago

No, Electron is built-in default browser https://on.cypress.io/launching-browsers

On Fri, Dec 4, 2020 at 8:08 AM Rasmus notifications@github.com wrote:

Thanks @bahmutov https://github.com/bahmutov, but I thought chrome was the default browser?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cypress-io/cypress/issues/8865#issuecomment-738774695, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ4BJW6IMIMKLIJVOGDNBDSTDNL7ANCNFSM4STK3BXA .

-- Dr. Gleb Bahmutov, PhD

Schedule video chat / phone call / meeting with me via https://calendly.com/bahmutov gleb.bahmutov@gmail.com @bahmutov https://twitter.com/@bahmutov https://glebbahmutov.com/ https://glebbahmutov.com/blog https://github.com/bahmutov

donalmurtagh commented 3 years ago

I'm seeing this issue on Azure Pipeline with Cypress 6.0.1

acouvreur commented 3 years ago

We are having this issue using the Cypress docker image cypress/included:5.5.0 on K8S provisioned worker for Jenkins.

grantral commented 3 years ago

I'm seeing this issue on GitLab 13.5 with GitLab Runner 13.5.0 with Cypress 6.0.1 with cypress/base:14.

.gitlab-ci.yml ``` cypress: image: cypress/base:14 stage: test before_script: - export DEBUG=cypress:* - npm ci - npm run cy:info - npm run cy:verify - npm run cy:version script: - npm run cy:run ```
log ``` $ npm run cy:info > e2e-tests@1.0.0 cy:info /builds/grantral/e2e-tests > cypress info 2020-12-07T17:43:22.052Z cypress:cli:cli cli starts with arguments ["/usr/local/bin/node","/builds/grantral/e2e-tests/node_modules/.bin/cypress","info"] 2020-12-07T17:43:22.053Z cypress:cli NODE_OPTIONS is not set 2020-12-07T17:43:22.054Z cypress:cli:cli program parsing arguments 2020-12-07T17:43:22.133Z cypress:cli undefined DISPLAY environment variable 2020-12-07T17:43:22.134Z cypress:cli Cypress will spawn its own Xvfb 2020-12-07T17:43:22.134Z cypress:cli needs to start own Xvfb? true 2020-12-07T17:43:22.135Z cypress:cli Starting Xvfb 2020-12-07T17:43:22.155Z cypress:cli spawning, should retry on display problem? false 2020-12-07T17:43:22.159Z cypress:cli passing DISPLAY :99 2020-12-07T17:43:22.159Z cypress:cli spawning Cypress with executable: /root/.cache/Cypress/6.0.1/Cypress/Cypress 2020-12-07T17:43:22.160Z cypress:cli spawn args [ '--no-sandbox', '--', '--mode=info', '--cwd', '/builds/grantral/e2e-tests' ] { detached: false, stdio: [ 'inherit', 'inherit', 'pipe' ] } 2020-12-07T17:43:22.163Z cypress:cli piping child STDERR to process STDERR cypress:ts Running without ts-node hook in environment "production" +0ms cypress:server:appdata path: /root/.config/Cypress/cy/production/browsers +0ms cypress:server:util:node_options NODE_OPTIONS check passed, not forking { NODE_OPTIONS: '--max-http-header-size=1048576' } +0ms cypress:server:util:node_options restoring NODE_OPTIONS { NODE_OPTIONS: '--max-http-header-size=1048576', ORIGINAL_NODE_OPTIONS: undefined } +1ms cypress:server:cypress starting cypress with argv [ '/root/.cache/Cypress/6.0.1/Cypress/Cypress', '--no-sandbox', '--', '--mode=info', '--cwd', '/builds/grantral/e2e-tests' ] +0ms cypress:server:args argv array: [ '/root/.cache/Cypress/6.0.1/Cypress/Cypress', '--no-sandbox', '--mode=info', '--cwd', '/builds/grantral/e2e-tests' ] +0ms cypress:server:args parsed argv options { options: { _: [ '/root/.cache/Cypress/6.0.1/Cypress/Cypress' ], sandbox: false, mode: 'info', cwd: '/builds/grantral/e2e-tests' } } +3ms cypress:server:args argv parsed: { _: [ '/root/.cache/Cypress/6.0.1/Cypress/Cypress' ], sandbox: false, mode: 'info', cwd: '/builds/grantral/e2e-tests', invokedFromCli: true } +3ms cypress:server:util:proxy found proxy environment variables { npm_config_proxy: '', npm_config_https_proxy: '', npm_config_noproxy: '' } +0ms cypress:server:args options { _: [ '/root/.cache/Cypress/6.0.1/Cypress/Cypress' ], sandbox: false, mode: 'info', cwd: '/builds/grantral/e2e-tests', invokedFromCli: true, config: {} } +1ms cypress:server:args argv options: { _: [ '/root/.cache/Cypress/6.0.1/Cypress/Cypress' ], sandbox: false, mode: 'info', cwd: '/builds/grantral/e2e-tests', invokedFromCli: true, config: {} } +1ms cypress:server:cypress from argv [ '/root/.cache/Cypress/6.0.1/Cypress/Cypress', '--no-sandbox', '--mode=info', '--cwd', '/builds/grantral/e2e-tests' ] got options { _: [ '/root/.cache/Cypress/6.0.1/Cypress/Cypress' ], sandbox: false, mode: 'info', cwd: '/builds/grantral/e2e-tests', invokedFromCli: true, config: {} } +9ms 2020-12-07T17:43:23.071Z cypress:cli child event fired { event: 'exit', code: null, signal: 'SIGABRT' } 2020-12-07T17:43:23.072Z cypress:cli child event fired { event: 'close', code: null, signal: 'SIGABRT' } 2020-12-07T17:43:23.085Z cypress:cli Stopping Xvfb The Test Runner unexpectedly exited via a exit event with signal SIGABRT Please search Cypress documentation for possible solutions: https://on.cypress.io Check if there is a GitHub issue describing this crash: https://github.com/cypress-io/cypress/issues Consider opening a new issue. ---------- Platform: linux (Debian - 10.5) Cypress Version: 6.0.1 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! e2e-tests@1.0.0 cy:info: `cypress info` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the e2e-tests@1.0.0 cy:info script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-12-07T17_43_23_106Z-debug.log ```
andreasremdt commented 3 years ago

I also still experience the issue in 6.1.0. This time not only in our CI environment but also on my laptop, where I run Ubuntu 20.04. We are still stuck with 5.3.0 at this point.

emrehayirci commented 3 years ago

I am experiencing the same issue as well on my local and also in our CI/CD (Using version 6.1.0). Here is the complete log:

/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/MacOS/Cypress[33035]: ../../third_party/electron_node/src/api/callback.cc:247:MaybeLocal<v8::Value> node::MakeCallback(v8::Isolate *, Local<v8::Object>, Local<v8::Function>, int, Local<v8::Value> *, node::async_context): Assertion `(env) != nullptr’ failed.
 1: 0x10f821b15 node::Buffer::New(v8::Isolate*, char*, unsigned long, void (*)(char*, void*), void*) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 2: 0x10f82192b node::Buffer::New(v8::Isolate*, char*, unsigned long, void (*)(char*, void*), void*) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 3: 0x10f79c8e9 node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 4: 0x10cbde11c ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 5: 0x10cae5894 ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 6: 0x10cae3df7 ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 7: 0x10cae3cb0 ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 8: 0x110dd51f4 v8::internal::compiler::ZoneStats::GetCurrentAllocatedBytes() const [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 9: 0x110a5d5a9 v8::internal::compiler::ZoneStats::GetCurrentAllocatedBytes() const [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
10: 0x10d86d3cd v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
11: 0x10cb676cb ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
12: 0x10cb6770e ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
13: 0x10cb69b2d ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
14: 0x10cb69963 ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
15: 0x10d87f589 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
16: 0x10d880c44 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
17: 0x10d87c655 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
18: 0x10d846ec1 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
19: 0x10d846be6 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
20: 0x10d08a1ee ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
21: 0x10d08a6f2 ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
22: 0x10caa3f48 ElectronMain [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
23: 0x107d635bd  [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/MacOS/Cypress]
24: 0x7fff6b655cc9 start [/usr/lib/system/libdyld.dylib]/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/MacOS/Cypress[33035]: ../../third_party/electron_node/src/api/callback.cc:247:MaybeLocal<v8::Value> node::MakeCallback(v8::Isolate *, Local<v8::Object>, Local<v8::Function>, int, Local<v8::Value> *, node::async_context): Assertion `(env) != nullptr’ failed.
 1: 0x10f821b15 node::Buffer::New(v8::Isolate*, char*, unsigned long, void (*)(char*, void*), void*) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 2: 0x10f82192b node::Buffer::New(v8::Isolate*, char*, unsigned long, void (*)(char*, void*), void*) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 3: 0x10f79c8e9 node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 4: 0x10cbde11c ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 5: 0x10cae5894 ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 6: 0x10cae3df7 ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 7: 0x10cae3cb0 ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 8: 0x110dd51f4 v8::internal::compiler::ZoneStats::GetCurrentAllocatedBytes() const [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
 9: 0x110a5d5a9 v8::internal::compiler::ZoneStats::GetCurrentAllocatedBytes() const [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
10: 0x10d86d3cd v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
11: 0x10cb676cb ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
12: 0x10cb6770e ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
13: 0x10cb69b2d ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
14: 0x10cb69963 ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
15: 0x10d87f589 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
16: 0x10d880c44 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
17: 0x10d87c655 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
18: 0x10d846ec1 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
19: 0x10d846be6 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
20: 0x10d08a1ee ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
21: 0x10d08a6f2 ElectronInitializeICUandStartNode [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
22: 0x10caa3f48 ElectronMain [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]
23: 0x107d635bd  [/Users/zahayiem/Library/Caches/Cypress/6.1.0/Cypress.app/Contents/MacOS/Cypress]
24: 0x7fff6b655cc9 start [/usr/lib/system/libdyld.dylib]

As a workaround, I am using headless chrome instead of headless electron

mihai-dinculescu commented 3 years ago

For what it's worth, I'm using the following bash script to get around this issue.

#!/bin/bash

# work-around for https://github.com/cypress-io/cypress/issues/8865
CYPRESS_OUTPUT="cypress_output.txt"
yarn cypress run | tee "${CYPRESS_OUTPUT}"

if grep -qi "All specs passed" "${CYPRESS_OUTPUT}"
then
    exit 0
else
    exit 1
fi
riboher commented 3 years ago

I am too experiencing this issue in v6.1.0. For some reason, this is only happening in one test that downloads a file generated in my app. I think it has to do with the fact that the dialog prompt makes the process fail, even though all tests pass correctly. This is only happening since this last update

daftspaniel commented 3 years ago

Still occurs with 6.2.0

    ✖  11 of 34 failed (32%)                    12:36      279      258       21        -        -  

/root/.cache/Cypress/6.2.0/Cypress/Cypress[254]: ../../third_party/electron_node/src/api/callback.cc:247:MaybeLocal<v8::Value> node::MakeCallback(v8::Isolate *, Local<v8::Object>, Local<v8::Function>, int, Local<v8::Value> *, node::async_context): Assertion `(env) != nullptr' failed.
The Test Runner unexpectedly exited via a exit event with signal SIGABRT

Please search Cypress documentation for possible solutions:

https://on.cypress.io

Check if there is a GitHub issue describing this crash:

https://github.com/cypress-io/cypress/issues

Consider opening a new issue.

----------

Platform: linux (Debian - 9.11)
Cypress Version: 6.2.0
Error: No such container:path: e2e:/usr/src/app/desktop/cypress/videos/.

Exited with code exit status 1
CircleCI received exit code 1
nitsan commented 3 years ago

I had the same issue (was ok in 5.2.0) after trying to update to 5.6.0.

  1. I added --browser chrome to my cypress run
  2. Changed my docker image from cypress/base:12.19.0 to cypress/browsers:node12.19.0-chrome86-ff82

and now it's working!

jennifer-shehane commented 3 years ago

SIGABRT error codes generally happen when there are out-of-memory conditions. This seems related to something within Electron.

Most people in this thread seem to be indicating that this error began in 5.4.0 (although there is a thread with this error occuring earlier here: https://github.com/cypress-io/cypress/issues/5965). My only guess is that this is related to our upgrade of Electron in 5.4.0 https://github.com/cypress-io/cypress/pull/8406 as nothing else in that release seems relevant.

One person indicated that this error only occured when testing a download file in their app. I haven't been able to reproduce this.

Can you provide a reproducible example? We haven't been able to reproduce this error ourselves. It's likely dependent on the tests being run.

Current Workaround

Run cypress run using the --browser flag to run in an installed version of a Chrome or Firefox browser (not Electron). https://on.cypress.io/command-line#cypress-run-browser-lt-browser-name-or-path-gt

mathew-ferry13 commented 3 years ago

I am downloading a document during my test which causes a "Save Location" popup to appear even when running the cypress tests headless. If I manually close this popup before the test is completed, then cypress exists successfully. If I leave this popup open, then this error occurs.

Unfortunately I cannot share my project.

bahmutov commented 3 years ago

@mathew-ferry13 your issue is different from the original, to see how to deal with file downloads check out "File Download" recipe https://github.com/cypress-io/cypress-example-recipes/tree/master/examples/testing-dom__download

ozgurrgul commented 3 years ago

Recently I upgraded to 5.5.0 and this issue happened to our project. It is indeed caused by electron_node:

05-Jan-2021 13:34:05    component-tests_1  |   (Run Finished)
05-Jan-2021 13:34:05    component-tests_1  | 
05-Jan-2021 13:34:05    component-tests_1  | 
05-Jan-2021 13:34:05    component-tests_1  |        Spec                                              Tests  Passing  Failing  Pending  Skipped  
05-Jan-2021 13:34:05    component-tests_1  |   ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName.feature                              00:01        1        1        -        -        - │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName.feature            00:16        4        4        -        -        - │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName.feature               00:49        8        8        -        -        - │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName.feature                      00:14        2        2        -        -        - │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName.feature          00:48        8        7        -        1        - │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName.feature              00:19        3        3        -        -        - │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName.feature        00:12        2        2        -        -        - │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName.fe      00:33        2        2        -        -        - │
05-Jan-2021 13:34:05    component-tests_1  |   │    ature                                                                                       │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName      00:38        2        2        -        -        - │
05-Jan-2021 13:34:05    component-tests_1  |   │    aPanel.feature                                                                              │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName.feature      00:37        4        4        -        -        - │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName.feature       00:32        2        2        -        -        - │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName      02:30        6        6        -        -        - │
05-Jan-2021 13:34:05    component-tests_1  |   │    .feature                                                                                    │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName.feature      00:39        2        2        -        -        - │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName.      01:51        6        6        -        -        - │
05-Jan-2021 13:34:05    component-tests_1  |   │    feature                                                                                     │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName.feature       00:29        2        2        -        -        - │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName.feature        00:48        7        6        -        1        - │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName.feature            00:24        3        3        -        -        - │
05-Jan-2021 13:34:05    component-tests_1  |   ├────────────────────────────────────────────────────────────────────────────────────────────────┤
05-Jan-2021 13:34:05    component-tests_1  |   │ ✔  CensoredTestName.feature      00:15        2        2        -        -        - │
05-Jan-2021 13:34:05    component-tests_1  |   └────────────────────────────────────────────────────────────────────────────────────────────────┘
05-Jan-2021 13:34:05    component-tests_1  |     ✔  All specs passed!                        12:03       66       64        -        2        -  
05-Jan-2021 13:34:05    component-tests_1  | 
05-Jan-2021 13:34:05    component-tests_1  | /root/.cache/Cypress/5.5.0/Cypress/Cypress --no-sandbox -- --run-project /component-tests --config baseUrl=http://censored-url:80,fixturesFolder=./fixtures --reporter junit --reporter-options mochaFile=it-tests-result.xml,toConsole=true --cwd /component-tests[17]: ../../third_party/electron_node/src/api/callback.cc:226:MaybeLocal<v8::Value> node::MakeCallback(v8::Isolate *, Local<v8::Object>, Local<v8::Function>, int, Local<v8::Value> *, node::async_context): Assertion `(env) != nullptr' failed.
05-Jan-2021 13:34:05    component-tests_1  | The Test Runner unexpectedly exited via a exit event with signal SIGABRT
05-Jan-2021 13:34:05    component-tests_1  | 
05-Jan-2021 13:34:05    component-tests_1  | Please search Cypress documentation for possible solutions:
05-Jan-2021 13:34:05    component-tests_1  | 
05-Jan-2021 13:34:05    component-tests_1  | https://on.cypress.io

Update: As suggested by others, running test using chrome browser is OK. Problem is in electron. We fixed it with --browser chrome parameter.

sslaws commented 3 years ago

Our team has also been experiencing this after upgrading from 5.3 multiple times and we always reverted. Today, I spent some time and it was definitely caused by file download dialogs. After updating the spec as per https://github.com/cypress-io/cypress-example-recipes/tree/master/examples/testing-dom__download the issue is resolved.

Note: The work arounds of using --browser chrome also worked.

andreasremdt commented 3 years ago

I can also confirm that the issue is related to downloading files in tests. I followed the recipe example as well and it works like a charm.

jennifer-shehane commented 3 years ago

There's a PR open to prevent the download dialog when clicking on a file to download: https://github.com/cypress-io/cypress/pull/14431 I'm not sure this covers all use cases in this issue however, since there has not been a reproducible example provided and my trying to recreate this was unsuccessful.

tamaserdfalvi commented 3 years ago

Upgrading to 6.3.0 no longer throws this error on our Ubuntu/jenkins so looks like I can finally move on from 5.3.0