Android app - frequent loss of authorization for connected sites

Occasionally, my Android app will forget about the authorization it holds for my Discourse sites and I’ll have to reauthorize it.

Here’s the list of the dates I’ve had to reauthorize it on meta:

Approved: Jul 22
Approved: Sep 9
Approved: Sep 14
Approved: Sep 19
Approved: Sep 26
Approved: Oct 18
Approved: Oct 19
Approved: Nov 9
Approved: Nov 15
Approved: Nov 16
Approved: Nov 24
Approved: Nov 30
Approved: Dec 7

and on another site:

Approved: Sep 14
Approved: Sep 26
Approved: Nov 9
Approved: Nov 18
Approved: Nov 30
Approved: Oct 19
Approved: Nov 15
Approved: Dec 7
Approved: Jul 22
Approved: Sep 19
Approved: Sep 9
Approved: Oct 18
Approved: Nov 24

It seems to happen at the same time for all sites in the list, so I think something is happening on the phone that wipes out the authorization.

Current Chrome version: 63.0.3239.83
Current Android version: 7.0.0; LG-H873 Build/NRD90U

What it’s not:

  • phone rebooting
6 Likes

Can you clarify though.

Does it say “connect” in blue when this happens? Or when you click on the site your cookie is gone?

Sounds to me like its saying “connect” there, so somehow storage for the app is blown which is very confusing @joffreyjaffeux we got to get a new version of the app out there to see if it fixes this on android?

@Falco does this happen to you?

3 Likes

Yes, everything reverts back to asking to ‘connect’. When I do connect, I just need to re-authorize the application again, I don’t need to re-login entirely.

partially… it still remembers each of the sites.

1 Like

Not Falco, but I also use the Android app quite extensively, including the two sites Michael mentioned. I saw this happen a few times in the past, but not recently. The last time I recall this happening was at least 5 months ago.

4 Likes

The one thing I really like about the Apple ecosystem is that the bugs are at least super consistent

It used to, but I haven’t seen this in a while.

1 Like

This data implies it’s something on your device destroying the local storage for the app.

Maybe try removing the app and re-installing it? I’ve seen that fix weird things with iOS apps on rare occasions.

Another option is that @supermathie does not have the absolute latest version of the app?

Yes, another problem that removing and re-installing the app would address, or at least give us more data about.

It just happened again. I noticed I hadn’t gotten any notifications in a while, fired it up, it polled the sites then reverted back to ‘Connect’ after it was rejected.

From the meta logs I see:

  • a request to message-bus (status=200): https://meta.discourse.org:443/message-bus/_ID_/poll?dlp=t
  • a request to topic_tracking_state (status=403): https://meta.discourse.org:443/users/supermathie/topic-tracking-state.json

Seems that the app didn’t lose its token, as it thought it had one, but Discourse doesn’t like it for whatever reason.

Is there any way to dump the app’s store so I can see what it thinks it has stored locally?

EDIT: currently I have 1.2.1 which was allegedly pushed on 2017-12-17 - we have a version history? It’s a wild guess but maybe new versions of the app are breaking it?

It was working for me on December 14th 2017, 22:35:31Z. It broke sometime in between then and December 20th 2017, 02:29:41Z.

EDIT again: from the logs the user-agent is: Discourse android App / 1.0 - maybe we should update that with the correct version of the application automatically.

5 Likes

Is this still an issue or can this be closed?

It’s still occasionally happening at a regular interval of once per week, let’s see:

Jan 3
Jan 11
Jan 17
Jan 24
Jan 31
Feb 7
Feb 14
Feb 23
Feb 28
Mar 7
Mar 15
Mar 22
Mar 29
5 Likes

I wonder if logged-off state might be leaking between sites? It just happened again and I happened to have debug logs accessible.

From debug logs:

