cypress
cypress copied to clipboard
Alpine Linux support
I don't know if this is even possible but I was wondering if there are any plans to support Alpine Linux.
I don't know if it's helpful but here's an ldd on the Cypress executable from within Alpine:
root@6b425a4f775a[~/.cypress/Cypress] $ ldd ./Cypress
/lib64/ld-linux-x86-64.so.2 (0x5603ddf7c000)
libnode.so => ./libnode.so (0x7f37b4b22000)
libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x5603ddf7c000)
libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x7f37b4557000)
libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x7f37b42b5000)
libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x7f37b4092000)
libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x7f37b3d29000)
libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x7f37b3b1d000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x7f37b3900000)
libcairo.so.2 => /usr/lib/libcairo.so.2 (0x7f37b361b000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x7f37b33d8000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x7f37b3133000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x7f37b2ef7000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x7f37b2cb7000)
libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0x7f37b2a71000)
libXi.so.6 => /usr/lib/libXi.so.6 (0x7f37b2862000)
libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x7f37b2658000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x7f37b2455000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x7f37b224b000)
libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0x7f37b2048000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x7f37b1e38000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x7f37b1c32000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x7f37b1a28000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x7f37b1705000)
libXtst.so.6 => /usr/lib/libXtst.so.6 (0x7f37b14ff000)
libXss.so.1 => /usr/lib/libXss.so.1 (0x7f37b12fc000)
libgconf-2.so.4 => /usr/lib/libgconf-2.so.4 (0x7f37b10c4000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x7f37b0ec0000)
librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x5603ddf7c000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x7f37b0bd1000)
libnss3.so => /usr/lib/libnss3.so (0x7f37b08a8000)
libnssutil3.so => /usr/lib/libnssutil3.so (0x7f37b067a000)
libsmime3.so => /usr/lib/libsmime3.so (0x7f37b0453000)
libnspr4.so => /usr/lib/libnspr4.so (0x7f37b0214000)
libffmpeg.so => ./libffmpeg.so (0x7f37afe3d000)
libasound.so.2 => /usr/lib/libasound.so.2 (0x7f37afb4b000)
libcups.so.2 => /usr/lib/libcups.so.2 (0x7f37af8d3000)
libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x5603ddf7c000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x7f37af6b3000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7f37af362000)
libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x5603ddf7c000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f37af150000)
libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x5603ddf7c000)
ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x7f37aeec3000)
libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x7f37aecaf000)
libintl.so.8 => /usr/lib/libintl.so.8 (0x7f37aeaa1000)
libz.so.1 => /lib/libz.so.1 (0x7f37ae88b000)
libmount.so.1 => /lib/libmount.so.1 (0x7f37ae64a000)
libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x7f37ae3ba000)
libpng16.so.16 => /usr/lib/libpng16.so.16 (0x7f37ae18d000)
libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x7f37adf89000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x7f37add63000)
libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x7f37adb55000)
libbz2.so.1 => /usr/lib/libbz2.so.1 (0x7f37ad948000)
libffi.so.6 => /usr/lib/libffi.so.6 (0x7f37ad740000)
libORBit-2.so.0 => /usr/lib/libORBit-2.so.0 (0x7f37ad4d9000)
libpcre.so.1 => /usr/lib/libpcre.so.1 (0x7f37ad27d000)
libplc4.so => /usr/lib/libplc4.so (0x7f37ad078000)
libplds4.so => /usr/lib/libplds4.so (0x7f37ace74000)
libgnutls.so.30 => /usr/lib/libgnutls.so.30 (0x7f37acb60000)
libavahi-common.so.3 => /usr/lib/libavahi-common.so.3 (0x7f37ac954000)
libavahi-client.so.3 => /usr/lib/libavahi-client.so.3 (0x7f37ac745000)
libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x7f37ac4f7000)
libblkid.so.1 => /lib/libblkid.so.1 (0x7f37ac2bc000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x7f37ac0b9000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x7f37abeb3000)
libp11-kit.so.0 => /usr/lib/libp11-kit.so.0 (0x7f37abc57000)
libtasn1.so.6 => /usr/lib/libtasn1.so.6 (0x7f37aba47000)
libnettle.so.6 => /usr/lib/libnettle.so.6 (0x7f37ab813000)
libhogweed.so.4 => /usr/lib/libhogweed.so.4 (0x7f37ab5e0000)
libgmp.so.10 => /usr/lib/libgmp.so.10 (0x7f37ab37c000)
libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x7f37ab15c000)
libuuid.so.1 => /lib/libuuid.so.1 (0x7f37aaf58000)
Error relocating ./libnode.so: __isinf: symbol not found
Error relocating ./libnode.so: __rawmemchr: symbol not found
Error relocating ./libnode.so: __isnan: symbol not found
Error relocating ./libnode.so: backtrace: symbol not found
Error relocating ./libffmpeg.so: __isnan: symbol not found
Error relocating ./libffmpeg.so: __isinf: symbol not found
Error relocating ./Cypress: __sbrk: symbol not found
Error relocating ./Cypress: __isnan: symbol not found
Error relocating ./Cypress: __res_ninit: symbol not found
Error relocating ./Cypress: __finite: symbol not found
Error relocating ./Cypress: backtrace: symbol not found
Error relocating ./Cypress: __isinf: symbol not found
Error relocating ./Cypress: backtrace_symbols: symbol not found
Error relocating ./Cypress: getcontext: symbol not found
Error relocating ./Cypress: __res_nclose: symbol not found
Error relocating ./Cypress: __cmsg_nxthdr: symbol not found
Error relocating ./Cypress: __libc_stack_end: symbol not found
I had the same issue... Yeah, it looks like Cypress needs to be built against musl libc instead of glibc. I guess we would need to wait for a new build.
This likely has to do with electron and not necessarily Cypress.
It may be easier opening an issue over there https://github.com/electron/electron/issues and ask about what it will take to build Chromium against Alpine.
It may already be possible, so any direction here would be helpful and we can look at adding a new dist when we release.
This is a year old. -_-
Also would like this
I spent some time looking into this yesterday, and could not get all the required libraries work on Alpine. If anyone can actually build Electron on Alpine Linux, then we could potentially setup a CI chain that builds Alpine-specific Cypress version, but I expect the demand to be pretty low
I am going to close this for now, because Electron itself has their Alpine Linux build issue open https://github.com/electron/electron/issues/2727 (opened in 2015). If that issue is resolved successfully, we can revisit Alpine Linux support.
It appears that Electron 3 no longer depends on gconf. Could this issue be reopened?
It's been two years. Any way to support cypress work with alpine linux?
This issue will be covered as part of our 4.0 release - which includes upgrading Electron.
Hello,
Any news about this issue? I've just started setting up my CI/CD pipeline and since we're using node:alpine for our Dockerfile, I'm also using it for Gitlab CI, which has led me right here ;-)
Hello,
Any news about this issue? I've just started setting up my CI/CD pipeline and since we're using node:alpine for our Dockerfile, I'm also using it for Gitlab CI, which has led me right here ;-)
maybe you can try frolvlad/alpine-glibc image
@dsebastien A lot of us are waiting for this still. As a workaround I only run tests using cypress in the cypress node image and everything else in alpine images. I'll just swap the cypress node image afterwards with the appropriate image later.
Hi guys, I tried installing cypress via npm on alpine linux and ended up with:

I got the /usr/lib/libasound.so.2 from:
- RUN apk add --no-cache alsa-lib
- RUN apk add --no-cache alsa-lib-dev (header files)
My first run was with alpine:3.10 but that did not get me anywhere. So I used this image: frolvlad/alpine-glibc:alpine-3.9_glibc-2.29
Would it be an option to clone the git repo and just completely build Cypress against musl or is the problem with my libasound 2 library?
Tried building on alpine linux and can confirm that my main problem is this error:
/usr/lib/libasound.so.2: no version information available (required by /home/root/cypress/build/linux/Cypress/Cypress)

Quote: Chris => The "no version information available" means that the library version number is lower on the shared object. For example, if your major.minor.patch number is 7.15.5 on the machine where you build the binary, and the major.minor.patch number is 7.12.1 on the installation machine, ld will print the warning.
Alsa-libs APKBUILD for alpine contains this statement: --without-versioned and thus it might cause 'no version information available' error. But that is just an hypothesis.
Anybody got an idea to resolve this issue?
UPDATE:
I manually build alsa-lib to fix the version error with shared library /usr/lib/libasound.so.2 . Building without the --without-versioned solved the problem.
Unfortunately the following error still appears and make the build fail: Relink `/usr/lib/libgmp.so.10' with `/usr/glibc-compat/lib/libc.so.6' for IFUNC symbol `memset'

