Mattermost, Inc.

Mobile app 'Invalid or expired session, please login again"

Hello, i recently deployed Mattermost server 5.16.1 and when i’m trying to connect via iOS (v1.24.0) it doesnt work. Using windows desktop app is working fine as well as linux and web.

log output:
{“level”:“debug”,“ts”:1572015814.8661847,“caller”:“mlog/log.go:162”,“msg”:“Invalid or expired session, please login again.”,“path”:"/teGUqAUWn/api/v4/users/login",“request_id”:“68wiykioeiyjie66o3j4umx15h”,“ip_addr”:“37.47.47.204”,“user_id”:"",“method”:“GET”,“err_where”:"",“http_code”:401,“err_details”:“UserRequired”}

@kacper, These previous threads might help:

What iOS version are you on?

Checked both 13.1.3 (17A878) and 12.12 (16C101). 4 od 6 accouts Doesnt work on Mobile. These 2 which connected are android phones.

Do you see the error message when you try to log in?

Yes, “invalid session, please login again”

Any ideas how to solve it?

Did you have a chance to look at the links I posted earlier?

Could you try logging out of the Mattermost server and then logging back in?

For login information, what type of authentication are you using?

  • Email, LDAP, Gitlab or other service, MFA.

Are there any other server log errors which might be of interest/abnormal?

You could try turn off data retention policy temporarily while logging in.

Some users have previously reported that re-installing the app also helps resolve the issue.

Im using free Teams Edition.
Yes i’ve tried to relogin with no result. I’m using simple email authentication. Below some logs, first’s when user trying to recover password via working mobile app, second’s when try to do the same via broken app, third when trying to login also with broken app.

{"level":"debug","ts":1572347082.2420723,"caller":"web/handlers.go:60","msg":"request:","method":"POST","url":"/teGUqAUWn/api/v4/users/password/reset/send"}
{"level":"debug","ts":1572347082.2481067,"caller":"mailservice/mail.go:242","msg":"sending mail","to":"user@example.com","subject":"Zresetuj swoje hasło"}

{"level":"debug","ts":1572347090.297187,"caller":"web/handlers.go:60","msg":"request:","method":"POST","url":"/teGUqAUWn/api/v4/users/status/ids"}
{"level":"debug","ts":1572347092.6316016,"caller":"web/web.go:66","msg":"not found handler triggered","path":"/teGUqAUWn/api/v4/users/password/reset/send","code":404,"ip":"37.47.42.44"}

{"level":"debug","ts":1572356329.7553048,"caller":"mlog/log.go:162","msg":"Invalid or expired session, please login again.","path":"/teGUqAUWn/api/v4/users/login","request_id":"59d88kr8atbn3qikxo5kkzfbza","ip_addr":"37.47.42.44","user_id":"","method":"GET","err_where":"","http_code":401,"err_details":"UserRequired"}

@kacper What are your session length settings set to https://docs.mattermost.com/administration/config-settings.html#session-lengths?

    "SessionLengthWebInDays": 90,
    "SessionLengthMobileInDays": 90,
    "SessionLengthSSOInDays": 90,
    "SessionCacheInMinutes": 60,
    "SessionIdleTimeoutInMinutes": 43200,