Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpine Linux support #419

Open
cdaguerre opened this issue Feb 9, 2017 · 52 comments
Open

Alpine Linux support #419

cdaguerre opened this issue Feb 9, 2017 · 52 comments
Labels
browser: electron OS: linux pkg/electron This is due to an issue in the packages/electron directory prevent-stale mark an issue so it is ignored by stale[bot] stage: ready for work The issue is reproducible and in scope type: feature New feature that does not currently exist

Comments

@cdaguerre
Copy link

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
@wavesoft
Copy link

wavesoft commented Mar 16, 2017

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.

@brian-mann
Copy link
Member

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.

@jwalton
Copy link

jwalton commented Feb 3, 2018

This is a year old. -_-

@tomatau
Copy link

tomatau commented Feb 16, 2018

Also would like this

@bahmutov
Copy link
Contributor

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

@bahmutov
Copy link
Contributor

I am going to close this for now, because Electron itself has their Alpine Linux build issue open electron/electron#2727 (opened in 2015). If that issue is resolved successfully, we can revisit Alpine Linux support.

@simondiep
Copy link

It appears that Electron 3 no longer depends on gconf. Could this issue be reopened?

@rohmanhm
Copy link

It's been two years.
Any way to support cypress work with alpine linux?

@jennifer-shehane
Copy link
Member

This issue will be covered as part of our 4.0 release - which includes upgrading Electron.

@cypress-bot cypress-bot bot added stage: ready for work The issue is reproducible and in scope and removed stage: awaiting external fix A 3rd party bug in Cypress - awaiting release labels Feb 21, 2019
@jennifer-shehane jennifer-shehane added pkg/electron This is due to an issue in the packages/electron directory browser: electron labels Feb 21, 2019
@dsebastien
Copy link

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 ;-)

@502647092
Copy link

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

@basickarl
Copy link

basickarl commented Jul 23, 2019

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

@kwuite
Copy link

kwuite commented Nov 4, 2019

Hi guys, I tried installing cypress via npm on alpine linux and ended up with:

image

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?

@kwuite
Copy link

kwuite commented Nov 4, 2019

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)

image

StackOverflow answer

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?

@kwuite
Copy link

kwuite commented Nov 4, 2019

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'

image

@ffxluca
Copy link

ffxluca commented Nov 17, 2019

Installing thealsa-lib package (alpine 3.10) I didn't have any ALSA issue

@ffxluca
Copy link

ffxluca commented Nov 18, 2019

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 found
  • strtoll_l: symbol not found
  • strtoull_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 found
  • strtoll_l: symbol not found
  • strtoull_l: symbol not found
  • __fdelt_chk: symbol not found
  • backtrace: symbol not found
  • __strncat_chk: symbol not found
  • __fprintf_chk: symbol not found
  • __sprintf_chk: symbol not found
  • initstate_r: symbol not found
  • random_r: symbol not found
  • __strcat_chk: symbol not found
  • __isinff: symbol not found
  • __vfprintf_chk: symbol not found
  • __snprintf_chk: symbol not found
  • gnu_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 )

@mishra-prabhakar
Copy link

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.

@F1r3Hydr4nt
Copy link

@x-yuri Thank you, here is the output, it does not mention any specific missing dependency as far as I can see:

export DEBUG=cypress:*
hostname:~/Work/base$ yarn cypress open
yarn run v1.22.10
$ /home/Work/base/node_modules/.bin/cypress open
  cypress:cli:cli cli starts with arguments ["/usr/bin/node","/home/Work/base/node_modules/.bin/cypress","open"] +0ms
  cypress:cli NODE_OPTIONS is not set +0ms
  cypress:cli:cli program parsing arguments +3ms
  cypress:cli:cli opening Cypress +1ms
  cypress:cli parsed cli options {} +160ms
  cypress:cli opening from options {"project":"/home/Work/base"} +0ms
  cypress:cli command line arguments ["--project","/home/Work/base"] +0ms
  cypress:cli verifying Cypress app +0ms
  cypress:cli checking environment variables +2ms
  cypress:cli checking if executable exists /home/.cache/Cypress/6.3.0/Cypress/Cypress +5ms
  cypress:cli Binary is executable? : true +13ms
  cypress:cli binaryDir is  /home/.cache/Cypress/6.3.0/Cypress +1ms
  cypress:cli Reading binary package.json from: /home/.cache/Cypress/6.3.0/Cypress/resources/app/package.json +0ms
  cypress:cli Found binary version 6.3.0 installed in: /home/.cache/Cypress/6.3.0/Cypress +14ms
  cypress:cli could not read binary_state.json file at "/home/.cache/Cypress/6.3.0/binary_state.json" +19ms
  cypress:cli {} +0ms
  cypress:cli is Verified ? undefined +5ms
  cypress:cli running binary verification check 6.3.0 +0ms
