eclipse-che / che-theia

Eclipse Public License 2.0
124 stars 110 forks source link

Can't build dockerimages. #227

Closed monaka closed 5 years ago

monaka commented 5 years ago

Description

I couldn't build docker images from the master branch.

Reproduction Steps

cd dockerfiles/theia-dev
./build.sh --tags:next

OS and version:

Diagnostics:

error /projects/theia/node_modules/@theia/electron: Command failed.
Exit code: 1
Command: node ./scripts/skip-replace-ffmpeg || (node ./electron-replace-ffmpeg && node ./electron-h264-test)
Arguments:
Directory: /projects/theia/node_modules/@theia/electron
Output:
Downloading tmp-395-0-ffmpeg-v3.1.7-linux-x64.zip
[============================================>] 100.0% of 1.11 MB (742.54 kB/s)
events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: spawn /projects/theia/node_modules/electron/dist/electron ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:757:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
monaka commented 5 years ago

It looks a dependency issue. yarn add -W @theia/electron && yarn works well.

monaka commented 5 years ago
(root@container) (/projects/theia/node_modules/electron) $ ldd dist/electron
        /lib64/ld-linux-x86-64.so.2 (0x7fdd8189f000)
        libnode.so => dist/libnode.so (0x7fdd8035c000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7fdd8189f000)
Error loading shared library libgtk-3.so.0: No such file or directory (needed by dist/electron)
Error loading shared library libgdk-3.so.0: No such file or directory (needed by dist/electron)
Error loading shared library libpangocairo-1.0.so.0: No such file or directory (needed by dist/electron)
Error loading shared library libpango-1.0.so.0: No such file or directory (needed by dist/electron)
Error loading shared library libatk-1.0.so.0: No such file or directory (needed by dist/electron)
Error loading shared library libcairo.so.2: No such file or directory (needed by dist/electron)
Error loading shared library libgdk_pixbuf-2.0.so.0: No such file or directory (needed by dist/electron)
Error loading shared library libgio-2.0.so.0: No such file or directory (needed by dist/electron)
Error loading shared library libgobject-2.0.so.0: No such file or directory (needed by dist/electron)
Error loading shared library libatk-bridge-2.0.so.0: No such file or directory (needed by dist/electron)
Error loading shared library libdbus-1.so.3: No such file or directory (needed by dist/electron)
        libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0x7fdd80357000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0x7fdd80330000)
Error loading shared library libXi.so.6: No such file or directory (needed by dist/electron)
Error loading shared library libXcursor.so.1: No such file or directory (needed by dist/electron)
Error loading shared library libXdamage.so.1: No such file or directory (needed by dist/electron)
Error loading shared library libXrandr.so.2: No such file or directory (needed by dist/electron)
Error loading shared library libXcomposite.so.1: No such file or directory (needed by dist/electron)
Error loading shared library libXext.so.6: No such file or directory (needed by dist/electron)
Error loading shared library libXfixes.so.3: No such file or directory (needed by dist/electron)
Error loading shared library libXrender.so.1: No such file or directory (needed by dist/electron)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x7fdd8020d000)
Error loading shared library libXtst.so.6: No such file or directory (needed by dist/electron)
Error loading shared library libXss.so.1: No such file or directory (needed by dist/electron)
Error loading shared library libglib-2.0.so.0: No such file or directory (needed by dist/electron)
Error loading shared library libnss3.so: No such file or directory (needed by dist/electron)
Error loading shared library libnssutil3.so: No such file or directory (needed by dist/electron)
Error loading shared library libsmime3.so: No such file or directory (needed by dist/electron)
Error loading shared library libnspr4.so: No such file or directory (needed by dist/electron)
        libffmpeg.so => dist/libffmpeg.so (0x7fdd7ff4a000)
monaka commented 5 years ago

@benoitf Could you open the official CI script on this repository?

My builds keep failing on building e2e test image. And I can't figure out why the official CI build aren't failed.

Just my guess but ... skip_tests is set on the official CI ?

https://github.com/eclipse/che-theia/blob/7bccaab22238c6b24471751cae7a93b9f10a80dd/dockerfiles/theia-dev/build.sh#L15-L17

monaka commented 5 years ago

Ah, this is my bad. My build script didn't pass GITHUB_TOKEN to Dockerfile.

I feel this is a little bit curious. I found logs like this ( enough slots ) but actually all builds without GITHUB_TOKEN were failed.

 Current API rate limit https://api.github.com is 60
GITHUB_TOKEN variable is not set but https://api.github.com rate limit has enough slots

Still I've not got the root reason why yarn work well only with GITHUB_TOKEN. But anyway I cloud build my Che-theia. So I close this.