Closed fraschm1998 closed 1 year ago
You may need to use clang
instead of gcc
for dev-util/electron
, since chromium is known to be more clang
friendly.
This can be done by enabling the clang
useflag.
This can be done by enabling the
clang
useflag.
That worked, discord is still crashing.
[20571:0920/131803.040318:FATAL:fork_and_spawn.cc(196)] posix_spawn: No such file or directory (2)
[20542:0920/131803.140050:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[20542:0920/131803.140080:ERROR:select_file_dialog_linux_portal.cc(242)] Failed to read portal version property
[21262:0920/131803.190751:ERROR:gpu_init.cc(481)] Passthrough is not supported, GL is egl, ANGLE is
[WebContents] crashed (reason: crashed, exitCode: 11)... reloading
[WebContents] double crashed (reason: crashed, exitCode: 11)... RIP =(
Sorry for the delay,
Make sure the dbus
service is running. Then, try unmerging net-im/discord-wayland
and re-emerging it.
Also, what DE, or WM, are you using and what GPU do you have? I noticed you have both nvidia
and amdgpu
enabled in your portage configuration.
Sorry for the delay,
Make sure the
dbus
service is running. Then, try unmergingnet-im/discord-wayland
and re-emerging it.
Already running dbus
I'm running DWL, I have nvidia and amdgpu as I have an asus g14 (4900hs with integrated graphics and a 2060ti)
I updated my electron seeing if that would fix my discord issue then deleted the old electron but now I get: /usr/bin/discord: line 5: exec: electron: not found
.
eselect electron list: Available Electron Slots 19.0 * 19.0.16
I also try and re-emerge electron 19.0.16 with and without clang flag and I'm getting this error:
INFO: configure completed successfully
[2755/16341] x86_64-pc-linux-gnu-clang++ -MMD -MF obj/content/services/shared_storage_worklet/public/mojom/mojom/shared_storage_worklet_service.mojom.o.d
-DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_
SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSIO
N_2_40 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_WAYLAND_KHR -D
GOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DUSING_SYSTEM_ICU=1 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DU_IMPORT=
U_EXPORT -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1
-DWEBRTC_USE_BUILTIN_ISAC_FIX=0 -DWEBRTC_USE_BUILTIN_ISAC_FLOAT=1 -DWEBRTC_USE_X11 -DLOGGING_INSIDE_WEBRTC -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEB
P -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_ENABLE_SKSL -DSK_UNTIL_CRBUG_1187654_IS_FIXED -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_W
IN_FONTMGR_NO_SIMULATIONS -DSK_GL -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_HAS_WUFFS_LIBRARY -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_H
EADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DLEVELDB_PLATFORM_CHROMIUM=1 -DCRASHPAD_ZLIB_SOURCE_EXTERNAL -DUSE_SYSTEM_ZLIB=1 -I../.. -Igen
-I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -Igen/shim_headers/zlib_shim -Igen/shim_headers/i
cui18n_shim -Igen/shim_headers/icuuc_shim -I../../third_party/libyuv/include -I../../third_party/jsoncpp/source/include -Igen/shim_headers/openh264_shim
-Igen/shim_headers/libpng_shim -Igen/shim_headers/libwebp_shim -I../../third_party/vulkan-deps/vulkan-headers/src/include -Igen/shim_headers/re2_shim -I.
./../third_party/khronos -I../../gpu -Igen/third_party/dawn/include -I../../third_party/dawn/include -I../../third_party/dawn/src/include -Igen/shim_head
ers/snappy_shim -I../../third_party/abseil-cpp -I../../third_party/boringssl/src/include -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_
party/ced/src -Igen/net/third_party/quiche/src -I../../net/third_party/quiche/overrides -I../../net/third_party/quiche/src/quiche/common/platform/default
-I../../net/third_party/quiche/src -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen/third_party/webrtc -I../../third_party/skia -I.
./../third_party/wuffs/src/release/c -I../../third_party/vulkan/include -I../../third_party/libwebm/source -I../../third_party/mesa_headers -I../../third
_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/libaom/source/libaom -I../..
/third_party/crashpad/crashpad -I../../third_party/crashpad/crashpad/compat/linux -I../../third_party/crashpad/crashpad/compat/non_win -Wimplicit-fallthr
ough -Wunreachable-code-aggressive -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wloop-analysis -Wno-unneeded-internal-declarati
on -Wenum-compare-conditional -Wno-psabi -Wno-ignored-pragma-optimize -Wno-unqualified-std-cast-call -Wno-deprecated-non-prototype -Wshadow -fno-delete-n
ull-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -
pthread -fcolor-diagnostics -fmerge-all-constants -no-canonical-prefixes -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -fvisibility=hidden -Whe
ader-hygiene -Wstring-conversion -Wtautological-overlap-compare -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi/include -DPROTO
BUF_ALLOW_DEPRECATED=1 -I/usr/include/nss -I/usr/include/nspr -Wno-shadow -std=c++17 -Wno-trigraphs -fno-aligned-new -fno-exceptions -fno-rtti -fvisibili
ty-inlines-hidden -Wno-deprecated-declarations -march=znver2 -O2 -pipe -Wno-unknown-warning-option -c gen/content/services/shared_storage_worklet/public/
mojom/shared_storage_worklet_service.mojom.cc -o obj/content/services/shared_storage_worklet/public/mojom/mojom/shared_storage_worklet_service.mojom.o
[2756/16341] python3.10 ../../electron/build/npm-run.py --silent gn-typescript-definitions -- /var/tmp/portage/dev-util/electron-19.0.16-r1/work/chromium
-102.0.5005.115/out/Release/gen/electron/tsc/typings/electron.d.ts
ninja: build stopped: subcommand failed.
* ERROR: dev-util/electron-19.0.16-r1::thegreatmcpain failed (compile phase):
* ninja -v -j17 -l0 -C out/Release electron failed
*
* Call stack:
* ebuild.sh, line 122: Called src_compile
* environment, line 5337: Called eninja '-C' 'out/Release' 'electron'
* environment, line 3492: Called die
* The specific snippet of code:
* "$@" || die "${nonfatal_args[@]}" "${*} failed"
*
* If you need support, post the output of `emerge --info '=dev-util/electron-19.0.16-r1::thegreatmcpain'`,
* the complete build log and the output of `emerge -pqv '=dev-util/electron-19.0.16-r1::thegreatmcpain'`.
*
* MemTotal: 40487664 kB
* SwapTotal: 4194300 kB
*
* The complete build log is located at '/var/tmp/portage/dev-util/electron-19.0.16-r1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-util/electron-19.0.16-r1/temp/environment'.
* Working directory: '/var/tmp/portage/dev-util/electron-19.0.16-r1/work/chromium-102.0.5005.115'
* S: '/var/tmp/portage/dev-util/electron-19.0.16-r1/work/electron-19.0.16'
Edit seems like the error is further up:
FAILED: obj/electron/libnotify_loader/libnotify_loader.o
x86_64-pc-linux-gnu-clang++ -MMD -MF obj/electron/libnotify_loader/libnotify_loader.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUI
LD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DND
EBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../.. -Igen -Wimplicit-fallthrough -Wunreachable-code-aggressive -Wthread-safety -Wno-missing-field-in
itializers -Wno-unused-parameter -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-psabi -Wno-ignored-pragma-optimize -W
no-unqualified-std-cast-call -Wno-deprecated-non-prototype -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-si
ze=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -no-canonical-prefixes
-ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -I/usr/i
nclude/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/lib64/libffi/include -I/usr/include/libpng16 -I/usr/include/libmount -
I/usr/include/blkid -std=c++17 -Wno-trigraphs -fno-aligned-new -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -march=znver2 -O2 -pipe -Wno-unknown
-warning-option -c gen/library_loaders/libnotify_loader.cc -o obj/electron/libnotify_loader/libnotify_loader.o
In file included from gen/library_loaders/libnotify_loader.cc:4:
gen/library_loaders/libnotify_loader.h:7:10: fatal error: 'libnotify/notify.h' file not found
#include <libnotify/notify.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.
I would leave the clang
useflag on since chromium and GCC don't really get along that well.
Try re-syncing my overlay, and re-emerging eselect-electron
(should be version 2.1-r1
). I realized eselect-electron from the electron
overlay hasn't been updated to reflect the change in slot version names, so I've made a patch to fix that yesterday.
After re-emerging eselect-electron
use eselect electron
to select the installed electron version. After that you should beable to run electron
in the terminal.
I installed x11-libs/libnotify which fixed the electron failed compilation error. Seems to be a requirement for the newer version. I re-emerged discord-wayland and it starts but crashed before launch:
[21277:1004/174816.312990:FATAL:fork_and_spawn.cc(196)] posix_spawn: No such file or directory (2)
[21297:1004/174816.432376:ERROR:gpu_init.cc(481)] Passthrough is not supported, GL is egl, ANGLE is
[WebContents] crashed (reason: crashed, exitCode: 11)... reloading
[WebContents] double crashed (reason: crashed, exitCode: 11)... RIP =(
Running discord --disable-gpu
seems to remove the [21297:1004/174816.432376:ERROR:gpu_init.cc(481)] Passthrough is not supported, GL is egl, ANGLE is
error.
But now I'm still left with the fork_and_spawn posix_spawn error:
discord --disable-gpu
[31696:1004/180055.571635:FATAL:fork_and_spawn.cc(196)] posix_spawn: No such file or directory (2)
Discord 0.0.20
Starting app.
Starting updater.
[Modules] Modules initializing
[Modules] Distribution: remote
[Modules] Host updates: disabled
[Modules] Module updates: enabled
[Modules] Module install path: /home/massimo/.config/discord/0.0.20/modules
[Modules] Module installed file path: /home/massimo/.config/discord/0.0.20/modules/installed.json
[Modules] Module download path: /home/massimo/.config/discord/0.0.20/modules/pending
[Modules] No updates to install
[Modules] Host is up to date.
[Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
[Modules] No module updates available.
Optional module ./ElectronTestRpc was not included.
[WebContents] crashed (reason: crashed, exitCode: 11)... reloading
Optional module ./ElectronTestRpc was not included.
[WebContents] double crashed (reason: crashed, exitCode: 11)... RIP =(
I'm not sure what's going on, because my Discord works just fine even though I also have that posix_spawn message.
Is there anything in dmesg
after discord crashes?
Is there anything in
dmesg
after discord crashes?
[24474.848901] traps: electron[8036] trap int3 ip:5559371d3cb6 sp:7fff9201ab50 error:0 in electron[555932c88000+92c7000]
[24481.609504] traps: electron[13113] trap int3 ip:560682efecb6 sp:7fff11a1d350 error:0 in electron[56067e9b3000+92c7000]
[24493.616909] traps: electron[15773] trap int3 ip:55610b81fcb6 sp:7ffe1fc0cef0 error:0 in electron[5561072d4000+92c7000]
[24517.435369] traps: electron[22603] trap int3 ip:562d3d4edcb6 sp:7ffd4f26a770 error:0 in electron[562d38fa2000+92c7000]
[24533.743534] traps: electron[32626] trap int3 ip:5599221c6cb6 sp:7ffea56e0c70 error:0 in electron[55991dc7b000+92c7000]
[26994.127528] traps: electron[1467] trap int3 ip:55b7d3870cb6 sp:7ffd29944290 error:0 in electron[55b7cf325000+92c7000]
[42587.288905] traps: electron[8567] trap int3 ip:55c0894aecb6 sp:7ffdeac23030 error:0 in electron[55c084f63000+92c7000]
Can you run electron by itself in a terminal?
Can you run electron by itself in a terminal?
Yeah it runs no problem
electron
Electron 19.0.16 - Build cross platform desktop apps with JavaScript, HTML, and CSS
Usage: electron [options] [path]
A path to an Electron app may be specified. It must be one of the following:
- index.js file.
- Folder containing a package.json file.
- Folder containing an index.js file.
- .html/.htm file.
- http://, https://, or file:// URL.
Options:
-i, --interactive Open a REPL to the main process.
-r, --require Module to preload (option can be repeated).
-v, --version Print the version.
-a, --abi Print the Node ABI version.
[29420:1005/002042.298945:ERROR:gpu_init.cc(481)] Passthrough is not supported, GL is egl, ANGLE is
Using --disable-gpu it removes the Passthrough is not supported error
I also see that Passthrough error, and I see trap int3
messages in my dmesg, but Discord runs fine.
Here's what I see when I run Discord.
Discord 0.0.20
Starting app.
Starting updater.
[Modules] Modules initializing
[Modules] Distribution: remote
[Modules] Host updates: enabled
[Modules] Module updates: enabled
[Modules] Module install path: /home/james/.config/discord/0.0.20/modules
[Modules] Module installed file path: /home/james/.config/discord/0.0.20/modules/installed.json
[Modules] Module download path: /home/james/.config/discord/0.0.20/modules/pending
[7254:1005/142652.906343:ERROR:gpu_init.cc(481)] Passthrough is not supported, GL is egl, ANGLE is
MESA-LOADER: failed to open nvidia-drm: /usr/lib64/gbm/nvidia-drm_gbm.so: cannot open shared object file: Permission denied (search paths /usr/lib64/gbm, suffix _gbm)
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to open nvidia-drm: /usr/lib64/dri/nvidia-drm_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib64/dri, suffix _dri)
failed to load driver: nvidia-drm
MESA-LOADER: failed to open zink: /usr/lib64/dri/zink_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib64/dri, suffix _dri)
failed to load driver: zink
MESA-LOADER: failed to open kms_swrast: /usr/lib64/dri/kms_swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib64/dri, suffix _dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast: /usr/lib64/dri/swrast_dri.so: cannot open shared object file: Permission denied (search paths /usr/lib64/dri, suffix _dri)
failed to load swrast driver
[Modules] No updates to install
[Modules] Checking for host updates.
[Modules] Host is up to date.
[Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
[Modules] No module updates available.
Optional module ./ElectronTestRpc was not included.
[Modules] Checking for host updates.
[Modules] Host is up to date.
[Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
[Modules] No module updates available.
I noticed in yours [Modules] Host updates:
says disabled
.
I noticed in yours
[Modules] Host updates:
saysdisabled
.
I put that when I tried running 0.0.19. I just deleted ~/.config/discord and re-emerged discord-wayland again. This is the output on boot:
discord --disable-gpu --no-sandbox
[29663:1005/222651.389475:FATAL:fork_and_spawn.cc(196)] posix_spawn: No such file or directory (2)
Discord 0.0.20
(electron:28770): Gdk-WARNING **: 22:26:51.430: Failed to load cursor theme Adwaita
Starting app.
Starting updater.
[Modules] Modules initializing
[Modules] Distribution: remote
[Modules] Host updates: enabled
[Modules] Module updates: enabled
[Modules] Module install path: /home/massimo/.config/discord/0.0.20/modules
[Modules] Module installed file path: /home/massimo/.config/discord/0.0.20/modules/installed.json
[Modules] Module download path: /home/massimo/.config/discord/0.0.20/modules/pending
[Modules] No updates to install
[Modules] Checking for host updates.
[Modules] Host is up to date.
[Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
[Modules] No module updates available.
Optional module ./ElectronTestRpc was not included.
[WebContents] crashed (reason: crashed, exitCode: 11)... reloading
Optional module ./ElectronTestRpc was not included.
[WebContents] double crashed (reason: crashed, exitCode: 11)... RIP =(
It might be worth looking into a pre-built version of electron to see if that would work for you.
First, grab the release zip from here: electron-v19.0.16-linux-x64.zip
Then, create a folder and extract the zip's contents into the new folder.
Finally, open a terminal in that folder and run this command.
./electron --enable-features=UseOzonePlatform --ozon-platform=wayland /usr/lib/discord/app.asar
Let me know if that makes Discord work.
Let me know if that makes Discord work.
Still crashes:
(electron:6770): Gdk-WARNING **: 12:49:20.578: Failed to load cursor theme Adwaita
[6770:1007/124920.607322:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[6770:1007/124920.607370:ERROR:select_file_dialog_linux_portal.cc(242)] Failed to read portal version property
[6853:1007/124920.714309:ERROR:gpu_init.cc(481)] Passthrough is not supported, GL is egl, ANGLE is
[WebContents] crashed (reason: crashed, exitCode: 11)... reloading
To be honest I'm completely lost as to why Discord is crashing on your system.
I suggest trying the net-im/discord-bin
ebuild from Gentoo's official repo. I just tried it out and it launches just fine, but it runs via Xwayland. Really the only difference between my ebuild and Gentoo's is that mine uses the system's electron installation. Functionality-wise screen capture is broken/unusable on both versions.
I would also try a third-party client such as WebCord
I would also try a third-party client such as WebCord
I wish I knew about this earlier! It works great, thanks!
Getting this subcommand failed error.
http://sprunge.us/i62Q3R Build Log: http://sprunge.us/DNnTMc