Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Desktop client does not connect to server with auto-launch on startup + auto-launch minimized #3212

Open
8 tasks done
raphraph opened this issue Nov 19, 2024 · 8 comments

Comments

@raphraph
Copy link

raphraph commented Nov 19, 2024

Checks before filing an issue

Mattermost Desktop Version

5.9.0

Operating System

Linux Ubuntu 22.04 LTS

Mattermost Server Version

9.11.5

Steps to reproduce

Set the app to :

  • auto-launch on startup
  • auto-launch minimized

Reboot machine.
The app auto-launches correctly, and auto-launches minimized (no window is opened, and app icon appears in the task bar).

Expected behavior

The client should connect to the server (this is the normal behavior of an app running in the background) so that the user can be notified of new messages.

Otherwise the auto-launch minimized setting is useless as in order to be connected to the server I need to manually open the window and then minimize it again manually...

Observed behavior

I have to open the app window once in order that Mattermost fully launches. As long as I don't open the app window, Mattermost is not fully launched (not connected to the server) and I do not receive any notifications when a message is sent.

Once I open the app window once, I see that the app is connecting to the server, and then notifications will work fine event if I minimize the window again.

I observed that if I do not set the auto-launch minimized setting everything works ok : Mattermost launches on my machine startup, the app window opens and it connects to the server. If I then minimize the window notifications work fine.

Log Output

This is the log output of the autostart of yesterday when the problem occured (but it was set on "info" level, I will add later a full debug log when I have one) :

[2024-11-18 08:36:56.803] [error] Logger Log level set to: info
[2024-11-18 08:36:57.091] [warn]  [App.Initialize] Current working directory is /home/username, changing into /opt/Mattermost
[2024-11-18 08:36:58.958] [info]  [App.Config] config.autostart has been configured: true
[2024-11-18 08:36:59.273] [info]  [App.Initialize] Autoupgrade disabled: false
[2024-11-18 08:36:59.387] [info]  [ServerDropdownView] init
[2024-11-18 08:36:59.509] [info]  [i18nManager] Set new language fr
[2024-11-18 08:37:00.106] [info]  [App.Config] config.autostart has been configured: true
[2024-11-18 08:37:02.843] [info]  [App.Config] config.autostart has been configured: true

Additional Information

No response

@devinbinnie
Copy link
Member

@raphraph Does this reproduce on v5.10?

@raphraph
Copy link
Author

I don't know yet, I didn't get any update notification for v5.10.
But I can say that this bug has been active for a few past versions at least (I don't remember when it started...).

@devinbinnie
Copy link
Member

@raphraph Can you manually install v5.10 and try it out? There are always new fixes with new versions.

@raphraph
Copy link
Author

I just dit (it was actually available in the updates). I will report asap if it is fixed or not.

@raphraph
Copy link
Author

raphraph commented Nov 21, 2024

@devinbinnie I just tested and it still does not work.

Strangely I found this 2021 discussion on the forum which seems to answer to someone talking about this problem and stating that this is "the expected behavior"...
If that really is the expected behavior, I really don't understand what's the point of having an "auto-launch minimized" setting which behaves no differently than if there wasn't any auto-launch (same number of actions needed in order to be connected to the server and notified from incoming messages).

In the meantime I will continue to use the auto-launch setting not minimized and minimize manually the window on startup. But I find it strange that this has not been considered a bug sooner... is this working correctly on other setups ?

Thanks !

@devinbinnie
Copy link
Member

Strangely I found this 2021 discussion on the forum which seems to answer to someone talking about this problem and stating that this is "the expected behavior"...

I think what they're referring to is someone asking if the app should autostart without having been opened once in the first place, the auto start entry is added when the app is launched, so it can't add anything without first launching the app once.

As for the minimize issue, I'll have a look and see if I can reproduce.

@devinbinnie
Copy link
Member

@raphraph Okay I was able to reproduce this issue. Funny enough it has nothing to do with the minimize (which is what I would expect - the window doesn't load therefore the servers don't), but that works just fine as long as the computer has loaded.

What I'm suspecting is that Electron refuses to load views that need access to the keychain, as this prompt always pops up before the app loads:
image
This doesn't appear on Windows, and macOS doesn't have the minimize feature so this is likely unique to Linux.

Created a ticket to investigate: https://mattermost.atlassian.net/browse/MM-61957

@raphraph
Copy link
Author

@devinbinnie Thanks so much for digging this ! I'm not a developer so I won't be able to help on code but I'll be glad to help on testing things if it is necessary.

Thanks in advance to anyone taking the time to try to solve this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants