integration_google icon indicating copy to clipboard operation
integration_google copied to clipboard

Impossible to refresh the token

Open jrial opened this issue 4 years ago • 8 comments

I've connected the integration to my Google account, but after some days, it stops working. When I go to the data migration page, I don't see my documents/photos/contacts/... sections on the page, but get a blank page where my only option is to disconnect from Google, and some transient warnings about not being able to refresh the token:

image

I can disconnect, and reconnect, and everything looks right again:

image

But this only lasts for a couple of days, weeks? Eventually it will break again at some point, for reasons unknown.

jrial avatar Jul 09 '21 12:07 jrial

Hi, thanks for the bug report.

I never had any problem about refreshing tokens. Let's try to find out what happens on your side.

Could you upgrade to the latest nightly I just published? v1.0.4-1-nightly You can get it with this occ command (adjust to your context):

sudo -u www-data php ./occ app:update --allow-unstable integration_google

To get back to the official release, just disable, delete and reinstall the app in web app settings.

So, once you're running v1.0.4-1-nightly there will be more information in server logs when the token refresh fails. Search for lines looking like Google API error, impossible to refresh the token. Response: ... I also added one dummy request before the Data migration page load, just in case your problem is caused by multiple concurrent token refresh requests.

julien-nc avatar Jul 09 '21 13:07 julien-nc

By the way, google oauth tokens expire after one hour.

julien-nc avatar Jul 09 '21 13:07 julien-nc

I ran that command in the /var/www/nextcloud/ folder, but it doesn't produce any output, and my app version remains at 1.02. Is there any other way I could apply this update?

jrial avatar Jul 12 '21 06:07 jrial

I should have mentioned this nightly is only compatible with NC 22.

Yes there is another way but it will still not work if you're running NC 20 or 21 :grin:.

julien-nc avatar Jul 12 '21 07:07 julien-nc

Ah, in that case I can't really debug. My installation tracks the stable channel, so I'm still on 20.

jrial avatar Jul 12 '21 08:07 jrial

Too bad. Just in case you are motivated and have some minutes to spare: It is really quick to install a local test instance of 22 using a SQLite database.

julien-nc avatar Jul 12 '21 08:07 julien-nc

I also have this exact same issue - I do have 2FA enabled on my Google Account - that wouldn't be the issue right?

ingsocdev avatar Jul 18 '21 12:07 ingsocdev

I had this issue, and checked the Google Oauth settings. In my case my application was in test mode, and promoting it to production made the error disappear. I will comment again if it re-appears.

richardneish avatar May 16 '22 09:05 richardneish

Hello :wave: This issue appears to have had no activity for 3 months. We cannot keep track of whether individual issues have resolved themselves or still require attention without user interaction. We're thus adding the stale label to this issue to schedule it for getting closed in 5 days time. If you believe this issue is still valid and should be fixed, you can add a comment or remove the label to avoid it getting closed.

Cheers :blue_heart:

github-actions[bot] avatar Jun 02 '23 02:06 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Jun 07 '23 02:06 github-actions[bot]