…
06-07 15:44:17.928 21083 21137 I ReactNativeJS: processing incoming message on https://slurm.discourse.org
06-07 15:44:17.929 21083 21137 I ReactNativeJS: { global_id: -1,
06-07 15:44:17.929 21083 21137 I ReactNativeJS:   message_id: -1,
06-07 15:44:17.929 21083 21137 I ReactNativeJS:   channel: '/__status',
06-07 15:44:17.929 21083 21137 I ReactNativeJS:   data: 
06-07 15:44:17.929 21083 21137 I ReactNativeJS:    { '/delete': 140,
06-07 15:44:17.929 21083 21137 I ReactNativeJS:      '/recover': 6,
06-07 15:44:17.929 21083 21137 I ReactNativeJS:      '/new': 1536,
06-07 15:44:17.929 21083 21137 I ReactNativeJS:      '/latest': 25235,
06-07 15:44:17.929 21083 21137 I ReactNativeJS:      '/queue_counts': 0,
06-07 15:44:17.929 21083 21137 I ReactNativeJS:      '/flagged_counts': 3034,
06-07 15:44:17.929 21083 21137 I ReactNativeJS:      '/notification/1214': 9944,
06-07 15:44:17.929 21083 21137 I ReactNativeJS:      '/notification-alert/1214': 2065,
06-07 15:44:17.929 21083 21137 I ReactNativeJS:      '/unread/1214': 16793 } }
06-07 15:44:17.929 21083 21137 I ReactNativeJS: calling: https://slurm.discourse.org/users/Supermathie/topic-tracking-state.json
06-07 15:44:17.938 21083 21137 I ReactNativeJS: processing incoming message on https://bbs.boingboing.net
06-07 15:44:17.939 21083 21137 I ReactNativeJS: { global_id: -1,
06-07 15:44:17.939 21083 21137 I ReactNativeJS:   message_id: -1,
06-07 15:44:17.939 21083 21137 I ReactNativeJS:   channel: '/__status',
06-07 15:44:17.939 21083 21137 I ReactNativeJS:   data: 
06-07 15:44:17.939 21083 21137 I ReactNativeJS:    { '/delete': 391,
06-07 15:44:17.939 21083 21137 I ReactNativeJS:      '/recover': 19,
06-07 15:44:17.939 21083 21137 I ReactNativeJS:      '/new': 25883,
06-07 15:44:17.939 21083 21137 I ReactNativeJS:      '/latest': 878748,
06-07 15:44:17.939 21083 21137 I ReactNativeJS:      '/notification/1': 37,
06-07 15:44:17.939 21083 21137 I ReactNativeJS:      '/notification-alert/1': 1,
06-07 15:44:17.939 21083 21137 I ReactNativeJS:      '/unread/1': 520 } }
06-07 15:44:17.939 21083 21137 I ReactNativeJS: calling: https://bbs.boingboing.net/users/supermathie/topic-tracking-state.json
06-07 15:44:18.029 21083 21137 I ReactNativeJS: failed to get tracking state User was logged off!
06-07 15:44:18.029 21083 21137 I ReactNativeJS: failed to refresh https://discuss.elastic.co
06-07 15:44:18.030 21083 21137 I ReactNativeJS: User was logged off!
06-07 15:44:18.043 21083 21137 I ReactNativeJS: failed to get tracking state User was logged off!
06-07 15:44:18.043 21083 21137 I ReactNativeJS: failed to refresh https://discourse.something.ca
06-07 15:44:18.043 21083 21137 I ReactNativeJS: User was logged off!
06-07 15:44:18.051 21083 21137 I ReactNativeJS: failed to get tracking state User was logged off!
06-07 15:44:18.051 21083 21137 I ReactNativeJS: User was logged off!
06-07 15:44:18.081 21083 21137 I ReactNativeJS: failed to get tracking state User was logged off!
06-07 15:44:18.082 21083 21137 I ReactNativeJS: failed to refresh https://meta.discourse.org
06-07 15:44:18.082 21083 21137 I ReactNativeJS: User was logged off!
…
3 Likes

This has been happening to me for quite some time and is still going on. I believe I have been using the latest version of the app most of the time (I definitely am now and it just happened again).

https://meta.discourse.org/t/why-do-i-keep-getting-logged-out/89281?u=tophee

3 Likes

Is stuff any better with the latest beta?

3 Likes

@supermathie is this still going on?

3 Likes

I now use the PWAs instead of the app :slight_smile:

6 Likes