Installing thealsa-lib package (alpine 3.10) I didn't have any ALSA issue
I have installed the following packages using apk:
- chromium
- xvfb
- gtk+3.0-dev
- libnotify
- gconf
- nss
- libxscrnsaver
- alsa-lib
- xkbcomp
glibc-2.30-r0.apk(downloaded from sgerrand/alpine-pkg-glibc)
ℹ️Command cypress verify fail when it comes to load libgobject-2.0.so.0
ℹ️Other mislinked libraries (found with ldd)
__isnan: symbol not found__isinf: symbol not foundstrtoll_l: symbol not foundstrtoull_l: symbol not found__sbrk: symbol not found__res_nclose: symbol not found__res_ninit: symbol not found__vsnprintf_chk: symbol not found__isnanf: symbol not found__isnan: symbol not found__isinf: symbol not found__longjmp_chk: symbol not foundstrtoll_l: symbol not foundstrtoull_l: symbol not found__fdelt_chk: symbol not foundbacktrace: symbol not found__strncat_chk: symbol not found__fprintf_chk: symbol not found__sprintf_chk: symbol not foundinitstate_r: symbol not foundrandom_r: symbol not found__strcat_chk: symbol not found__isinff: symbol not found__vfprintf_chk: symbol not found__snprintf_chk: symbol not foundgnu_get_libc_version: symbol not found__register_atfork: symbol not found__longjmp_chk: symbol not found
This is as far as I could get with Alpine 3.10 and Cypress (base image being php:7.3.8-fpm-alpine3.10 )
Hello,
Any news about this issue? I've just started setting up my CI/CD pipeline and since we're using node:alpine for our Dockerfile, I'm also using it for Gitlab CI, which has led me right here ;-)
Xvfb package enables you to run graphical applications without a display (e.g., browser tests on a CI server) so cypress needs xvfb package to be installed.
It is not going to work on node:alpine image as the xvfb package is not present.
Running on markadams/chromium-xvfb-js docker image fixed the issue for me.
Hello, Any news about this issue? I've just started setting up my CI/CD pipeline and since we're using node:alpine for our Dockerfile, I'm also using it for Gitlab CI, which has led me right here ;-)
Xvfb package enables you to run graphical applications without a display (e.g., browser tests on a CI server) so cypress needs xvfb package to be installed.
It is not going to work on node:alpine image as the xvfb package is not present.
Running on markadams/chromium-xvfb-js docker image fixed the issue for me.
@Prabhakar-17 markadams/chromium-xvfb-js is not based on alpine
@ffxluca
Installing the
alsa-libpackage (alpine 3.10) I didn't have any ALSA issue
I never said I had an issue installing the library on alpine. It is the libasound driver that is packaged in alsa-lib that gave me the error about versioning. Which in return was solved by packaging it myself.
This is as far as I could get with Alpine 3.10 and Cypress (base image being php:7.3.8-fpm-alpine3.10 )
As you can see in my post I am compiling Cypress with glibc. Not pulling it from some php based base image.
Is this resolved? Previously it was believed that the issue was dependent on an Electron upgrade. We've upgraded Electron close to its most recent version now. Can anywhere verify?
I tried playing with Cypress in the alpine:latest Docker image (docker run --entrypoint sh -it alpine:latest), and ran into issues with permissions when installing as root.
I got further installing as a regular user, but even after that, Alpine seems to have some issue with the Cypress binary. The cli fails to launch the binary with an ENOENT error, and you can't even launch it manually, even though it certifiably exists:
~ $ ls -al ./.cache/Cypress/4.8.0/Cypress/Cypress
-rwxr-xr-x 1 foo foo 116418440 Jun 10 13:38 ./.cache/Cypress/4.8.0/Cypress/Cypress
~ $ ./.cache/Cypress/4.8.0/Cypress/Cypress
ash: ./.cache/Cypress/4.8.0/Cypress/Cypress: not found
Maybe someone who knows more about Alpine knows more about why this is happening.
EDIT: The same issue occurs when installing & trying to run vanilla Electron, so it does not appear to be a Cy-specific issue.
This issue still seems to exist even after Electron 9.0.5.
Yeah I recently tried to get cypress running on alpine 3.12, with no luck. I was able to get all dependencies with the exception of gconf, which electron still seems to rely on
Is this resolved? Previously it was believed that the issue was dependent on an Electron upgrade. We've upgraded Electron close to its most recent version now. Can anywhere verify?
@jennifer-shehane Actually I'm not sure where the idea came from that it has something to do with gconf. In the original post I see no:
Error loading shared library libgconf-2.so.4: No such file or directory (needed by /root/.cache/Cypress/3.4.1/Cypress/Cypress)
What I see is:
https://gist.github.com/x-yuri/c96dd195e8293f292de824aba203ab3e
which supposedly means that Electron was built against glibc, and that is the reason it doesn't start.
I understand Cypress comes with a custom version of Electron? Why? How can I build one?
I understand Cypress comes with a custom version of Electron? Why? How can I build one?
@x-yuri Cypress uses the Electron binaries that get installed with electron from the NPM registry. You can actually reproduce this issue using the Electron binaries directly, without Cypress, see my comment: https://github.com/cypress-io/cypress/issues/419#issuecomment-642017901 It seems to be a generic issue with running Electron in Alpine.
Indeed, the issue can be reproduced w/o cypress. And they don't seem to want to support it:
In order for this to happen someone would need to confirm that Chromium, Node, et al will run correctly on it and to add support for it in all the affected build scripts, so I don't think it's likely this will be on the project's supported roadmap.
However MUSL-libc does indeed look cool. If a volunteer wrote the code to make this happen, I suspect the project would accept the code as an unsupported feature.
Apr 15, 2018
https://github.com/electron/electron/issues/12610#issuecomment-381412186
I'm closing this for now because we don't plan to support musl officially. I'm happy to offer what help I can, though!
Sep 12, 2018
https://github.com/electron/electron/issues/9662#issuecomment-420480342
And there's at least one person who succeeded in those threads.
Hi all. Can someone offer the latest update on whether or not there is currently support for latest Alpine Linux? Any progress?
I just stumbled upon this annoying issue and found the dependencies listed on Cypress' website, but could not find equivalent packages like this person: https://gitlab.com/gitterHQ/webapp/-/merge_requests/1852 so I tried the following:
sudo apk add libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev lib
gconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
ERROR: unable to select packages:
libasound2 (no such package):
required by: world[libasound2]
libgbm-dev (no such package):
required by: world[libgbm-dev]
libgconf-2-4 (no such package):
required by: world[libgconf-2-4]
libgtk-3-0 (no such package):
required by: world[libgtk-3-0]
libgtk2.0-0 (no such package):
required by: world[libgtk2.0-0]
libnss3 (no such package):
required by: world[libnss3]
libxss1 (no such package):
required by: world[libxss1]
libxtst6 (no such package):
required by: world[libxtst6]
Then I searched and found what I think might be suitable replacements:
sudo apk add xauth xvfb libxtst alsa-lib-dev libxscrnsaver nss l
ibnotify-dev mesa-gbm gtk+3.0 gtk+2.0
sudo apk add gconf --repository=http://dl-cdn.alpinelinux.org/alpine/
v3.8/main
To no avail:
yarn cy:open
yarn run v1.22.10
$ cypress open
It looks like this is your first time using Cypress: 6.3.0
✖ Verifying Cypress can run /home/alb/.cache/Cypress/6.3.0/Cypress
→ Cypress Version: 6.3.0
Cypress failed to start.
This is usually caused by a missing library or dependency.
The error below should indicate which dependency is missing.
https://on.cypress.io/required-dependencies
If you are using Docker, we provide containers with all required dependencies installed.
----------
Command failed with ENOENT: /home/alb/.cache/Cypress/6.3.0/Cypress/Cypress --no-sandbox --smoke-test --ping=980
spawn /home/alb/.cache/Cypress/6.3.0/Cypress/Cypress ENOENT
----------
Platform: linux (Alpine Linux - 3.13.0)
Cypress Version: 6.3.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
This is not very verbose ^ where is the log file?
@F1r3Hydr4nt https://docs.cypress.io/guides/references/troubleshooting.html#Print-DEBUG-logs