It looks like this is your first time using Cypress: 6.3.0

  cypress:cli clearing out the verified version +5ms
  cypress:cli DISPLAY environment variable is set to :0.0 on Linux
  cypress:cli Assuming this DISPLAY points at working X11 server,
  cypress:cli Cypress will not spawn own Xvfb
  cypress:cli 
  cypress:cli NOTE: if the X11 server is NOT working, Cypress will exit without explanation,
  cypress:cli   see https://github.com/cypress-io/cypress/issues/4034
  cypress:cli Solution: Unset the DISPLAY variable and try again:
  cypress:cli   DISPLAY= npx cypress run ... +0ms
  cypress:cli needs Xvfb? false +4ms
  cypress:cli spawning, should retry on display problem? true +0ms
  cypress:cli disabling Electron sandbox +1ms
  **cypress:cli running smoke test +0ms
  cypress:cli using Cypress executable /home/.cache/Cypress/6.3.0/Cypress/Cypress +0ms
  cypress:cli smoke test command: /home/.cache/Cypress/6.3.0/Cypress/Cypress --no-sandbox --smoke-test --ping=452 +0ms
  cypress:cli smoke test timeout 30000 ms +0ms
  cypress:cli Smoke test failed: Error: Command failed with ENOENT:** /home/.cache/Cypress/6.3.0/Cypress/Cypress --no-sandbox --smoke-test --ping=452
spawn /home/.cache/Cypress/6.3.0/Cypress/Cypress ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /home/.cache/Cypress/6.3.0/Cypress/Cypress',
  path: '/home/.cache/Cypress/6.3.0/Cypress/Cypress',
  spawnargs: [ '--no-sandbox', '--smoke-test', '--ping=452' ],
  originalMessage: 'spawn /home/.cache/Cypress/6.3.0/Cypress/Cypress ENOENT',
  shortMessage: 'Command failed with ENOENT: /home/.cache/Cypress/6.3.0/Cypress/Cypress --no-sandbox --smoke-test --ping=452\n' +
    'spawn /home/.cache/Cypress/6.3.0/Cypress/Cypress ENOENT',
  command: '/home/.cache/Cypress/6.3.0/Cypress/Cypress --no-sandbox --smoke-test --ping=452',
  exitCode: undefined,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: '',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
} +24ms
  cypress:cli error message: Command failed with ENOENT: /home/.cache/Cypress/6.3.0/Cypress/Cypress --no-sandbox --smoke-test --ping=452
spawn /home/.cache/Cypress/6.3.0/Cypress/Cypress ENOENT +2ms
  ✖  Verifying Cypress can run /home/.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/.cache/Cypress/6.3.0/Cypress/Cypress --no-sandbox --smoke-test --ping=452
spawn /home/.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.

Maybe this will help, not sure what the 'smoketest' is about

@x-yuri
Copy link

x-yuri commented Jan 26, 2021

This will unlikely help. Does /home/.cache/Cypress/6.3.0/Cypress/Cypress exist? What ldd /home/.cache/Cypress/6.3.0/Cypress/Cypress says?

@F1r3Hydr4nt
Copy link

