masonr / PLEXiDRIVE

Scripts to facilitate the use of cloud storage (such as Google Drive) as storage for Plex media server
MIT License
145 stars 19 forks source link

cannot fetch to ken: 400 Bad Request #7

Closed goodpunk6 closed 7 years ago

goodpunk6 commented 7 years ago

When I run this -

> ~$ gdrive --config ~/.gdrive-main about

I get -

gdrive --config ~/.gdrive-main about
Failed to get about: Get https://www.googleapis.com/drive/v3/about?alt=json&fields=maxImportSizes%2CmaxUploadSize%2CstorageQuota%2Cuser: oauth2: cannot fetch token: 400 Bad Request
Response: {
  "error" : "invalid_grant"
}

[1]+  Stopped                 sudo rclone mount --allow-non-empty --allow-other the_matrix:/ /mnt/gdrive-main

Please not sure what to do. Anyone else having this issue?

masonr commented 7 years ago

Strange that running the gdrive command stops your rclone mount.

I'd suggest following the little guide here: https://rclone.org/drive/#making-your-own-client-id. And create your own client id / secret key for both rclone and gdrive. Then remove the gdrive token and the rclone config for the drive account and reconnect using the new id's.

Let me know how it goes.

goodpunk6 commented 7 years ago

How do I remove the token?

On May 29, 2017 9:22 PM, "Mason R" notifications@github.com wrote:

Strange that running the gdrive command stops your rclone mount.

I'd suggest following the little guide here: https://rclone.org/drive/# making-your-own-client-id. And create your own client id / secret key for both rclone and gdrive. Then remove the gdrive token and the rclone config for the drive account and reconnect using the new id's.

Let me know how it goes.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/masonr/PLEXiDRIVE/issues/7#issuecomment-304752659, or mute the thread https://github.com/notifications/unsubscribe-auth/AOZD5Wsy-hDbzKl3s-sdxCLOG2wxOn4Aks5r-29WgaJpZM4NptXr .

masonr commented 7 years ago

For rclone, when you run the rclone config command, there's an option to delete an entry.

For gdrive, simply delete the _tokenv2.json file in your config directory (i.e. ~/.gdrive-main/token_v2.json).

goodpunk6 commented 7 years ago

I don't see any json file in the /mnt/gdrive-main directory. I'll delete the entry for rclone

On May 29, 2017 11:29 PM, "Mason R" notifications@github.com wrote:

For rclone, when you run the rclone config command, there's an option to delete an entry.

For gdrive, simply delete the token_v2.json file in your config directory (i.e. ~/.gdrive-main/token_v2.json).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/masonr/PLEXiDRIVE/issues/7#issuecomment-304766503, or mute the thread https://github.com/notifications/unsubscribe-auth/AOZD5X9qsHQ45n0F436rNg3okJ79YjJLks5r-40ZgaJpZM4NptXr .

masonr commented 7 years ago

It wouldn't be in your mounted directory. It'd be in your gdrive config directory within your home directory. Might have to do a ls -a to see it. There will be a token json file in there.

goodpunk6 commented 7 years ago

Awesome. I removed it and will do the rest in the AM. I need sleep

On May 29, 2017 11:53 PM, "Mason R" notifications@github.com wrote:

It wouldn't be in your mounted directory. It'd be in your gdrive config directory within your home directory. Might have to do a la -a to see it. There will be a token json file in there.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/masonr/PLEXiDRIVE/issues/7#issuecomment-304768629, or mute the thread https://github.com/notifications/unsubscribe-auth/AOZD5W4xGRmr8rt1KqyQ--JKagBLzfmfks5r-5KjgaJpZM4NptXr .

goodpunk6 commented 7 years ago

Ok curiosity got me. That worked like a charm. Thanks for the help!!

On May 29, 2017 11:59 PM, "Manny Garcia" goodpunk6@gmail.com wrote:

Awesome. I removed it and will do the rest in the AM. I need sleep

On May 29, 2017 11:53 PM, "Mason R" notifications@github.com wrote:

It wouldn't be in your mounted directory. It'd be in your gdrive config directory within your home directory. Might have to do a la -a to see it. There will be a token json file in there.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/masonr/PLEXiDRIVE/issues/7#issuecomment-304768629, or mute the thread https://github.com/notifications/unsubscribe-auth/AOZD5W4xGRmr8rt1KqyQ--JKagBLzfmfks5r-5KjgaJpZM4NptXr .

masonr commented 7 years ago

Excellent! I'm glad it worked out. Let me know if you run into any other issues.