cypress-io / cypress

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

SIGABRT exit a the end of CI run #5965

Closed znarf closed 3 years ago

znarf commented 4 years ago

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

jennifer-shehane commented 4 years ago

We've never seen a SIGABRT error before in Cypress.

Could you run Cypress in debug mode mode and print the entire set of logs here?

znarf commented 4 years ago

Thank you, it's really happening a lot on our side. I'm gonna try the DEBUG mode and also check if there is a difference between node 12.x and node 13.x.

znarf commented 4 years ago

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?

tomatobrown commented 4 years ago

The same exact issue started happeneing for me today also. I'm also using CircleCI and running with electron

znarf commented 4 years ago

While I have seen a SIGABRT in Cypress 3.7 last week, the precise issue reported here is happening only in Cypress 3.8, updating the issue.

Looking at the changelog, maybe this is related to the Electron update? Downgrading to Cypress 3.7 now to check if it's better for us.

flotwig commented 4 years ago

I believe @bahmutov ran into a SIGABRT in macOS Catalina during debugging, but he got past it somehow. This is happening in Linux right?

tomatobrown commented 4 years ago

Yea, CircleCI’s machine image which is some flavour of Linux

On Tue, Dec 17, 2019 at 7:08 PM Zach Bloomquist notifications@github.com wrote:

I believe @bahmutov https://github.com/bahmutov ran into a SIGABRT in macOS Catalina during debugging, but he got past it somehow. This is happening in Linux right?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cypress-io/cypress/issues/5965?email_source=notifications&email_token=AARFFTGUFRZM7FEYCXYCPITQZFZXXA5CNFSM4J3G3WG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHEP63I#issuecomment-566820717, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARFFTEAA5KHWT36MGSSFX3QZFZXXANCNFSM4J3G3WGQ .

znarf commented 4 years ago

It used to work fine in Cypress 3.7 for weeks but it's currently also happening when downgrading to Cypress 3.7 (the error message is slightly different). On our side, the first occurrences of SIGABRT errors were seen 6 days ago.

I tried to downgrade Node and Ubuntu without success.

baconjulie commented 4 years ago

We are experiencing this same issue consistently as of today 11am EST. There is very little information provided and all tests appear to pass, the failure at the very end of the build. @jennifer-shehane any update?

Versions

Cypress: 3.8.0 Reproduced in CircleCI

Error

The Test Runner unexpectedly exited via a exit event with signal SIGABRT

Check if there is a GitHub issue describing this crash:

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

Consider opening a new issue.

----------

Platform: linux (Ubuntu Linux - 14.04)
Cypress Version: 3.8.0
jennifer-shehane commented 4 years ago

We'll really need more information. Ideally tracking down exactly what changed that is causing this error. Are you all using CircleCI Server? Did you upgrade by chance?

The fact that downgrading to 3.7 does not resolve the issue leads me to believe there's another factor involved.

tomatobrown commented 4 years ago

@jennifer-shehane thanks for being so responsive, unfortunately I don't have much more info. Looks like we are all using CircleCI. I'm using the base 'machine' image that Circle maintains, maybe circle changed that image? I'll try defining it to something like ubuntu-1604:201903-01 and let you know.

Currently I'm just using.. int: machine: docker_layer_caching: true shell: /bin/bash working_directory: ~/app

It was working for weeks and then stopped with this SIGABRT error

I'll try defining the image

tomatobrown commented 4 years ago

@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.

TheRusskiy commented 4 years ago

The same issue is happening to us after upgrading from Cypress 3.4.1 to 3.8.2. Cypress: 3.8.2 Browser: Electron 78 (headless) Node Version: v12.13.1 Ubuntu 18.10

Happens on older node versions as well.

Docker container inside Google cloud.

znarf commented 4 years ago

@TheRusskiy which docker image are you using? A cypress one or a custom one, if using a custom do you have the extra apt packages installed?

On our side, we're not seeing the errors anymore since we made this change https://github.com/opencollective/opencollective-api/commit/1fd1f943bbc794f3e06ef7a3067d6cec5e1fb7e5#diff-8e9db7c3471e6c0ca16bd70456b7fffcR50 Not sure if it's a coincidence or not but worth checking.

TheRusskiy commented 4 years ago

@znarf custom one based on ubuntu:18.10, it has cypress deps installed (at least they were enough on older cypress versions).

guyisra commented 4 years ago

I had the same issue, was solved by using cypress/browsers:node11.13.0-chrome73

znarf commented 4 years ago

@TheRusskiy can you double check a recent dependency list and/or try switching to a cypress image?

TheRusskiy commented 4 years ago

@znarf, indeed, there were a couple of packages missing, but unfortunately, it still fails sometimes (3 out of 10). I haven't installed Chinese fonts though, hope it's not critical.

TheRusskiy commented 4 years ago

I ran our test suite 20 times using Chrome instead of Electron and it seems to be working, so it looks like an Electron issue.

