flathub / com.slack.Slack

https://flathub.org/apps/details/com.slack.Slack
36 stars 36 forks source link

Slack crashes after a minute or so #165

Closed Wildcarde closed 9 months ago

Wildcarde commented 2 years ago

I've got a fresh install of the flatpack version of slack (due to the giant deprecation warning on the older fedora version) that I have successfully logged into my workspace for and can interact with just fine. However the screen only remains up for about 60 seconds before disappearing and terminating entirely.

OS: Fedora 35; Plasma Wayland; latest nvidia drivers installed.

full output of a run:

flatpak run com.slack.Slack                                                                                                                        !5006
[2 preload-host-spawn-strategy] Running: /app/bin/zypak-helper child - /app/extra/lib/slack/slack --type=zygote --enable-crashpad
Initializing local storage instance
(electron) Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reporting servers support.
[2:0428/193713.076426:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0428/193713.076472:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
LaunchProcess: failed to execvp:
xdg-settings
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[50:0428/193713.141784:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
[2:0428/193713.168769:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0428/193713.168809:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0428/193713.168833:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0428/193713.188309:ERROR:browser_main_loop.cc(267)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[2:0428/193713.188384:ERROR:browser_main_loop.cc(267)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[2:0428/193715.149179:ERROR:browser_main_loop.cc(267)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[50:0428/193715.172446:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[2:0428/193715.185093:ERROR:browser_main_loop.cc(267)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[2:0428/193715.185157:ERROR:browser_main_loop.cc(267)] Gtk: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
[50:0428/193720.873477:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
Gkr-Message: 19:37:43.180: secret service operation failed: org.freedesktop.DBus.Error.ServiceUnknown

possibly related, slack seems incapable of storing my profile settings so it launches in light mode every time. It does hold onto my server authentication however.

Zeitsperre commented 1 year ago

I seem to be experiencing this crash after around 20 seconds as well (openSUSE; KDE; Wayland):

Initializing local storage instance
(electron) Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reporting servers support.
[2:0829/113917.913552:ERROR:object_proxy.cc(590)] Failed to call method: org.kde.KWallet.isEnabled: object_path= /modules/kwalletd5: org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
[2:0829/113917.913588:ERROR:kwallet_dbus.cc(107)] Error contacting kwalletd5 (isEnabled)
[2:0829/113917.913713:ERROR:object_proxy.cc(590)] Failed to call method: org.kde.KLauncher.start_service_by_desktop_name: object_path= /KLauncher: org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
[2:0829/113917.913720:ERROR:kwallet_dbus.cc(79)] Error contacting klauncher to start kwalletd5
[2:0829/113917.913899:ERROR:object_proxy.cc(590)] Failed to call method: org.kde.KWallet.close: object_path= /modules/kwalletd5: org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
[2:0829/113917.913912:ERROR:kwallet_dbus.cc(459)] Error contacting kwalletd5 (close)
LaunchProcess: failed to execvp:
xdg-settings
evan-a-a commented 10 months ago

@Zeitsperre are you still experiencing this crash in the latest version?

Zeitsperre commented 10 months ago

@evan-a-a I performed a flatpak update just now to pull the latest slack and yes, I'm still experiencing a crash after several seconds.

image

(base) tjs-openSUSE:~ $ flatpak run com.slack.Slack
Initializing local storage instance
(electron) Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reporting servers support.
LaunchProcess: failed to execvp:
xdg-settings
{crash occurs here} 
evan-a-a commented 10 months ago

Ok thanks. Do you have any local permissions overrides applied?

Zeitsperre commented 10 months ago

I did, funny enough (some things related to dbus; I don't recall adding them), but I installed flatseal and performed a permissions reset of Slack to be sure. The issue remains.

ZVNexus commented 9 months ago

@Zeitsperre I just installed OpenSUSE Tumbleweed to try and reproduce this crash, and I cannot with KDE Plasma 5.27.10, running in the Wayland session.

What hardware are you using, and are you using a version of OpenSUSE I did not list?

Also could you try and test this debug version of Slack? Should print some more logs, would be appreciated if you can attach them if you can still reproduce the issue. flatpak install --user https://dl.flathub.org/build-repo/76510/com.slack.Slack.flatpakref

Zeitsperre commented 9 months ago

Hi @ZVNexus

Thanks for looking into this. I'll have a chance to give this a try tomorrow afternoon! Will respond with specs and outputs.

Zeitsperre commented 9 months ago

@ZVNexus

I just tried the custom debug version and I still see crashes after a few seconds (10 at most).

Here are my specs:

Here is the stdout and the stderr from slack: https://gist.github.com/Zeitsperre/e6250d94b607fa1cfded7d86abcba8aa

Let me know if there's any other information that could help. Thanks again!

ZVNexus commented 9 months ago

@Zeitsperre When the application crashes, is there anything mentioned in the Logs app under "Applications"?

Zeitsperre commented 9 months ago

@ZVNexus

Possibly, but I have no idea what to look for.

Crash logs: https://gist.github.com/Zeitsperre/3d7cb17414c1da083776e853d2265397

Does this help?

ZVNexus commented 9 months ago

@Zeitsperre Hmmm not anything really too interesting in those logs (at least not that would cause it to crash). I did a bit more research and it seems like Slack outputs stderr to /dev/null for some reason, see if you can maybe trace it?

https://www.brendangregg.com/blog/2021-08-27/slack-crashes-secret-stderr.html

Going to the end of the article, seems like using opensnoop would be your best bet.

Zeitsperre commented 9 months ago

@ZVNexus

zypper in lsb-release performed. Crashing as always.

I'll have some time to try searching those errors tonight. Will get back to you. Thanks again!

ZVNexus commented 9 months ago

@Zeitsperre Is Slack allowed to run in the background?

Zeitsperre commented 9 months ago

Sorry for the long wait. I can verify this on Thursday!

ZVNexus commented 9 months ago

@Zeitsperre And if so, please test this build: flatpak install --user https://dl.flathub.org/build-repo/78235/com.slack.Slack.flatpakref

There's an issue with xdg-desktop-portal where it's killing Slack after around 5 seconds (not the app crashing itself) if it's not allowed to run in the background.

Zeitsperre commented 9 months ago

Verified that the background app privileges for Slack were set as "not allowed".

Testing both the test build and the stable branch and can confirm that both are working!

image

Thanks so much for the help!

ZVNexus commented 9 months ago

Merged the fix for the app being closed when app is not allowed to run in background, let me know if anything else pops up.