ldd /home/.cache/Cypress/6.3.0/Cypress/Cypres
s
	/lib64/ld-linux-x86-64.so.2 (0x7f551963e000)
	libffmpeg.so => /home/.cache/Cypress/6.3.0/Cypress/libffmpeg.so (0x7f551108e000)
	libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7f551963e000)
	libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f551963e000)
	librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x7f551963e000)
	libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x7f5511043000)
	libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x7f5510f3c000)
	libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x7f5510d93000)
	libnss3.so => /usr/lib/libnss3.so (0x7f5510c87000)
	libnssutil3.so => /usr/lib/libnssutil3.so (0x7f5510c58000)
	libsmime3.so => /usr/lib/libsmime3.so (0x7f5510c32000)
	libnspr4.so => /usr/lib/libnspr4.so (0x7f5510bef000)
	libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x7f5510bc8000)
	libatk-bridge-2.0.so.0 => /usr/lib/libatk-bridge-2.0.so.0 (0x7f5510b94000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0x7f5510a72000)
	libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0x7f5510a6d000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0x7f5510a46000)
	libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0x7f55109fc000)
	libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x7f55109da000)
	libgtk-3.so.0 => /usr/lib/libgtk-3.so.0 (0x7f5510282000)
	libgdk-3.so.0 => /usr/lib/libgdk-3.so.0 (0x7f5510197000)
	libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x7f5510187000)
	libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x7f5510141000)
	libcairo.so.2 => /usr/lib/libcairo.so.2 (0x7f5510052000)
	libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f551963e000)
	libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0x7f551004d000)
	libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x7f5510048000)
	libXext.so.6 => /usr/lib/libXext.so.6 (0x7f5510035000)
	libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x7f551002d000)
	libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x7f5510021000)
	libexpat.so.1 => /usr/lib/libexpat.so.1 (0x7f550fffe000)
	libdrm.so.2 => /usr/lib/libdrm.so.2 (0x7f550ffec000)
	libxkbcommon.so.0 => /usr/lib/libxkbcommon.so.0 (0x7f550ffaf000)
	libgbm.so.1 => /usr/lib/libgbm.so.1 (0x7f550ffa0000)
	libasound.so.2 => /usr/lib/libasound.so.2 (0x7f550fed9000)
	libcups.so.2 => /usr/lib/libcups.so.2 (0x7f550fe52000)
	libatspi.so.0 => /usr/lib/libatspi.so.0 (0x7f550fe1f000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f550fe05000)
	libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f551963e000)
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /home/.cache/Cypress/6.3.0/Cypress/Cypress)
	libffi.so.7 => /usr/lib/libffi.so.7 (0x7f550fdfa000)
	libpcre.so.1 => /usr/lib/libpcre.so.1 (0x7f550fd9e000)
	libintl.so.8 => /usr/lib/libintl.so.8 (0x7f550fd91000)
	libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x7f550fd8c000)
	libz.so.1 => /lib/libz.so.1 (0x7f550fd72000)
	libmount.so.1 => /lib/libmount.so.1 (0x7f550fd21000)
	libplc4.so => /usr/lib/libplc4.so (0x7f550fd1a000)
	libplds4.so => /usr/lib/libplds4.so (0x7f550fd15000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0x7f550fd10000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x7f550fd08000)
	libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x7f550fc66000)
	libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x7f550fc4f000)
	libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x7f550fc12000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x7f550fb5e000)
	libfribidi.so.0 => /usr/lib/libfribidi.so.0 (0x7f550fb41000)
	libcairo-gobject.so.2 => /usr/lib/libcairo-gobject.so.2 (0x7f550fb36000)
	libepoxy.so.0 => /usr/lib/libepoxy.so.0 (0x7f550fa26000)
	libXi.so.6 => /usr/lib/libXi.so.6 (0x7f550fa15000)
	libwayland-client.so.0 => /usr/lib/libwayland-client.so.0 (0x7f550fa05000)
	libwayland-cursor.so.0 => /usr/lib/libwayland-cursor.so.0 (0x7f550f9fc000)
	libwayland-egl.so.1 => /usr/lib/libwayland-egl.so.1 (0x7f550f9f7000)
	libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x7f550f9eb000)
	libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x7f550f9e6000)
	libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x7f550f950000)
	libpng16.so.16 => /usr/lib/libpng16.so.16 (0x7f550f91f000)
	libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x7f550f91a000)
	libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x7f550f90b000)
	libXrender.so.1 => /usr/lib/libXrender.so.1 (0x7f550f8ff000)
	libwayland-server.so.0 => /usr/lib/libwayland-server.so.0 (0x7f550f8ea000)
	libavahi-common.so.3 => /usr/lib/libavahi-common.so.3 (0x7f550f8dd000)
	libavahi-client.so.3 => /usr/lib/libavahi-client.so.3 (0x7f550f8cb000)
	libgnutls.so.30 => /usr/lib/libgnutls.so.30 (0x7f550f6f9000)
	libblkid.so.1 => /lib/libblkid.so.1 (0x7f550f6b1000)
	libbsd.so.0 => /usr/lib/libbsd.so.0 (0x7f550f69b000)
	libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x7f550f67c000)
	libuuid.so.1 => /lib/libuuid.so.1 (0x7f550f672000)
	libbz2.so.1 => /usr/lib/libbz2.so.1 (0x7f550f663000)
	libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x7f550f656000)
	libp11-kit.so.0 => /usr/lib/libp11-kit.so.0 (0x7f550f547000)
	libunistring.so.2 => /usr/lib/libunistring.so.2 (0x7f550f3d1000)
	libtasn1.so.6 => /usr/lib/libtasn1.so.6 (0x7f550f3bd000)
	libnettle.so.8 => /usr/lib/libnettle.so.8 (0x7f550f379000)
	libhogweed.so.6 => /usr/lib/libhogweed.so.6 (0x7f550f332000)
	libgmp.so.10 => /usr/lib/libgmp.so.10 (0x7f550f2cc000)
	libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x7f550f2a9000)
