mattermost / desktop

Mattermost Desktop application for Windows, Mac and Linux
Apache License 2.0
1.99k stars 809 forks source link

Linux client stuck in memory #1844

Closed alexander-potemkin closed 1 year ago

alexander-potemkin commented 2 years ago

I confirm (by marking "x" in the [ ] below: [x]):


Summary Mattermost 5.0.1 stuck in memory.

Environment

Steps to reproduce

Close Mattermost Open it again

Expected behavior

Mattermost to close and then to open.

Observed behavior

It doesn't start.

Possible fixes

Killing all stuck process.

mattermost-dekstop

devinbinnie commented 2 years ago

@alexander-potemkin Does this happen consistently when you close the app? Also, how are you closing the app? Does the same thing happen when you using the 3-dot menu > File > Quit?

alexander-potemkin commented 2 years ago

I close the app by clicking 'X' at the right upper corner. It doesn't happen when I do 'quit' and I can't reproduce it now when the tray icon is there, as I exit mattermost via tray icon -> Quit

gigawhitlocks commented 2 years ago

I have been hitting this issue as well, happens reliably if I hit CTRL+W by mistake, or by clicking the X as reported above, which closes the window but doesn't 'quit' the application. I must then call killall mattermost-desktop to be able to relaunch the application.

devinbinnie commented 2 years ago

@alexander-potemkin @gigawhitlocks There's a setting in the Settings page called "Leave app running in notification area when application window is closed". Is that checked for either of you? If you uncheck it, closing the window should instead put the window in the Task View bar (?), which should avoid the process disappearing without being able to close it. It's not the most ideal solution, but should avoid orphaned processes. We have a ticket kicking around to work on the Linux closing behaviour, since the default behaviour is a little too Ubuntu specific, since on exit it goes to the system, which not every distro uses.

gigawhitlocks commented 2 years ago

It's checked and greyed out, so it can't be unselected: Screenshot from 2021-10-29 10-40-32

This is particularly frustrating because the setting to "show icon in the notification area" has never worked (I reported the issue 2 years ago and was told Fedora isn't supported so I've been just living with it) so I would like to have this setting unchecked, and definitely had it unchecked before upgrading to version 5.0.0

devinbinnie commented 2 years ago

@gigawhitlocks I think there's an issue with when that can be unchecked. If you check 'Show icon in notification area' it should be enabled. Then you can uncheck that, and then uncheck the 'Show icon in notification area' setting afterwards.

gigawhitlocks commented 2 years ago

That works to work around the issues, thanks @devinbinnie

alexander-potemkin commented 2 years ago

Thank you. I had to add tray icon as a work-around, indeed.

I’m not sure I’ve got about Ubuntu specific app closing.

btw, Ubuntu is quite popular foundation for many distros, so I would say it’s quite a thing to address, unless I’m missing something?

devinbinnie commented 2 years ago

@alexander-potemkin On Ubuntu's default configuration for GNOME, there's a system tray in the top bar. I know other distros like Fedora don't use this, as well as Ubuntu-based distros that don't use GNOME like Linux Mint. The app is built to use that tray just like Windows and Mac do, but we're aware that a lot of other distros don't use that.

tl;dr Our Linux closing behaviour works for a lot of Ubuntu users, but not all of them and it doesn't work for a lot of other distros so we need to address that. There's a JIRA ticket floating around for that somewhere.

alexander-potemkin commented 2 years ago

Hm, got it. So it's not that much about Linux distribution, as it's about tray icon behaviour, got it, thanks! Yes, fixing this would be very nice. It's also wasn't the problem before 5.x client.

alexander-potemkin commented 2 years ago

@devinbinnie there is one major difference in how Mattermost restores from the tray vs Slack or Telegram: when I click on tray icon on Mattermost, I have to choose which workspace I would like to have opened; while on other messengers (and apps) - I get app window immediately, which is muuuuch more convenient.

alexander-potemkin commented 2 years ago

on top of that, on Slack I can click and restore window via normal icon and via tray icon, so tray icon is a way to stay at background.

devinbinnie commented 2 years ago

@devinbinnie there is one major difference in how Mattermost restores from the tray vs Slack or Telegram: when I click on tray icon on Mattermost, I have to choose which workspace I would like to have opened; while on other messengers (and apps) - I get app window immediately, which is muuuuch more convenient.

To clarify, do you mean which desktop workspace this opens on?

on top of that, on Slack I can click and restore window via normal icon and via tray icon, so tray icon is a way to stay at background.

This is being fixed here: https://github.com/mattermost/desktop/pull/1848

alexander-potemkin commented 2 years ago

To clarify, do you mean which desktop workspace this opens on?

By workspace I mean, not a desktop workspace - virtual desktops, I meant Mattermost workspace / chats I'm connected to (I have different servers I'm connected to).

devinbinnie commented 2 years ago

To clarify, do you mean which desktop workspace this opens on?

By workspace I mean, not a desktop workspace - virtual desktops, I meant Mattermost workspace / chats I'm connected to (I have different servers I'm connected to).

I see what you mean. On other OSes we're able to double-click on the tray icon to just open the window. Apparently on Linux (or Ubuntu at least) you can't. I think the same workflow should be possible using the task bar once the above fix mentioned is merged.

alexander-potemkin commented 2 years ago

Yes, please

devinbinnie commented 2 years ago

JIRA ticket here: https://mattermost.atlassian.net/browse/MM-30713

devinbinnie commented 1 year ago

Fixed in this PR: https://github.com/mattermost/desktop/pull/1988