prasmussen / gdrive

Google Drive CLI Client
MIT License
8.99k stars 1.18k forks source link

Failed to get about: googleapi: got HTTP response code 400 with body: #586

Open ADSilberman opened 3 years ago

ADSilberman commented 3 years ago

I have just installed gdrive, but in my attempts to authenticate it, after inputting the verification code, this error message is displayed:

Failed to get about: googleapi: got HTTP response code 400 with body: (nothing is printed after the final colon). Thereafter, unless the .gdrive folder is deleted, every attempt to run a gdrive command is met with the same error message. (Deleting the .gdrive folder allows another attempt at authentication, but I have yet to do so successfully, with all of my attempts leading to the same issue. Reinstalling also does not fix this issue.)

The verification code is evidently correct, as any other (incorrect) code returns a different error message:

Failed getting oauth client: Failed to exchange auth code for token: oauth2: cannot fetch token: 400 Bad Request
Response: {
  "error": "invalid_grant",
  "error_description": "Bad Request"
}

Is there a way to fix this so that I can use gdrive?

Thank you.

barbalion commented 3 years ago

Same issue. Any solution yet? Windows 10.

ADSilberman commented 3 years ago

Unfortunately, no. My project has stalled since I brought up the issue.

barking-timber commented 3 years ago

I think your token expired. Lookup a file with something like cat ~/.gdrive/token_v2.json (UNIX) and see the expiry field. If it has expired, remove the file and redo any gdrive command like sync and follow Google's authentication.

barbalion commented 3 years ago

There is a valid token in the file. No sign of error/expiring. Removing and re-auth doesn't make any difference. The token is being updated, but the problem repeats.