Error relocating /home/.cache/Cypress/6.3.0/Cypress/libffmpeg.so: __isnan: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/libffmpeg.so: __isinf: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/libffmpeg.so: strtoll_l: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/libffmpeg.so: strtoull_l: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __snprintf_chk: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __sprintf_chk: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __memcpy_chk: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __fprintf_chk: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __memmove_chk: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: gnu_get_libc_version: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __fdelt_chk: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __vsnprintf_chk: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __strncpy_chk: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __isnan: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __isinf: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __sbrk: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __res_nclose: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __res_ninit: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __isnanf: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __longjmp_chk: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __memset_chk: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: strtoll_l: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: strtoull_l: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: backtrace: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __strncat_chk: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: random_r: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: initstate_r: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __isinff: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __vfprintf_chk: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __register_atfork: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __longjmp_chk: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: __libc_stack_end: symbol not found

@F1r3Hydr4nt
Copy link

Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /home/.cache/Cypress/6.3.0/Cypress/Cypress)

This is taken care of by: sudo apk add gcompat

@x-yuri
Copy link

x-yuri commented Jan 27, 2021

Which means (predictably) that you first need to build electron, only then you can proceed with running Cypress, since the latter "uses the Electron binaries."

@F1r3Hydr4nt
Copy link

F1r3Hydr4nt commented Jan 27, 2021

Aha yes, the predictable libc vs musl roadblock because obviously Cypress "uses the Electron binaries" how ignorant of me...
Despite the fact that chromium is available from the community repo work building electron has stalled. I tried installing the void electron binary with no luck either.

I wonder how we might force Cypress to point towards the unofficially supported alpine community repo Chromium? Maybe we can simply disable the Cypress verify step

@x-yuri
Copy link

x-yuri commented Jan 27, 2021

Is this what you're looking for? https://docs.cypress.io/guides/guides/launching-browsers.html#Launching-by-a-path UPD But you need electron in any case (cypress simply won't start), so not a solution.

@F1r3Hydr4nt
Copy link

Correct, thanks though it nearly worked and gave some better errors:

yarn cypress run --browser /usr/bin/chromium-browser 
yarn run v1.22.10
$ /home/Work/base/node_modules/.bin/cypress run --browser /usr/bin/chromium-browser
It looks like this is your first time using Cypress: 6.3.0

  ✖  Verifying Cypress can run /home/.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.

