Joplin Cloud Credentials are invalid - can't sync Android app with Windows

Operating system

Android

Joplin version

3.5.8

Desktop version info

Joplin 3.5.13 (prod, win32)

Device: win32, Intel(R) Core(TM) m3-6Y30 CPU @ 0.90GHz
Client ID: b5060e13c37e445c9cfb7add4e957ca7
Sync Version: 3
Profile Version: 49
Keychain Supported: Yes
Alternative instance ID: -

Revision: 0c1511f

Backup: 1.5.1
Freehand Drawing: 4.2.0
Inline tags: 1.3.0
Kanban: 1.1.0
Quick Links: 1.3.2
Templates: 2.4.0
Text Colorize: 1.2.5

Sync target

Joplin Cloud

What issue do you have?

My desktop app seems to work fine but I can't get the Android app to sync. I go thru the process of authorising the android device and I can see the app is authorised in the Joplin Cloud web interface but the Android app keeps telling me that the Joplin Cloud Credentials are invalid. I've tried authorising countless times.

Could you try to logout from Joplin Cloud website and try again?

Also could you provide some screenshots showing the error?

Hi Laurent
I’ve logged out and back in, still doesn’t work.

This is the screenshot from Joplin Cloud

Here is the screenshot from my phone

This is strange, would you like providing the logs?

Yes please. Here is the log from my phone. Is this what you need? Happy to provide anything else.

mobile-log.log (91.4 KB)

Would you be able to provide a video of the whole login flow from the moment you click on "Authorise"? The strange thing is that the log doesn't show anything about you trying to connect so I think the app somehow is killed by the system when the browser is opened. When you go back to the app, on which screen is it?

I'm trying a possible fix here: Mobile: Fix Joplin Cloud login failing when Android kills the app during OAuth by laurent22 · Pull Request #15111 · laurent22/joplin · GitHub

I will let you know when the Android app is ready with this fix

Thanks Laurent! I went to video my failed sync and it started working. Your fix worked!

I didn't actually change anything yet but it's good if it works. What phone do you use by the way? I'm asking because I think what happens is that the OS closes the app when you open the browser (to free up memory), which means is never gets a chance to check if login was successful or not. But that behaviour could be random which is why now it works.

It would still be useful to know what phone you have to see if we can replicate it in similar devices

Sure. moto g9 plus (XT2087-2)

Would you like the logs again?

I'm not sure what changed but I'd be trying for months without success.