Starting about two weeks ago, AquaMail has been reporting the dreaded 'The login (OAUTH2) server returned something strange' when connecting to Office365 (well, Office362 1/2 or so but we'll be generous). Logging reports:
(Timestamp) BackgroundOAuthHelper_Web Checking OAUTH token for org.kman.AquaMail.mail.MailAccount@5bb5a: id = 1, username = XXXXXXXX, email = XXXXXXXX, name = XXXXXXXX, [ oauth = org.kman.AquaMail.core.OAuthData@322618b, uid = XXXXXXXX, email = XXXXXXXX, access = yes, refresh = yes ], is system = false
(Timestamp) OAuthService_MSAL TokenExpireTimeMills: org.kman.AquaMail.core.OAuthData@d53533c, uid = XXXXXXXX, email = XXXXXXXX, access = yes, refresh = yes
(Timestamp) OAuthService_MSAL acquire account
(Timestamp) OAuthService_MSAL Account lookup failed
(Timestamp) BackgroundOAuthHelper_Web Unrecoverable authentication exception
org.kman.AquaMail.mail.oauth.z$c: The login (OAUTH2) server returned something strange
at org.kman.AquaMail.mail.oauth.z.f(SourceFile:10)
at org.kman.AquaMail.mail.oauth.d.f(SourceFile:68)
at org.kman.AquaMail.mail.ews.h.U(SourceFile:131)
at org.kman.AquaMail.mail.ews.EwsCmd.c0(SourceFile:18)
at org.kman.AquaMail.mail.ews.EwsTask.A0(SourceFile:16)
at org.kman.AquaMail.mail.ews.EwsTask_Sync.i1(SourceFile:44)
at org.kman.AquaMail.mail.ews.EwsTask_Sync.h1(SourceFile:42)
at org.kman.AquaMail.mail.ews.EwsTask_Sync.U(SourceFile:167)
at org.kman.AquaMail.core.o.b(SourceFile:60)
at org.kman.AquaMail.core.p$c.run(SourceFile:71)
at java.lang.Thread.run(Thread.java:1012)
Going through the web login process to Office365 as part of the AquaMail account setup process results in things working again for anything from 30 minutes to five or six hours, so it could be something to do with tokens expiring.