I am trying to run Cypress in a Docker container on my M1 Pro system, but I encounter an error indicating that Cypress failed to start. The error message suggests that this may be due to a missing library or dependency. Here are the details of the error:
docker run --rm -e BASE_URL=http://host.docker.internal:3000/ -v $PWD:/e2e -w /e2e cypress/included:13.11.0
Error Message
[STARTED] Task without title.
[FAILED] Cypress failed to start.
[FAILED]
[FAILED] This may be due to a missing library or dependency. https://on.cypress.io/required-dependencies
[FAILED]
[FAILED] Please refer to the error below for more details.
[FAILED]
[FAILED] ----------
[FAILED]
[FAILED] [13:0614/074836.944798:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[FAILED]
[FAILED] <--- Last few GCs --->
[FAILED]
[FAILED] [13:0x2c001a4000] 52 ms: Mark-Compact (reduce) 0.6 (1.9) -> 0.6 (1.4) MB, 0.58 / 0.00 ms (average mu = 0.242, current mu = 0.051) last resort; GC in old space requested
[FAILED] [13:0x2c001a4000] 53 ms: Mark-Compact (reduce) 0.6 (1.4) -> 0.6 (1.4) MB, 0.64 / 0.00 ms (average mu = 0.141, current mu = 0.021) last resort; GC in old space requested
[FAILED]
[FAILED]
[FAILED] <--- JS stacktrace --->
[FAILED]
[FAILED]
[FAILED] #
[FAILED] # Fatal JavaScript out of memory: CALL_AND_RETRY_LAST
[FAILED] #
[FAILED]
[FAILED] ----------
[FAILED]
[FAILED] Platform: linux-arm64 (Debian - 12.5)
[FAILED] Cypress Version: 13.11.0
Cypress failed to start.
This may be due to a missing library or dependency. https://on.cypress.io/required-dependencies
Please refer to the error below for more details.
----------
[13:0614/074836.944798:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
<--- Last few GCs --->
[13:0x2c001a4000] 52 ms: Mark-Compact (reduce) 0.6 (1.9) -> 0.6 (1.4) MB, 0.58 / 0.00 ms (average mu = 0.242, current mu = 0.051) last resort; GC in old space requested
[13:0x2c001a4000] 53 ms: Mark-Compact (reduce) 0.6 (1.4) -> 0.6 (1.4) MB, 0.64 / 0.00 ms (average mu = 0.141, current mu = 0.021) last resort; GC in old space requested
<--- JS stacktrace --->
#
# Fatal JavaScript out of memory: CALL_AND_RETRY_LAST
#
----------
Platform: linux-arm64 (Debian - 12.5)
Cypress Version: 13.11.0
How can I resolve the missing dbus dependency issue and get Cypress running in Docker ?