You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Electron crashes with native packages (glib version issue) #46323
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
34.3.3
What operating system(s) are you using?
Ubuntu
Operating System Version
Ubuntu 24.04.2, Arch Linux, etc
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
Electron should run correctly on modern Linux distributions when used with native packages, like sharp.
Actual Behavior
Currently, depending on the system's glib version, packages like sharp crashes when are used with electron (assertion failed)
That's why I think we should consider reopening #25495, since it was automatically closed by github-actions and it's still to be a problem that affects different electron apps.
Hello @ollm. Thanks for reporting this and helping to make Electron better!
Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.
Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.
Now adding the
blocked/need-reproNeeds a test case to reproduce the bug
label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.
Could you please adjust the title of the issue to describe the crash/bug better? I think we'll just keep this new issue instead of reopening the old one.
Does the same behavior occur if you run sharp from the main thread instead of the renderer? (I'd think so, but let's make sure.)
For maintainers reading this: Here's a good analysis of what's going on: lovell/sharp#4351 (comment). It looks like the issue was caused by a glibc update in the sharp library that clashes with Electron's glibc version.
changed the title [-]Consider reopening #25495 issue (Static builds for Linux prebuilt binaries)[/-][+]Electron crashes with native packages (glib version issue)[/+]on Mar 27, 2025
Could you please adjust the title of the issue to describe the crash/bug better? I think we'll just keep this new issue instead of reopening the old one.
I have updated the title.
Does the same behavior occur if you run sharp from the main thread instead of the renderer? (I'd think so, but let's make sure.)
I just tried them from the main thread and the same thing happens.
Activity
electron-issue-triage commentedon Mar 27, 2025
Hello @ollm. Thanks for reporting this and helping to make Electron better!
Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.
Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.
Now adding the blocked/need-reproNeeds a test case to reproduce the bug
label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.
ollm commentedon Mar 27, 2025
I have created two testcase repositories.
Electron sharp 33
https://github.com/ollm/electron-sharp-33
This one, for example, works on Ubuntu 24.04.2 but not on the latest version of Arch Linux.
Electron sharp 34
https://github.com/ollm/electron-sharp-34
This one, in contrast, works on Arch Linux but not on Ubuntu 24.04.2.
If run directly from the terminal, without electron, both work as expected.
node ./www/js/app.js Loaded sharp correctly Random 100x100 image: Blob { size: 30230, type: 'image/png' } Buffer: <Buffer 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 64 00 00 00 64 08 02 00 00 00 ff 80 02 03 00 00 00 09 70 48 59 73 00 00 03 e8 00 00 03 e8 01 ... 30180 more bytes>nikwen commentedon Mar 27, 2025
Thanks!
For maintainers reading this: Here's a good analysis of what's going on: lovell/sharp#4351 (comment). It looks like the issue was caused by a glibc update in the sharp library that clashes with Electron's glibc version.
[-]Consider reopening #25495 issue (Static builds for Linux prebuilt binaries)[/-][+]Electron crashes with native packages (glib version issue)[/+]ollm commentedon Mar 27, 2025
Thanks for your reply!
I have updated the title.
I just tried them from the main thread and the same thing happens.
Tested main.js
40 remaining items
feat(desktop): package Linux AppImages with an optional update feed
release: 支持上游 0.12.1(恢复随包独立 Node,绕开 Linux 的 sharp 段错误)
Add Linux build target (AppImage and .deb)
fix(V1 Beta Experimental 13): the packaged Linux app aborted in sharp…
fix(desktop): keep sharp out of Linux Electron and closed canvases ou…
feat(desktop): record the editor window with Session Replay and attac…
feat(dsh-desktop): migrate to AppImage and bump to v2.0.17
desktop: run the Linux Host under the payload's bundled Node
desktop: run the Linux Host under the payload's bundled Node
fix(desktop): resolve sharp crash on Linux Electron via wasm fallback
ci: run the journeys on ubuntu-24.04, where sharp works inside Electron
Find why the desktop journeys fail on ubuntu-26.04 (#7)
Fix: Use custom Sharp build without static GLib on Linux
fix(desktop): run sharp as WebAssembly on Linux
fix(desktop): run the Linux Host in a standalone Node, not Electron N…