Linux desktop client (randomly) losing login on reboot

Summary
Linux desktop client (randomly) losing login on reboot.

Steps to reproduce
Version 5.2.2 commit: 2030c66
Unable to reproduce because happens randomly.

Expected behavior
Not to loose login.

Observed behavior
Losing login
Sometimes i start my notebook and I have to login again.
Im using Mattermost since ~2 month.
The lost login problem happen like 3-4 times already.

Reboots (crashes?)
Also i have the feeling that Mattermost causing suddenly reboots on my notebook
and on the notebook (mac) of a colleague too.
Why I think that: we both no had random reboots or crashes at all.
And all the sudden we both have this sometimes.
The only thing i see we have in common is: we switched from RocketChat to Mattermost.

Today i started my notebook as every day,
I logged in (notebook login) and like 1 min later I had a reboot (crash?).
After the reboot I had to login at Mattermost again.
(The login works without any problems.)

Client environment
Version 5.2.2 commit: 2030c66
OS:
Distributor ID: Tuxedo
Description: TUXEDO OS 1
Release: 22.04
Codename: jammy
Note: tuxedo os is based on ubuntu 20.04

Mattermost is in autostart.
2auth is enabled.
RocketChat client is still installed and in autostart too.

Server environment
Mattermost server:
Mattermost Team Edition
Mattermost-Version: 7.1.5
Datenbankschema-Version: 95
Datenbank: postgres

Mattermost server settings (should be default values):
Session durch Aktivität verlängern: falsch false
Sitzungsdauer AD/LDAP und E-Mail (Stunden): 4320 hours
Sitzungsdauer Mobil (Stunden): 4320 hours
Sitzungsdauer SSO (Stunden): 720 hours
Session Cache (Minuten): 10 minutes

Questions
How can i track this down?
Are there any logs i could check on client side?

Update: was on another place, another network (WLAN),
started Notebook and was logged out.

Hi @cottton and welcome to the Mattermost forums!

Can you confirm that the server’s SiteUrl configuration option is exactly what you’re putting in the Server URL of your desktop client?
The desktop app saves some logs, so it would be good to check them to see if you can find segfaults or anything related in there that might help diagnose this issue, although having a linux system reboot usually is something more severe, like a kernel module bug which could be an indication for a graphics card/rendering issue, so you could try to disable graphics acceleration in your Mattermost client to see if that fixes the reboots for a while.

Can you confirm that the server’s SiteUrl configuration option is exactly what you’re putting in the Server URL of your desktop client?

Yes.

Logs

~/.config/Mattermost/logs/main.log (the only log found)
This is from Feb 20th, when i connected to another WLAN and had to login again:
The part with ERR_INTERNET_DISCONNECTED is interesting.

[2023-02-20 09:48:06.865] [debug] DownloadsManager.init { 'this.json': {}, validatedJSON: {} }
[2023-02-20 09:48:06.873] [debug] DownloadsManager.saveAll
[2023-02-20 09:48:06.875] [debug] DownloadsManager.checkForDeletedFiles
[2023-02-20 09:48:06.969] [info]  Log level set to: info
[2023-02-20 09:48:06.979] [info]  Log level set to: info
[2023-02-20 09:48:06.985] [warn]  Current working directory is /home/***, changing into /opt/Mattermost
[2023-02-20 09:48:07.448] [info]  config.autostart has been configured: true
[2023-02-20 09:48:07.450] [info]  config.autostart has been configured: true
[2023-02-20 09:48:07.487] [info]  Autoupgrade disabled: false
[2023-02-20 09:48:07.600] [info]  BrowserView created for server ***___TAB_MESSAGING
[2023-02-20 09:48:07.601] [info]  [***___TAB_...] Loading https://chat.***.com/
[2023-02-20 09:48:07.611] [info]  BrowserView created for server ***___TAB_FOCALBOARD
[2023-02-20 09:48:07.612] [info]  [***___TAB_...] Loading https://chat.***.com/boards
[2023-02-20 09:48:07.618] [info]  BrowserView created for server ***___TAB_PLAYBOOKS
[2023-02-20 09:48:07.619] [info]  [***___TAB_...] Loading https://chat.***.com/playbooks
[2023-02-20 09:48:07.627] [warn]  couldn't show ***___TAB_MESSAGING, not ready
[2023-02-20 09:48:07.636] [warn]  Failed to set new language en-US
[2023-02-20 09:48:07.637] [warn]  Failed to set new language DE
[2023-02-20 09:48:07.803] [info]  Can't send reload-config, will retry
[2023-02-20 09:48:07.811] [info]  Log level set to: info
[2023-02-20 09:48:07.830] [info]  config.autostart has been configured: true
[2023-02-20 09:48:08.210] [info]  [***___TAB_...] finished loading https://chat.***.com/boards
[2023-02-20 09:48:08.225] [info]  [***___TAB_...] finished loading https://chat.***.com/
[2023-02-20 09:48:08.230] [info]  [***___TAB_...] finished loading https://chat.***.com/playbooks
[2023-02-20 09:48:12.218] [info]  ***___TAB_FOCALBOARD timeout expired will show the browserview
[2023-02-20 09:48:12.233] [info]  ***___TAB_PLAYBOOKS timeout expired will show the browserview
[2023-02-20 17:22:15.684] [debug] DownloadsManager.init { 'this.json': {}, validatedJSON: {} }
[2023-02-20 17:22:15.702] [debug] DownloadsManager.saveAll
[2023-02-20 17:22:15.704] [debug] DownloadsManager.checkForDeletedFiles
[2023-02-20 17:22:15.854] [info]  Log level set to: info
[2023-02-20 17:22:15.873] [info]  Log level set to: info
[2023-02-20 17:22:15.877] [warn]  Current working directory is /home/***, changing into /opt/Mattermost
[2023-02-20 17:22:16.042] [info]  config.autostart has been configured: true
[2023-02-20 17:22:16.043] [info]  config.autostart has been configured: true
[2023-02-20 17:22:16.099] [info]  Autoupgrade disabled: false
[2023-02-20 17:22:16.197] [info]  BrowserView created for server ***___TAB_MESSAGING
[2023-02-20 17:22:16.199] [info]  [***___TAB_...] Loading https://chat.***.com/
[2023-02-20 17:22:16.210] [info]  BrowserView created for server ***___TAB_FOCALBOARD
[2023-02-20 17:22:16.212] [info]  [***___TAB_...] Loading https://chat.***.com/boards
[2023-02-20 17:22:16.221] [info]  BrowserView created for server ***___TAB_PLAYBOOKS
[2023-02-20 17:22:16.222] [info]  [***___TAB_...] Loading https://chat.***.com/playbooks
[2023-02-20 17:22:16.235] [warn]  couldn't show ***___TAB_MESSAGING, not ready
[2023-02-20 17:22:16.240] [warn]  Failed to set new language en-US
[2023-02-20 17:22:16.241] [warn]  Failed to set new language DE
[2023-02-20 17:22:16.390] [info]  Can't send reload-config, will retry
[2023-02-20 17:22:16.400] [info]  Log level set to: info
[2023-02-20 17:22:16.425] [info]  config.autostart has been configured: true
[2023-02-20 17:22:16.472] [info]  Can't send load_retry, will retry
[2023-02-20 17:22:16.473] [info]  [***___TAB_...] failed loading https://chat.***.com/: Error: ERR_INTERNET_DISCONNECTED (-106) loading 'https://chat.***.com/', retrying in 5 seconds
[2023-02-20 17:22:16.515] [info]  Can't send load_retry, will retry
[2023-02-20 17:22:16.515] [info]  [***___TAB_...] failed loading https://chat.***.com/boards: Error: ERR_INTERNET_DISCONNECTED (-106) loading 'https://chat.***.com/boards', retrying in 5 seconds
[2023-02-20 17:22:16.541] [info]  Can't send load_retry, will retry
[2023-02-20 17:22:16.541] [info]  [***___TAB_...] failed loading https://chat.***.com/playbooks: Error: ERR_INTERNET_DISCONNECTED (-106) loading 'https://chat.***.com/playbooks', retrying in 5 seconds
[2023-02-20 17:22:21.990] [info]  [***___TAB_...] finished loading https://chat.***.com/
[2023-02-20 17:22:21.997] [info]  [***___TAB_...] finished loading https://chat.***.com/boards
[2023-02-20 17:22:22.001] [info]  [***___TAB_...] finished loading https://chat.***.com/playbooks
[2023-02-20 17:22:23.861] [info]  hide back button
[2023-02-20 17:22:23.865] [info]  hide back button
[2023-02-20 17:22:25.993] [info]  ***___TAB_MESSAGING timeout expired will show the browserview
[2023-02-20 17:22:25.998] [info]  ***___TAB_FOCALBOARD timeout expired will show the browserview
[2023-02-20 17:22:26.003] [info]  ***___TAB_PLAYBOOKS timeout expired will show the browserview
[2023-02-20 17:22:32.128] [warn]  main window closed
[2023-02-20 17:33:25.835] [debug] DownloadsManager.init { 'this.json': {}, validatedJSON: {} }
[2023-02-20 17:33:25.841] [debug] DownloadsManager.saveAll
[2023-02-20 17:33:25.842] [debug] DownloadsManager.checkForDeletedFiles
[2023-02-20 17:33:25.950] [info]  Log level set to: info
[2023-02-20 17:33:25.960] [info]  Log level set to: info
[2023-02-20 17:33:25.964] [warn]  Current working directory is /home/***, changing into /opt/Mattermost
[2023-02-20 17:33:26.110] [info]  config.autostart has been configured: true
[2023-02-20 17:33:26.112] [info]  config.autostart has been configured: true
[2023-02-20 17:33:26.136] [info]  Autoupgrade disabled: false
[2023-02-20 17:33:26.205] [info]  BrowserView created for server ***___TAB_MESSAGING
[2023-02-20 17:33:26.207] [info]  [***___TAB_...] Loading https://chat.***.com/
[2023-02-20 17:33:26.215] [info]  BrowserView created for server ***___TAB_FOCALBOARD
[2023-02-20 17:33:26.217] [info]  [***___TAB_...] Loading https://chat.***.com/boards
[2023-02-20 17:33:26.223] [info]  BrowserView created for server ***___TAB_PLAYBOOKS
[2023-02-20 17:33:26.224] [info]  [***___TAB_...] Loading https://chat.***.com/playbooks
[2023-02-20 17:33:26.230] [warn]  couldn't show ***___TAB_MESSAGING, not ready
[2023-02-20 17:33:26.236] [warn]  Failed to set new language en-US
[2023-02-20 17:33:26.237] [warn]  Failed to set new language DE
[2023-02-20 17:33:26.601] [info]  opening ***___TAB_FOCALBOARD on hasFocalboard
[2023-02-20 17:33:26.602] [info]  opening ***___TAB_PLAYBOOKS on hasPlaybooks
[2023-02-20 17:33:26.617] [info]  Can't send reload-config, will retry
[2023-02-20 17:33:26.623] [info]  Log level set to: info
[2023-02-20 17:33:26.636] [info]  config.autostart has been configured: true
[2023-02-20 17:33:26.829] [info]  [***___TAB_...] finished loading https://chat.***.com/playbooks
[2023-02-20 17:33:26.850] [info]  [***___TAB_...] finished loading https://chat.***.com/boards
[2023-02-20 17:33:26.862] [info]  [***___TAB_...] finished loading https://chat.***.com/
[2023-02-20 17:33:30.799] [info]  hide back button
[2023-02-20 17:33:30.835] [info]  hide back button
[2023-02-20 17:33:30.838] [info]  ***___TAB_PLAYBOOKS timeout expired will show the browserview
[2023-02-20 17:33:30.870] [info]  ***___TAB_FOCALBOARD timeout expired will show the browserview
[2023-02-20 17:33:30.871] [info]  ***___TAB_MESSAGING timeout expired will show the browserview
[2023-02-20 17:33:30.981] [info]  hide back button
[2023-02-20 17:35:22.698] [info]  [***___TAB_...] Loading https://chat.***.com/boards
[2023-02-20 17:35:22.700] [info]  [***___TAB_...] Loading https://chat.***.com/playbooks
[2023-02-20 17:35:22.788] [info]  hide back button
[2023-02-20 17:35:22.792] [info]  hide back button
[2023-02-20 17:35:23.047] [info]  [***___TAB_...] finished loading https://chat.***.com/playbooks
[2023-02-20 17:35:23.075] [info]  [***___TAB_...] finished loading https://chat.***.com/boards
[2023-02-20 17:35:27.050] [info]  ***___TAB_PLAYBOOKS timeout expired will show the browserview
[2023-02-20 17:35:27.076] [info]  ***___TAB_FOCALBOARD timeout expired will show the browserview
[2023-02-20 20:24:55.755] [debug] DownloadsManager.init { 'this.json': {}, validatedJSON: {} }
[2023-02-20 20:24:55.765] [debug] DownloadsManager.saveAll
[2023-02-20 20:24:55.766] [debug] DownloadsManager.checkForDeletedFiles
[2023-02-20 20:24:55.866] [info]  Log level set to: info
[2023-02-20 20:24:55.879] [info]  Log level set to: info
[2023-02-20 20:24:55.882] [warn]  Current working directory is /home/***, changing into /opt/Mattermost
[2023-02-20 20:24:56.261] [info]  config.autostart has been configured: true
[2023-02-20 20:24:56.262] [info]  config.autostart has been configured: true
[2023-02-20 20:24:56.319] [info]  Autoupgrade disabled: false
[2023-02-20 20:24:56.476] [info]  BrowserView created for server ***___TAB_MESSAGING
[2023-02-20 20:24:56.477] [info]  [***___TAB_...] Loading https://chat.***.com/
[2023-02-20 20:24:56.491] [info]  BrowserView created for server ***___TAB_FOCALBOARD
[2023-02-20 20:24:56.492] [info]  [***___TAB_...] Loading https://chat.***.com/boards
[2023-02-20 20:24:56.498] [info]  BrowserView created for server ***___TAB_PLAYBOOKS
[2023-02-20 20:24:56.499] [info]  [***___TAB_...] Loading https://chat.***.com/playbooks
[2023-02-20 20:24:56.510] [warn]  couldn't show ***___TAB_MESSAGING, not ready
[2023-02-20 20:24:56.518] [warn]  Failed to set new language en-US
[2023-02-20 20:24:56.518] [warn]  Failed to set new language DE
[2023-02-20 20:24:56.832] [info]  opening ***___TAB_FOCALBOARD on hasFocalboard
[2023-02-20 20:24:56.833] [info]  opening ***___TAB_PLAYBOOKS on hasPlaybooks
[2023-02-20 20:24:56.866] [info]  Log level set to: info
[2023-02-20 20:24:56.881] [info]  config.autostart has been configured: true
[2023-02-20 20:24:57.085] [info]  [***___TAB_...] finished loading https://chat.***.com/playbooks
[2023-02-20 20:24:57.094] [info]  [***___TAB_...] finished loading https://chat.***.com/boards
[2023-02-20 20:24:57.108] [info]  [***___TAB_...] finished loading https://chat.***.com/
[2023-02-20 20:25:01.089] [info]  ***___TAB_PLAYBOOKS timeout expired will show the browserview
[2023-02-20 20:25:01.095] [info]  ***___TAB_FOCALBOARD timeout expired will show the browserview
[2023-02-20 20:25:01.110] [info]  ***___TAB_MESSAGING timeout expired will show the browserview
[2023-02-20 20:27:09.806] [warn]  main window closed
[2023-02-20 20:28:15.716] [debug] DownloadsManager.init { 'this.json': {}, validatedJSON: {} }
[2023-02-20 20:28:15.725] [debug] DownloadsManager.saveAll
[2023-02-20 20:28:15.726] [debug] DownloadsManager.checkForDeletedFiles
[2023-02-20 20:28:15.814] [info]  Log level set to: info
[2023-02-20 20:28:15.822] [info]  Log level set to: info
[2023-02-20 20:28:15.825] [warn]  Current working directory is /home/***, changing into /opt/Mattermost
[2023-02-20 20:28:16.262] [info]  config.autostart has been configured: true
[2023-02-20 20:28:16.263] [info]  config.autostart has been configured: true
[2023-02-20 20:28:16.332] [info]  Autoupgrade disabled: false
[2023-02-20 20:28:16.450] [info]  BrowserView created for server ***___TAB_MESSAGING
[2023-02-20 20:28:16.452] [info]  [***___TAB_...] Loading https://chat.***.com/
[2023-02-20 20:28:16.469] [info]  BrowserView created for server ***___TAB_FOCALBOARD
[2023-02-20 20:28:16.471] [info]  [***___TAB_...] Loading https://chat.***.com/boards
[2023-02-20 20:28:16.480] [info]  BrowserView created for server ***___TAB_PLAYBOOKS
[2023-02-20 20:28:16.481] [info]  [***___TAB_...] Loading https://chat.***.com/playbooks
[2023-02-20 20:28:16.491] [warn]  couldn't show ***___TAB_MESSAGING, not ready
[2023-02-20 20:28:16.501] [warn]  Failed to set new language en-US
[2023-02-20 20:28:16.501] [warn]  Failed to set new language DE
[2023-02-20 20:28:16.824] [info]  opening ***___TAB_FOCALBOARD on hasFocalboard
[2023-02-20 20:28:16.825] [info]  opening ***___TAB_PLAYBOOKS on hasPlaybooks
[2023-02-20 20:28:16.862] [info]  Can't send reload-config, will retry
[2023-02-20 20:28:16.876] [info]  Log level set to: info
[2023-02-20 20:28:16.911] [info]  config.autostart has been configured: true
[2023-02-20 20:28:17.203] [info]  [***___TAB_...] finished loading https://chat.***.com/boards
[2023-02-20 20:28:17.213] [info]  [***___TAB_...] finished loading https://chat.***.com/playbooks
[2023-02-20 20:28:17.226] [info]  [***___TAB_...] finished loading https://chat.***.com/
[2023-02-20 20:28:21.215] [info]  ***___TAB_PLAYBOOKS timeout expired will show the browserview
[2023-02-20 20:28:21.230] [info]  ***___TAB_MESSAGING timeout expired will show the browserview

EDIT:
All unique errors codes found in the complete log:

Error: ERR_NETWORK_CHANGED (-21)
Error: ERR_INTERNET_DISCONNECTED (-106)
Error: ERR_NAME_NOT_RESOLVED (-105)

I have the feeling that the autostart could be a problem.
Something like “staring too soon” or so. And perhaps the stored login gets overwritten then?
I disabled the autostart for (old)RocketChat and Mattermost in the system (linux settings).
I then saw on the next reboot that mattermost still was auto starting.
I disabled the mattermost autostart in the mattermost app (“start app on login”).

so you could try to disable graphics acceleration in your Mattermost client to see if that fixes the reboots for a while.

First i will leave it on NOT autostart to see if the problem still exists.
If still exists then i will try with the graphics acceleration setting disabled.


So far no lost login.
I will post an update as soon i know more.
Thank you for your time =)

Yes, these messages clearly indicate that Mattermost has been started before the network was available, but you should not need to re-login then.
Is there maybe a HTTP landing page or something like this in your WLAN which would cause the Mattermost client to think that the server connection was invalid?

Let’s see if removing the autostart helped :slight_smile: :popcorn:

I forgot about this …
no more lost logins happen anymore.

I did not try to use auto start for mattermost ect.
Im just happy that everything works.

Thanks for reporting that removing Mattermost from the autostart helped - marking this issue as resolved now.