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

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

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 24
  • Comments: 73 (12 by maintainers)

Most upvoted comments

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!

Bug still exists in 5.5.0

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

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

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

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

Changing the command: cypress run to: cypress run -b chrome (change from electron to chrome) solved my problem

Faced the same issue. Like others mentioned above, unsetting/removing DISPLAY environment variable fixes the issue. It looks like it only works when cypress open is running. I may be wrong.

Does not happen to me anymore after upgrading to 6.5.0

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.

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.

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

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

in v6.0.0 for me still occurs 😦

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

I guess it was the electron upgrade.

Just upgraded to Cypress 5.6.0 and experienced the same issue

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 😦

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

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

Please search Cypress documentation for possible solutions:

https://on.cypress.io

I did that beforehand (obviously) and there is nothing there.

Check if there is a GitHub issue describing this crash:

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

Consider opening a new issue.

Why should I, here is an issue perfectly describing the problem I have, so I checked (and found an issue). Your answer does not help at all unfortunately.

Unsetting DISPLAY in docker-compose.yml did the trick for me as well

Hi, I am getting the error Cypress quit unexpectedly on my Mac OS(v12.1) and in terminal I read The Test Runner unexpectedly exited via an exit event with signal SIGABRT when I close the Cypress (open mode) runner window every time. I was in Cypress v8.3.1 and was not getting the error. It started appearing after upgrading to v9.3.1. Its independent of browsers, because it appears not at the end of a test run, but when the cypress is closed.

Platform: darwin-x64 (21.2.0) Cypress Version: 9.3.1 Node version: 14.17.3

I experienced this issue when running a docker container with the following configuration

test:
    image: cypress/included:7.7.0
    container_name: boilerplate_test_1
    depends_on:
      - ui
    environment:
      - DISPLAY
      # pass base url to test pointing at the web application
      - CYPRESS_baseUrl=http://boilerplate_ui_1:3000
    # share the current folder as volume to avoid copying
    working_dir: /e2e
    volumes:
      - ./:/e2e
      - /tmp/.X11-unix:/tmp/.X11-unix
      - ./web/ssl:/etc/nginx/ssl

However, on my local machine I had not run xhost local:root. Once I ran that, I stopped getting the message in this thread. Maybe a display forwarding issue?

It’s also occuring in version 6.3.0 running in chrome browser and not uploading/downloading any file Running multiple parallel spec files on Jenkins in a Pod with 4000m cpu and 8Gi of memory

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

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

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.

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