flathub / com.baidu.NetDisk

https://flathub.org/apps/details/com.baidu.NetDisk
0 stars 0 forks source link

Crashes right after launch #29

Open zhengliw opened 1 month ago

zhengliw commented 1 month ago

The current version distributed crashes right after launch on Fedora 40. Here is the log:

Gtk-Message: 12:53:39.803: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:53:39.803: Failed to load module "pk-gtk-module"
Gtk-Message: 12:53:39.803: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:53:39.803: Failed to load module "pk-gtk-module"
cmdProcess stderr: /bin/sh: line 1: xdg-mime: command not found

browser engine version: 1.0.4.32
[ 'child-process-gone', '{"reason":"crashed","exitCode":159}' ]
[ 'child-process-gone', '{"reason":"crashed","exitCode":159}' ]
[ 'child-process-gone', '{"reason":"crashed","exitCode":159}' ]
[ 'child-process-gone', '{"reason":"crashed","exitCode":159}' ]
[ 'child-process-gone', '{"reason":"crashed","exitCode":159}' ]
[ 'child-process-gone', '{"reason":"crashed","exitCode":159}' ]
[ 'child-process-gone', '{"reason":"crashed","exitCode":159}' ]
[ 'child-process-gone', '{"reason":"crashed","exitCode":159}' ]
[3:0601/125341.815535:FATAL:gpu_data_manager_impl_private.cc(445)] GPU process isn't usable. Goodbye.
/app/bin/baidunetdisk: line 3:     3 Trace/breakpoint trap   (core dumped) zypak-wrapper.sh /app/extra/baidunetdisk/baidunetdisk "$@"

I went on to learn a bit more about zypak and experimented around. I managed to find a workaround by editing the desktop file to look like the following:

[Desktop Entry]
Name=Baidu Netdisk
Name[zh_CN]=百度网盘
#Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=baidunetdisk --file-forwarding com.baidu.NetDisk @@u %U @@
Exec=/usr/bin/flatpak run com.baidu.NetDisk --no-sandbox
Terminal=false
Type=Application
Icon=com.baidu.NetDisk
StartupWMClass=baidunetdisk
MimeType=x-scheme-handler/baiduyunguanjia;
Categories=Network;
X-Flatpak-Tags=proprietary;
X-Flatpak=com.baidu.NetDisk

I commented out the old Exec line and replaced it with a new one. Could it be possible that we don't need zypak at all, and we only need the --no-sandbox parameter? I don't know much about Electron so thanks for helping!

zhengliw commented 1 month ago

Running bash inside the flatpak and then manually running /app/extra/baidunetdisk/baidunetdisk --no-sandbox works as well...

Edit: But this way the tray icon is three dots instead of the actual icon, funny enough :P