AlexSwtlsk commented 4 years ago

Hi, i'm still having this issue. I've changed my docker image version from cypress/browsers:node12.8.1-chrome78-ff70 to cypress/browsers:node12.14.0-chrome79-ff71 and cypress from 3.8.1 to 3.8.2.

@TheRusskiy how did you manage to drop the error ?

The output error

     ✔  All specs passed!                        00:26        2        2        -        -        -  
 /builds/dejbox/e2e/cache/Cypress/3.8.2/Cypress/Cypress --no-sandbox -- --run-project /builds/dejbox/e2e --cwd /builds/dejbox/e2e[92]: ../../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.

E2E tests are integrated in each merge request from back & middle & front stacks. Having this issue blocks everything :)

TheRusskiy commented 4 years ago

@AlexSwtlsk I ended up using headless chrome instead of Electron.

jasdeepkhalsa commented 4 years ago

This is happening intermittently for me also when using headless built-in electron mode within a Jenkins pipeline whilst on a Linux server, and this occurs right after all the specs have passed the first time successfully.

There is no explanation as to what has caused this. Output is very similar to the one reported above:

/root/.cache/Cypress/3.8.3/Cypress/Cypress[213]: ../../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

The only thing different in my cypress setup which breaks from the norm is:

TheRusskiy commented 4 years ago

@jasdeepkhalsa at some point I was thinking that cypress-plugin-retries could be the reason, but if I remember correctly my actions, removing it did not help

PadraigGalvin commented 4 years ago

I'm also experiencing this issue with tests running on CircleCI with Cypress 4. The image being used is circleci/node:12-browsers.

The Test Runner unexpectedly exited via a exit event with signal SIGABRT

[...]

----------

Platform: linux (Debian - 9.11)
Cypress Version: 4.0.2

After running the tests individually only one of them seems to consistently have this issue. As far as I can tell the only difference between the failing test and others is that it uses cy.server.

Here's a simplified version of the test:

context('Create Portal', () => {
    beforeEach(() => {
        cy.server();
        cy.visit('/createAccount');
    });

    it('register a new account', () => {
        cy.route('/validateEmail').as('validateEmail');
        cy.get('[data-test="registrationEmailInput"] input')
            .should('be.visible')
            .type('new-account@example.com');
        cy.wait('@validateEmail');

        cy.get('[data-test="registrationContinueButton"]')
            .should('be.visible')
            .click();
    });
});

Could the issue be related to how the server is terminated?

TheRusskiy commented 4 years ago

@padraiggalvin we don't use cy.server but it still happened to us. Not that it couldn't be related, since we don't know a reason, it could be different bugs.

jpita commented 4 years ago

this happened to me now here https://app.circleci.com/jobs/github/wikimedia/wikipedia-kaios/630 I rerun the build without changes and it passed.

MartinKei commented 4 years ago

We've just had the same issue on our headless Linux VM running the tests as Jenkinsjob.

/opt/skdbuild/.cache/Cypress/4.0.1/Cypress/Cypress[7330]: ../../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

Node is running in version 8 LTS.

tdahlhoff commented 4 years ago

We have same issues when running Cypress-Tests with Jenkins. I did not see this before upgrading cypress from 3.x to 4.1.. Output after successfull run:

/home/systemtests/.cache/Cypress/4.1.0/Cypress/Cypress[22958]: ../../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 close 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: 4.1.0
adrianovieira commented 4 years ago

This is eventually happening here, too.

Cypress Version: 3.8.3

Runtime platform:

     ✔  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)
VesterDe commented 4 years ago

Happens intermittently on 4.1.0 on our CodeBuild CI. I ran it 25 times in a row and the first one failed, while the other 24 succeeded.

Hard to reproduce and provide more info, but I'll try another 25 runs with debug enabled, see if something pops up.

adrianovieira commented 4 years ago

I also enabled debug on our CI.

adrianovieira commented 4 years ago

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

adrianovieira commented 4 years ago

And again and back to back error...

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

jennifer-shehane commented 4 years ago

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

muhroots commented 4 years ago

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

it worked here (cypress run --browser chrome). I'm using github actions. thank you <3

eladcandroid commented 4 years ago

@jennifer-shehane Can you check if bumping up the Electron deps versions fixes this issue?

melibe23 commented 4 years ago

Same issue here using headleass The Test Runner unexpectedly exited via a exit event with signal SIGSEGV

Platform: darwin (19.2.0) Cypress Version: 4.3.0

barnabas-szekeres commented 4 years ago

The issue came up right after when we upgrade from 4.1 to 4.2 and only when we run test via Electron.

The Test Runner unexpectedly exited via a exit event with signal SIGSEGV

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: darwin (19.4.0)
Cypress Version: 4.2.0

Maybe the issue connected to the updated Electron deps what's mentioned by @eladcandroid also! :)

daraclare commented 4 years ago

