Evolution fails to authenticate: "Failed to refresh access token"

Hi All,

I’ve been using Evolution email client for the past 2 years and aside from the occasional hiccup, everything had worked just fine. But from July 30th onward Evolution fails to authenticate my company’s Gmail Account.

In our company we use 2FA and up until that day I only had to login to Gmail using the AOuth2’s popup window and could then check my emails normally. But now, after I enter my L/P and then I enter my 2FA (which BTW I receive on my phone and then allow gnome’s permissions to fully access gmail), I get the error below and then I get a new pop requesting L/P again and again.

ERROR:
"Failed to open folder. The reported error was “Failed to authenticate: Failed to refresh access token. Sign to the server again, please. Detailed error: Token has been expired or revoked.”

The weird thing is that this issue ONLY happens in Evolution. Thinking it was my company’s security policies I tried Thunderbird, Betterbird, Kmail and they all work without any issues (following the exact same process: logging thru AOuth2’s popup window and then entering 2FA). It is Evolution that is driving me crazy.

Any ideas? (or even better, please help me! XD )

Hi,
that should usually fix up the things on its own, but it does not for
some reason. Try to install seahorse, then in the Passwords->Login
section search for an entry named “Evolution Data Server - Google[you@company.com]” and delete it. After that run from the
terminal evolution --force-shutdown. The next time you’ll start
Evolution you’ll be asked for the OAuth2 credentials from scratch, no
old token use.

How it works under the hood is that you go through the OAuth2 wizard
(provided by the server), then you get an authorization code, which is
used to get the token by asking some other server. As the authorization
code is fresh, it should not be expired nor revoked.

You can enable some related debugging when you run Evolution as
OAUTH2_DEBUG=1 evolution , but do not share the log anywhere, it
contains all the authentication tokens, thus the things which can be
used to log in “you” into the server.

Out of interest, you forgot to mention your Evolution version. The
current stable series in 3.56.x.

Bye,
Milan
1 Like

Thank you Milan !!!
Your solution worked like a charm!

For the record, using seahorse I found there were 2 entries of the Evolution Data Source for my company’s email address (aside from all of my other email accounts that only had a single entry each). I deleted both entries and voila! After relaunching Evolution I was prompted with the OAuth2 pop-up window and re-entered the password. Now everything works just fine.

My Evolution version is 3.56.2

Thank you VERY MUCH !!!

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.