'Cypress Test Runner unexpectedly exited via a exit event with signal SIGSEGV in circleCI


I am stuck in this problem. I am running cypress tests. When I run locally, it runs smoothly. when I run in circleCI, it throws error after some execution.
Here is what i am getting:

[334:1020/170552.614728:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[334:1020/170552.616006:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[334:1020/170552.616185:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[521:1020/170552.652819:ERROR:gpu_init.cc(441)] Passthrough is not supported, GL is swiftshader

Current behavior:
When I run my specs headless on the circleCI, Cypress closed unexpectedly with a socket error.

Error code:

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

Please search Cypress documentation for possible solutions:

https://on.cypress.io


Platform: linux (Debian - 10.5)
Cypress Version: 8.6.0



Solution 1:[1]

I had this same issue on within our Azure builds as well. We only recently migrated from Cypress 8.4.0. Going back to that has solved the problem.

Solution 2:[2]

downgrade the cypress by running npm install [email protected]

Solution 3:[3]

Downgrade of cypress to 8.3.0 worked for me to solve that, you dont need to go to previous versions.

npm install [email protected]

Solution 4:[4]

SIGSEGV means a segmentation fault error. Read all about it here.

"In practice, a segfault occurs when your program breaks some fundamental rule set by the operating system. In that case, the operating system sends your process a signal (SIGSEGV on Mac & Linux, STATUS_ACCESS_VIOLATION on Windows), and typically the process shuts down immediately."

This blog post also goes into detail about how this can occur, even if you don't directly interact with the operating system (since we're writing JavaScript). Please read it on the original author's site for context.

But in short - you are likely encountering this error because

a. you upgraded Cypress while on an old version of NodeJS, or

b. you upgraded NodeJS, while you have Cypress code that is directly or indirectly incompatible (this could be your own code, or one of its dependencies) with that NodeJS version

Since SIGSEGV is a complete shutdown, you have no stack trace or debug information to guide you. So you have to debug the old fashioned way, turning tests and/or dependencies on or off to locate the problem in your code.

Solution 5:[5]

To ensure this question has an answer, refer to Dirk Deyne's comment above. I simply needed to set a default value in my library like so:

@Value("${proxyServerHost:default_value}")

Thanks again Dirk Deyne! That fixed it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rylan VW
Solution 2 JohnPix
Solution 3 Denis
Solution 4 Jakob Jan Kamminga
Solution 5 Logan Snyder