Google Analytics - expired token

Hi all,

Recently, I am struggling with quite a strange error. Once I add a GA database to metabase, it'll accept the credentials(Client ID + secret + auth code), but eventually these would expire after an undefined period(sometimes it is a week or two).

image

Until now, I was simply able to try my luck with it by generating new auth code - but it stopped working for some reason and now, it won't accept new credentials whatsoever.

Recreating a fresh auth code does not help, also creating a new Client ID does not seem to be working.

Any ideas?

Hi @Piotrek44
I'm fairly sure you're having the same problem as this issue:
https://github.com/metabase/metabase/issues/14624

I have had difficulties reproducing the issue, and I think it's somehow caused by you running multiple GA databases (possibly with different Client IDs?) and then our connection code seems to get confused with the multiple tokens and doesn't correctly refresh one of them.
Could you provide more info, so I can figure out how to reproduce the problem?

Hi. Were you able to resolve this? I'm facing the exact same problem. I only have one GA database so @flamber's suggestion above can't be applied to my case.

@gid Have a look at the comments here - extremely important to backup the Metabase application database before trying to manually edit anything:
https://github.com/metabase/metabase/issues/14578

No one has provided enough information for us to be able to reproduce the problem, or logs that would indicate what causes the refresh token to fail.