----------

Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: random_r: symbol not found
Error relocating /home/.cache/Cypress/6.3.0/Cypress/Cypress: initstate_r: symbol not found

----------

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.

@scottf9
Copy link

scottf9 commented Jun 17, 2022

Any chance of support for Alpine Linux? Cypress still will not run on it. Alpine Linux is integral to many testing pipelines that use Docker, so it'd be really great to get support.

@salarhfz-fs
Copy link

Same here. Please support Alpine Linux. All of our organization pipelines are on Alpine. It's really necessary.

@x-yuri
Copy link

x-yuri commented Jun 27, 2022

@scott-f9 @salarhfz-fs The issue is with Electron, not with Cypress. If you can provide step-by-step instructions on how to build Electron under Alpine Linux that would be a major push in this direction.

@akauppi
Copy link

akauppi commented Jun 27, 2022

To widen the envelope a bit, the browser engine doesn't need to be Electron, right? The original poster doesn't define which engine they want to run.

This comment mentions it in 2017:

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.

For me, Alpine + Chromium headless + Cypress would be sweet. My itch is long image downloads in Cloud Build (CI).

@x-yuri
Copy link

x-yuri commented Jun 27, 2022

@akauppi Correct me if I'm wrong, but in order to run Cypress you need Electron, even if you run your tests in Edge down the road.

By the way, I just noticed that there's a chromium package under Alpine Linux. Which makes me think that the hardest part is done. But it's been there at least since v3.3, which might suggest that there's more to it than that.

@cbleek
Copy link

cbleek commented Jul 20, 2022

I have also stumbled across this problem. I am under the impression that it has now been described in detail and that someone familiar with the components involved can do it for little money.

I would be willing to give $100 to the person who summarizes the details found and describes what needs to be done.

$500 I would pay for the implementation.

How do you guys see this. Am I completely wrong on this or is this realistic.

@F1r3Hydr4nt
Copy link

Here are steps to build electron for libc: https://www.electronjs.org/docs/latest/development/build-instructions-linux
And for musl (alpine), you have to patch as discussed in this thread.

@cbleek
Copy link

cbleek commented Jul 21, 2022

I've created an $500 offer. https://www.upwork.com/jobs/~01a73a498cdd7bd7f5

@JuliaFoerster
Copy link

Hi @cbleek The offer is not on the website anymore. Has someone completed it? Is so, can you share the image? If not, will I get 500 USD if I share the image with you? It's a win & win situation for me ;-) Unless you dont reply.

@cbleek
Copy link

cbleek commented Aug 16, 2022

It's a task that takes a lot of time. Rather weeks than days. At least that's what I was told by a very good developer who wanted to try.

Unfortunately I didn't make much substantial progress worth sharing, I was just trying to build electron with musl-libc by trying to apply the patches from alpine's chromium package, that kinda worked but there were still plenty of failures to fix.. TBH, even if I would have gotten it to build, it isn't clear how it would been incorporated into the electron project..

@JessicaSachs
Copy link
Contributor

👋🏻 Hey friends. Perhaps I could get a quick status update here? @flotwig do you know what the deal is w/ Alpine? I'm going through like 8 repositories at work and adding Cy in is particularly painful because the Docker setups are Alpine-based 😸

@liam-verta
Copy link

liam-verta commented Feb 13, 2023

It looks like there's a package for electron in the testing repository for Alpine: https://pkgs.alpinelinux.org/package/edge/testing/x86_64/electron

@nagash77 nagash77 added the prevent-stale mark an issue so it is ignored by stale[bot] label Apr 3, 2023
@tobiasbueschel
Copy link

Linking a related issue of the cypress-docker-images repository: cypress-io/cypress-docker-images#110

@nagash77 nagash77 added the type: feature New feature that does not currently exist label Apr 25, 2023
@damianobarbati
Copy link

@tobiasbueschel @liam-verta @cbleek did you manage to find a solution for this?
Alpine is maybe the most used base image in docker, how can this still be an issue? 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser: electron OS: linux pkg/electron This is due to an issue in the packages/electron directory prevent-stale mark an issue so it is ignored by stale[bot] stage: ready for work The issue is reproducible and in scope type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests