We're Hiring!

Mattermost, Inc.

Invalid or expired session, please login again. - Only on Desktop App

Summary

Some Users are not able to login into windows Desktop Application.

Steps to reproduce

  • configure SSL certificate.
  • Letsencrypt script ran in background and New SSL Certificate achieved.
  • Unknown reason : mattermost not working on 443
  • from Config.json port changed - Disabled Letsencrypt and TLS
  • Try to login with new Port number, on Browser - Works.
  • Try to login into desktop application - It constantly says Invalid or Expired Session.
  • Cleared all the sessions on the Database from sessions table. - Still the same.
  • upgrade Mattermost - Still the same, currently running on the latest version
    Mattermost Version: 5.26.0
    Database Schema Version: 5.26.0

Expected behavior

It should allow everyone to use Desktop application and browser at their own choice.

Currently its forcing to use Browser only.

Observed behavior

  • Letsencrypt renew failed
  • Manually completed.
  • New Certificates didn’t work with mattermost service.
  • Rebooted and restarted services.
  • Still no luck. No documentation available for this either.
  • Upgrade of Mattermost service done.
  • Port changed
  • Able to use mattermost without https on different port.
  • But can’t login into Desktop application.

Error message:

“level”:“info”,“ts”:1598247488.0456123,“caller”:“mlog/log.go:176”,“msg”:“Invalid session”,“error”:“GetSession: Invalid session token=9dc10xi9cfr98rfe5hxgn81ue, err=, idle timeout”}
{“level”:“info”,“ts”:1598247488.1764612,“caller”:“mlog/log.go:176”,“msg”:“Invalid session”,“error”:"GetSession: Invalid session token=9dc10xi9cfr98rfe5hxgn81ue, err=, "}
{“level”:“info”,“ts”:1598247488.199428,“caller”:“mlog/log.go:176”,“msg”:“Invalid session”,“error”:"GetSession: Invalid session token=9dc10xi9cfr98rfe5hxgn81ue, err=, "}
{“level”:“info”,“ts”:1598247488.2092304,“caller”:“mlog/log.go:176”,“msg”:“Invalid session”,“error”:"GetSession: Invalid session token=9dc10xi9cfr98rfe5hxgn81ue, err=, "}
{“level”:“info”,“ts”:1598247488.4844508,“caller”:“mlog/log.go:176”,“msg”:“Invalid session”,“error”:"GetSession: Invalid session token=9dc10xi9cfr98rfe5hxgn81ue, err=, "}
{“level”:“info”,“ts”:1598247488.4875987,“caller”:“mlog/log.go:176”,“msg”:“Invalid session”,“error”:"GetSession: Invalid session token=9dc10xi9cfr98rfe5hxgn81ue, err=, "}
{“level”:“info”,“ts”:1598247488.4884427,“caller”:“mlog/log.go:176”,“msg”:“Invalid session”,“error”:"GetSession: Invalid session token=9dc10xi9cfr98rfe5hxgn81ue, err=, "}

Please point me in right direction how to get this solved.

Also, if anyone has experience similar issue with Letsencrypt, please recommend how to resolve this.

Centos
nginx
letsencrypt
mattermost
mysql

all in local enviornment.

Found the solution.

  • This is not a solution but this is how I made it work with Desktop Applications.

After I read the error on both side, on my, I decided to Clear Storage on the local application.

And it allowed to login again.

Steps to fix :

  1. Go to Desktop application
  2. Go to File -> View -> Developer tools for current Server
  3. Go to Application
  4. There’s a button -> Clear Storage. Click on it.
    Now try to login again,.

Due to some reason re-installation of application doesn’t clear this.

But it allowed me to login after this.

I am keeping this thread open for Mattermost so this can be noted.