cypress: SIGABRT exit a the end of CI run

Cypress is randomly crashing at the end of normally successful runs.

In Cypress 3.7:

/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress[13137]: ../../third_party/electron_node/src/node_platform.cc:435:std::shared_ptr<PerIsolatePlatformData> node::NodePlatform::ForIsolate(v8::Isolate *): Assertion `data' failed.
 1: 0x564e854d6d85 node::Abort() [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
 2: 0x564e854d664f  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
 3: 0x564e8552249b  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
 4: 0x564e81ab798c  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
 5: 0x564e81b04835 v8::internal::PagedSpace::RefillLinearAllocationAreaFromFreeList(unsigned long) [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
 6: 0x564e81b0763c v8::internal::PagedSpace::RawSlowRefillLinearAllocationArea(int) [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
 7: 0x564e81b075c9 v8::internal::PagedSpace::SlowRefillLinearAllocationArea(int) [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
 8: 0x564e816bd913  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
 9: 0x564e81a9882a v8::internal::Factory::NewFixedArrayWithFiller(v8::internal::RootIndex, int, v8::internal::Object, v8::internal::PretenureFlag) [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
10: 0x564e8181c406  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
11: 0x564e8181c262  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
12: 0x564e819aae42  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
13: 0x564e819a13b0  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
14: 0x564e819a12c4  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
15: 0x564e8180d4a8 v8::internal::Compiler::FinalizeOptimizedCompilationJob(v8::internal::OptimizedCompilationJob*, v8::internal::Isolate*) [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
16: 0x564e8180d0eb v8::internal::OptimizingCompileDispatcher::InstallOptimizedFunctions() [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
17: 0x564e81a7678f v8::internal::StackGuard::HandleInterrupts() [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
18: 0x564e81ca2566  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
19: 0x564e81fabfab  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
The Test Runner unexpectedly exited via a exit event with signal SIGABRT

In Cypress 3.8:

/home/runner/.cache/Cypress/3.8.0/Cypress/Cypress[7074]: ../../third_party/electron_node/src/node_platform.cc:444:std::shared_ptr<PerIsolatePlatformData> node::NodePlatform::ForIsolate(v8::Isolate *): Assertion `data' failed.
The Test Runner unexpectedly exited via a exit event with signal SIGABRT

Versions

  • Cypress 3.7, Cypress 3.8
  • Reproduced in GitHub Actions and CircleCI

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 16
  • Comments: 50 (6 by maintainers)

Commits related to this issue

Most upvoted comments

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

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

node 13.x doesn’t make a difference

DEBUG=cypress:* is making some of our tests failing, so we can’t reproduce the issue with it, all tests needs to pass for the issue to happen.

DEBUG=cypress:cli is not helping much:

2019-12-17T10:31:01.7270128Z /home/runner/.cache/Cypress/3.8.0/Cypress/Cypress[7683]: ../../third_party/electron_node/src/node_platform.cc:444:std::shared_ptr<PerIsolatePlatformData> node::NodePlatform::ForIsolate(v8::Isolate *): Assertion `data' failed.
2019-12-17T10:31:02.0300655Z 2019-12-17T10:31:02.029Z cypress:cli child event fired { event: 'exit', code: null, signal: 'SIGABRT' }
2019-12-17T10:31:02.0304727Z 2019-12-17T10:31:02.030Z cypress:cli child event fired { event: 'close', code: null, signal: 'SIGABRT' }
2019-12-17T10:31:02.0341279Z 2019-12-17T10:31:02.033Z cypress:cli Stopping Xvfb
2019-12-17T10:31:02.0664786Z The Test Runner unexpectedly exited via a exit event with signal SIGABRT

Given the error, do you have a more specific DEBUG prefix to suggest?

We are having the same issue, updating to version 4.5 did not fix it.

This is eventually happening here, too.

Cypress Version: 3.8.3

Runtime platform:

* CentOS Linux release 7.7.1908 (Core)
* arch=amd64
* os=linux
* gitlab runner version=12.7.1
* CI command: `vue-cli-service test:e2e` (or `npx vue-cli-service test:e2e`)
     ✔  All specs passed!                        01:10       27       27        -        -        -  
/home/gitlab-runner/.cache/Cypress/3.8.3/Cypress/Cypress[2663]: ../../third_party/electron_node/src/node_platform.cc:444:std::shared_ptr<PerIsolatePlatformData> node::NodePlatform::ForIsolate(v8::Isolate *): Assertion `data' 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 (Centos - 7.7.1908)
Cypress Version: 3.8.3
ERROR  Error: Command failed: /home/gitlab-runner/builds/xREmVxJA/0/[..]/node_modules/cypress/bin/cypress run --config baseUrl=http://${CI_ENVIRONMENT_SLUG}.local --headless --env APP_VERSION=${CI_COMMIT_REF_NAME}
Error: Command failed: /home/gitlab-runner/builds/xREmVxJA/0/[..]/node_modules/cypress/bin/cypress run --config baseUrl=http://${CI_ENVIRONMENT_SLUG}.local --headless --env APP_VERSION=${CI_COMMIT_REF_NAME}
    at makeError (/home/gitlab-runner/builds/xREmVxJA/0/[..]/node_modules/execa/index.js:174:9)
    at /home/gitlab-runner/builds/xREmVxJA/0/[..]/node_modules/execa/index.js:278:16
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Hi! I’m quite uncertainly if the log file below is about the same error, but the fact is…

