One - just one of 5 - Google Drive connections keep asking for re-authorization

Hi

I have 9 different storages that I connect. 5 of those are different Google Drive accounts for clients. Everything works fine except for one Google Drive. It keeps asking me to reauthorise. What steps can I take to check my authorisation and keep this drive authorised.

Hi @nealbresler,
Since odrive will be treating token management the same for all of your Google links, it could be some specific policy on that account that is mandating reauthorization.

  • Can you send a diagnostic from the odrive tray menu? We can take a look at this particular link:
  • How often are you being prompted for this account?

I sent the diagnostic report.

As soon as I access the drive it keeps promoting me. Even if I enter the credentials it will ask again as soon as I try sync something. It appears to stop asking as soon as I login to the ODrive web console.

Hi @nealbresler,
Thanks for sending that over. I don’t see anything that sticks out yet, but installing our latest version may help with that. You can do that with the following steps:

  1. Exit odrive
  2. Download the latest version from here: https://www.odrive.com/downloaddesktop?platform=win
  3. Install

Once the dialog to reauthorize that link pops-up again, can you send another diagnostic and ping this thread?

Hi @Tony

I have installed the latest version. Not sure why I didn’t think to check for that sooner.
I also used the opportunity to Unlink that Google Drive, delete my local copy, reboot, relink the Drive and start to sync some folders.
This seems to be working well.
I can also see no errors in the sync activity log. So holding thumbs that this all did the trick.

Thanks for your assistance. I will post a final update when I have resynced all the local folders/files I need.

1 Like

Nope - it’s still happening.
The sync activity log is littered with errors such as this:
01 Feb 01:07:58PM ERROR Access token refresh attempt for /b8966511-165e-4fce-a7e5-5a8dbdb52886-63d8d8c0/0AH5WwyJA7cyHUk9PVA <class ‘src.integrations.googledrive.GoogleDriveSync9Adapter.GoogleDriveSync9Adapter’> failed due to code GD_NO_VALID_SESSION - Possible Broken Link - Throttled caused by RefreshTokenRequestException(code GD_NO_VALID_SESSION caused by GoogleDriveApiException(httpStatus 401 - {
“error”: {
“code”: 401,
“message”: “Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.”,
“errors”: [
{
“message”: “Invalid Credentials”,
“domain”: “global”,
“reason”: “authError”,
“location”: “Authorization”,
“locationType”: “header”
}
],
“status”: “UNAUTHENTICATED”
}
}

  • authError)). Retrying (0)

Hi @nealbresler,
Shoot. Can you send another diagnostic?

It is really strange that this one specific link is having this issue. Can you provide some details on this Google account?

  • Is this a personal account or a business/enterprise account?
  • If it is not personal, are you an administrator of that account?
  • Is there anything of note about this account that differentiates it from the others you are using?
  • Is the device you are on the only device that is interacting with this account? (No other computers or people using the same account, for example)
  • Any chance that the clock on your system is off? It wouldn’t have to be much. Even a small offset between the client and the Google servers can cause problems. If that was the case I would expect you to see issues with your other links, but its worth mentioning.

Hi Tony
I have sent another diagnostic.

  • It is a Google Workspace for Nonprofits account.
  • Yes, I am the Admin for that account
  • No. Some of my other accounts are also Workspace for Nonprofits and I have a Personal account
  • No, not the same account. Of course there are shared drives.
  • Unlikely, as my PC uses automatic time from a Time Server. I can’t tell which though as Windows doesn’t show that any more.

Is the session token kept in a Cookie? Could it be cleared out on a browser exit or something? ALthough this happens even if I haven’t exited anything.

Hi @nealbresler,
Thanks for sending over the diagnostic.

The way session handling works is that we are given a “refresh token” and an “access token” when you authenticate. The access token is only good for a short time (just a few hours) and the refresh token can be used to request a new access token when the old one has expired.

For this particular account, it seems like the refresh token we are given is not working correctly, so a valid new access token cannot be obtained once the initial one expires.

Since you are an admin for the account, are you able to create a new user to test with, to see if this issue is limited to just your user, or it seems to be a global account thing?

Apologies for the slow response but work got busy.

This is what I have done;

  1. I exited ODrive
  2. Renamed my local ODrive folder to Old_Odrive
  3. Uninstalled Odrive, including a registry cleanup and rebooted
  4. Installed the ODrive client and linked to my main account - nealbresler@gmail.com
  5. Things were initially looking good BUT I did pick up something weird which you will see in the video but no errors that I could discern in the ODrive Current Status log.
  6. The next day, this morning, I created a new account on Google for the upside domain - which is the one causing problems called upside@upside.org.za
  7. Linked the new upside@upside.org.za Drive storage on the Odrive interface: Google Drive - Upside Test

I will upload a screen capture video of what happens;

  1. No Righ Click menu is available in Windows Explorer BUT it is available in my Total Commander tool that is use
  2. When I click on the folder in Explorer or Right Click in Total Commander it takes an age!!! about 3min for something to happen. However - if a double click in Total Commander it opens in realtime. See the video.

Good news is that the new test folder does not ask for reauthorization. Yet.
My experience from yesterday tells me that I should wait 24 hours to know for sure. Something about your tokens expiring.

Here is my SysInfo of the PC I am using - just in case you feel it might be a system resource issue.

current_odrive_status.txt (9.7 KB)

Here is the current status log.
I will post a link to the screen video as it is too large for an upload here.

Thanks for all of this information and for your diligence in troubleshooting this @nealbresler!

  • For the context menu in Explorer, it looks like you are running Windows 11, which hides the odrive menu under “Show more options”:
    Windows 11 context menu - #2 by JeffL

  • I’m not sure why the Windows context menu is exhibiting that delayed behavior. Does it do that even when odrive is not running?

  • I wanted to clarify for the refresh token issue:
    The local client doesn’t really have a say in what is going on for token management. Our backend services are handling the refresh. The client asks the backend service to retrieve a new token, and all Google Drive token refreshes are done the same exact way. That is what makes this case so strange, since this flow is done hundreds of thousands of times a day without any reported issues from other users.

  • How is the new account behaving, so far?