nukeop / nuclear

Streaming music player that finds free music for you
https://nuclearplayer.com
GNU Affero General Public License v3.0
12.14k stars 1.06k forks source link

crash at startup on ubuntu 20.04 snap version #1656

Open gw3l opened 3 months ago

gw3l commented 3 months ago

Platform: ubuntu 20.04 snap version

Nuclear version: 0.6.31

Description of the issue: The application doesn't launch anymore, when I try to run in a shell I get the following "crashdump":

snap run nuclear
    main › (node:10287) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `nuclear --trace-deprecation ...` to show where the warning was created)
A JavaScript error occurred in the main process
Uncaught Exception:
Error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /tmp/.org.chromium.Chromium.v4LrS4)
    at process.func [as dlopen] (electron/js2c/asar_bundle.js:5:1846)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1138:18)
    at Object.func [as .node] (electron/js2c/asar_bundle.js:5:2073)
    at Module.load (internal/modules/cjs/loader.js:935:32)
    at Module._load (internal/modules/cjs/loader.js:776:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.@nuclear/scanner (/snap/nuclear/67/resources/app.asar/dist/main.js:4:9737553)
    at __webpack_require__ (/snap/nuclear/67/resources/app.asar/dist/main.js:1939:2675670)
    at Object../src/controllers/local-library.ts (/snap/nuclear/67/resources/app.asar/dist/main.js:4:9638351)
    at __webpack_require__ (/snap/nuclear/67/resources/app.asar/dist/main.js:1939:2675670)
    at Object../src/ioc.ts (/snap/nuclear/67/resources/app.asar/dist/main.js:4:9652658)
    at __webpack_require__ (/snap/nuclear/67/resources/app.asar/dist/main.js:1939:2675670)
    at Object../src/main.ts (/snap/nuclear/67/resources/app.asar/dist/main.js:4:9654748)
    at __webpack_require__ (/snap/nuclear/67/resources/app.asar/dist/main.js:1939:2675670)
    at /snap/nuclear/67/resources/app.asar/dist/main.js:1939:2677642
    at Object.<anonymous> (/snap/nuclear/67/resources/app.asar/dist/main.js:1939:2677702)
    at Module._compile (internal/modules/cjs/loader.js:1078:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
    at Module.load (internal/modules/cjs/loader.js:935:32)
    at Module._load (internal/modules/cjs/loader.js:776:14)
libGL error: MESA-LOADER: failed to open iris (search paths /snap/nuclear/67/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris (search paths /snap/nuclear/67/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast (search paths /snap/nuclear/67/gnome-platform/usr/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: swrast 

Is this because of a wrong libc version in the electron/chromium executable ? Thanks a lot !

nukeop commented 3 months ago

Thanks for reporting this, somebody on Discord reported the same error using the .deb package and Appimage on Debian. Not sure yet what's causing this. I'll try to change ffmpeg packaging in the next release to see if it changes anything.

soumyadipbarman commented 3 months ago

I am also having the same issue. I tried installing it using a tar file, but the issue persists.

Is it entirely related to GLIBC ?? I checked that the version I have in my system is 2.31

ldd (Ubuntu GLIBC 2.31-0ubuntu9.16) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
furgo16 commented 1 month ago

I have the same issue on Ubuntu 24.04. I discovered nuclear and I wanted to try it, but it won't launch unfortunately.

I'm using version 0.6.39 of the snap package.

nuclear
    main › (node:63739) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `nuclear --trace-deprecation ...` to show where the warning was created)
A JavaScript error occurred in the main process
Uncaught Exception:
Error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /tmp/.org.chromium.Chromium.TLjWxS)
    at process.func [as dlopen] (electron/js2c/asar_bundle.js:5:1846)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1138:18)
    at Object.func [as .node] (electron/js2c/asar_bundle.js:5:2073)
    at Module.load (internal/modules/cjs/loader.js:935:32)
    at Module._load (internal/modules/cjs/loader.js:776:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
    at Module.require (internal/modules/cjs/loader.js:959:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.@nuclear/scanner (/snap/nuclear/75/resources/app.asar/dist/main.js:4:9741864)
    at __webpack_require__ (/snap/nuclear/75/resources/app.asar/dist/main.js:1939:2675911)
    at Object../src/controllers/local-library.ts (/snap/nuclear/75/resources/app.asar/dist/main.js:4:9642653)
    at __webpack_require__ (/snap/nuclear/75/resources/app.asar/dist/main.js:1939:2675911)
    at Object../src/ioc.ts (/snap/nuclear/75/resources/app.asar/dist/main.js:4:9656960)
    at __webpack_require__ (/snap/nuclear/75/resources/app.asar/dist/main.js:1939:2675911)
    at Object../src/main.ts (/snap/nuclear/75/resources/app.asar/dist/main.js:4:9659050)
    at __webpack_require__ (/snap/nuclear/75/resources/app.asar/dist/main.js:1939:2675911)
    at /snap/nuclear/75/resources/app.asar/dist/main.js:1939:2677883
    at Object.<anonymous> (/snap/nuclear/75/resources/app.asar/dist/main.js:1939:2677943)
    at Module._compile (internal/modules/cjs/loader.js:1078:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
    at Module.load (internal/modules/cjs/loader.js:935:32)
    at Module._load (internal/modules/cjs/loader.js:776:14)

(nuclear:63739): Gtk-WARNING **: 09:43:45.160: Theme parsing error: gtk.css:1422:23: 'font-feature-settings' is not a valid property name

(nuclear:63739): Gtk-WARNING **: 09:43:45.169: Theme parsing error: gtk.css:3308:25: 'font-feature-settings' is not a valid property name

(nuclear:63739): Gtk-WARNING **: 09:43:45.171: Theme parsing error: gtk.css:3770:23: 'font-feature-settings' is not a valid property name
nukeop commented 1 month ago

Are you able to find out what version of glibc you have installed?

furgo16 commented 1 month ago

Thanks. Are all dependencies not supposed to be shipped in the snap package itself, so that the snap runs independently of the host system?

On my host system, I have glibc 2.39. I tried to see how the snap package declares its dependencies, but I could not find the snapcraft.yaml file in the repo.

ldd --version
ldd (Ubuntu GLIBC 2.39-0ubuntu8.3) 2.39
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
nukeop commented 1 month ago

That is definitely how it should be, and it's pretty weird that it's not, I just want to find out how it relates to your local setup. A snap should be fully separated from the rest of the system.

furgo16 commented 1 month ago

Thanks. My system is a plain Ubuntu 24.04 setup. I've tried the 0.6.39 AppImage and .deb package. Both work and do not crash on startup.

This would hint at a packaging issue with the snap package (outdated dependencies declared? old core20 base used with newer dependencies?), but without seeing the snapcraft.yaml file, it would be just a guess.

nukeop commented 1 month ago

We use electron-builder which is supposed to handle snap building automatically, so there's no snapcraft.yml. Maybe it's a matter of updating some dependencies?

furgo16 commented 1 month ago

Interesting, I wasn't aware of electron-builder.

It would seem the nuclear snap uses the core20 base snap, which includes glibc 2.31, yet it also ships a newer version of chromium that requires glibc 2.32. Hence the mismatch. If this theory would be correct, that would hint at an upstream bug in electron-builder.

The resolution of upstream issue #8548 could indirectly bring a fix when electron-builder starts using the core22 or core24 snaps, which ship higher versions of glibc.

In the meantime, are there any settings in electron-builder to downgrade chromium to a version that uses glibc 2.31?