Although all tests passed, we had a crash on gitlab-ci job which runs cypress.

And as I told you, since then I switched on debug mode… So let attach it here.

ERROR: Job failed: exit status 1:

some of the ending rows:

     ✔  All specs passed!                        01:06       27       27        -        -        -  
  cypress:server:browsers:electron debugger detached due to { reason: 'target closed' } +122ms
  cypress:server:cypress about to exit with code 0 +2m
events.js:180
      throw er; // Unhandled 'error' event
      ^
Error [ERR_STREAM_DESTROYED] [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
    at doWrite (_stream_writable.js:414:19)
    at writeOrBuffer (_stream_writable.js:402:5)
    at Socket.Writable.write (_stream_writable.js:302:11)
    at Function.log (/home/gitlab-runner/.cache/Cypress/3.8.3/Cypress/resources/app/packages/server/node_modules/debug/src/node.js:190:24)
    at debug (/home/gitlab-runner/.cache/Cypress/3.8.3/Cypress/resources/app/packages/server/node_modules/debug/src/common.js:114:10)
    at File.get (/home/gitlab-runner/.cache/Cypress/3.8.3/Cypress/resources/app/packages/server/lib/util/file.js:49:5)
    at Object.getUser (/home/gitlab-runner/.cache/Cypress/3.8.3/Cypress/resources/app/packages/server/lib/cache.js:132:23)
    at Object.get (/home/gitlab-runner/.cache/Cypress/3.8.3/Cypress/resources/app/packages/server/lib/user.js:16:20)
    at Object.getAuthToken (/home/gitlab-runner/.cache/Cypress/3.8.3/Cypress/resources/app/packages/server/lib/exception.js:54:19)
    at Object.create (/home/gitlab-runner/.cache/Cypress/3.8.3/Cypress/resources/app/packages/server/lib/exception.js:62:51)
    at exports.Logger.logger.createException (/home/gitlab-runner/.cache/Cypress/3.8.3/Cypress/resources/app/packages/server/lib/logger.js:67:35)
    at exports.Logger.logger.defaultErrorHandler (/home/gitlab-runner/.cache/Cypress/3.8.3/Cypress/resources/app/packages/server/lib/logger.js:92:12)
    at exports.Logger.exitOnError (/home/gitlab-runner/.cache/Cypress/3.8.3/Cypress/resources/app/packages/server/lib/logger.js:62:21)
    at exports.Logger.Logger._uncaughtException (/home/gitlab-runner/.cache/Cypress/3.8.3/Cypress/resources/app/packages/server/node_modules/winston/lib/winston/logger.js:645:12)
    at process.emit (events.js:208:15)
    at processEmit (/home/gitlab-runner/.cache/Cypress/3.8.3/Cypress/resources/app/packages/server/node_modules/signal-exit/index.js:155:32)
    at processEmit [as emit] (/home/gitlab-runner/.cache/Cypress/3.8.3/Cypress/resources/app/packages/launcher/node_modules/signal-exit/index.js:155:32)
    at process._fatalException (internal/process/execution.js:150:25)
Emitted 'error' event at:
    at errorOrDestroy (internal/streams/destroy.js:107:12)
    at onwriteError (_stream_writable.js:433:5)
    at onwrite (_stream_writable.js:460:5)
    at doWrite (_stream_writable.js:414:11)
    at writeOrBuffer (_stream_writable.js:402:5)
    [... lines matching original stack trace ...]
2020-03-17T12:36:10.384Z cypress:cli child event fired { event: 'exit', code: 7, signal: null }
2020-03-17T12:36:10.386Z cypress:cli Stopping Xvfb
2020-03-17T12:36:10.390Z cypress:cli child event fired { event: 'close', code: 7, signal: null }
 ERROR  Error: Command failed: /home/gitlab-runner/builds/xREmVxJA/0/producao_distribuicao/integra/integra-web/node_modules/cypress/bin/cypress run --config baseUrl=http://integra.devel.ebc --headless --env APP_VERSION=0.0.0-master
Error: Command failed: /home/gitlab-runner/builds/xREmVxJA/0/producao_distribuicao/integra/integra-web/node_modules/cypress/bin/cypress run --config baseUrl=http://integra.devel.ebc --headless --env APP_VERSION=0.0.0-master
    at makeError (/home/gitlab-runner/builds/xREmVxJA/0/producao_distribuicao/integra/integra-web/node_modules/execa/index.js:174:9)
    at /home/gitlab-runner/builds/xREmVxJA/0/producao_distribuicao/integra/integra-web/node_modules/execa/index.js:278:16
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Missing /usr/lib/gitlab-runner/gitlab-runner. Uploading artifacts is disabled.
00:00
ERROR: Job failed: exit status 1

Logging file with debug mode on: gitlabci-cypress-job.log

@jennifer-shehane when setting the image to ubuntu-1604:201903-01 I’ve been unable to duplicate the SIGABRT error. I’ll get it merged and hence trigger more executions with it, I’ll post an update after more runs have occurred.