I have a very similar issue after upgrading from 3.8 to 4.5, my runs always fail, but on different tests each time, with the error "The Test Runner unexpectedly exited via a exit event with signal SIGSEGV"

barnabas-szekeres commented 4 years ago

The latest release (4.5) contains Electron deps update which solved the issue for us.

Ps.: Our test coverage currently very small so maybe the problem exist yet.

laiscoolblue commented 4 years ago

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

skyred commented 4 years ago

4.8.0 has this problem on hello world type of test, here is how to reproduce it:

On Linux,

  1. make an empty folder temp
  2. cd temp
  3. docker run -it --rm --privileged -v $PWD:/e2e -v /tmp/.X11-unix:/tmp/.X11-unix -w /e2e -e DISPLAY=unix$DISPLAY --entrypoint cypress cypress/included:4.8.0 open --project .
  4. cypress will fill the folder with example tests, click any of them, you will see Chrome or Electron crashing with the same error code.
oneumyvakin commented 4 years ago

We have got this error

../../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

Is it possible that this issue caused by lack of resources like free memory?

zenefits-brody commented 4 years ago

Sharing my error message here and will try the workaround posted above by Jennifer.

    ✔  All specs passed!                        00:09        1        1        -        -        -  

/root/.cache/Cypress/4.1.0/Cypress/Cypress[5055]: ../../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 (Ubuntu Linux - 18.04)
Cypress Version: 4.1.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

exited with code 1
jarretmoses commented 4 years ago

Since this is still open Ill post my specs too. I just started running into this issue using the Cypress Github action. The workaround above mentions its potentially due to memory issues in electron and to use chrome but I am already using chrome



[6117:0x72400000000]   298749 ms: Mark-sweep (reduce) 2046.8 (2050.9) -> 2046.0 (2054.2) MB, 2607.8 / 0.0 ms  (average mu = 0.083, current mu = 0.010) allocation failure scavenge might not succeed
[6117:0x72400000000]   301384 ms: Mark-sweep (reduce) 2047.0 (2051.2) -> 2046.3 (2052.4) MB, 2627.8 / 0.0 ms  (+ 0.0 ms in 16 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 2635 ms) (average mu = 0.044, current mu = 0.0

<--- JS stacktrace --->

Error: The Test Runner unexpectedly exited via a exit event with signal SIGSEGV
Error: The Test Runner unexpectedly exited via a exit event with signal SIGSEGV

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 (Ubuntu - 16.04)
Cypress Version: 5.4.0
    at /home/runner/work/web/web/node_modules/cypress/lib/errors.js:346:15
    at tryCatcher (/home/runner/work/web/web/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:729:18)
    at Promise._fulfill (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:673:18)
    at Promise._resolveCallback (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:466:57)
    at Promise._settlePromiseFromHandler (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:559:17)
    at Promise._settlePromise (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:729:18)
    at Promise._fulfill (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:673:18)
    at Promise._resolveCallback (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:466:57)
    at Promise._settlePromiseFromHandler (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:559:17)
    at Promise._settlePromise (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:604:18) {
  known: true
}```
lasanders commented 4 years ago

This just started happening for us after upgrading to 5.5. I also tried passing the --browser flag with chrome, but didn't fix the issue. Any other workarounds for this?

    ✔  All specs passed!                        07:12      211      199        -       12        -  

/root/.cache/Cypress/5.5.0/Cypress/Cypress[609]: ../../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 close 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 (Amazon Linux - 2 (Karoo))
Cypress Version: 5.5.0
error Command failed with exit code 1.

Exited with code exit status 1
CircleCI received exit code 1
ikornienko commented 4 years ago

We see exactly the same error as @lasanders above, and also after an attempt of upgrading to 5.5.0.

dudeNumber4 commented 3 years ago

Upgraded to cypress 6.0.1, using Gitlab 13.5.1-ee. Still happens.

ray1618 commented 3 years ago

Same issue after upgrading to Cypress 6.1.0 The Test Runner unexpectedly exited via a close event with signal SIGABRT

Running on a azure build pipeline (ubuntu latest) it throws this error after successfully finishing all specs.

Seems to depend on the tests that are running, because some projects wil run fine after the update with the same Azure build setup.

Running it localy on my Window 10 doesn't give any errors Rolling back to cypress 5.6.0 makes the error disapear.

System: Node 10.23.0 Ubuntu Linux build agent on Azure

jennifer-shehane commented 3 years ago

Going to close this as a duplicate of https://github.com/cypress-io/cypress/issues/8865 - which has some more updated logs. Some people there are indicating that the SIGABRT error with text "Assertion `(env) != nullptr' failed" began happening in Cypress 5.4.0. Please refer to that issue if you're still experiencing this issue.

If you're encountering a SIGSEGV error - this is not the same as SIGABRT. Search our issues for something related to SIGSEGV errors.

Duplicate of https://github.com/cypress-io/cypress/issues/8865