CasaOS icon indicating copy to clipboard operation
CasaOS copied to clipboard

[Bug] Google Drive doesn't mount after authorization

Open interkelstar opened this issue 10 months ago • 4 comments
trafficstars

Describe the bug

Google Drive doesn't mount

To Reproduce

  1. Go to Files
  2. Add Google Drive
  3. Authorize
  4. Nothing is added

Logs

16T16:22:33.740+0100	error	check and mount by name error: 	{"error": "mount failed", "name": "***@gmail.com", "func": "v1.GetRecoverStorage", "file": "/home/runner/work/CasaOS/CasaOS/route/v1/recover.go", "line": 71}
16T16:24:09.997+0100	error	Then code is empty: 	{"code": "", "name": "google_drive", "func": "v1.GetRecoverStorage", "file": "/home/runner/work/CasaOS/CasaOS/route/v1/recover.go", "line": 31}
16T16:24:32.893+0100	info	get refresh token	{"res": "{\n  \"access_token\": \"***\",\n  \"expires_in\": 3599,\n  \"refresh_token\": \"***\",\n  \"scope\": \"https://www.googleapis.com/auth/drive\",\n  \"token_type\": \"Bearer\"\n}", "func": "google_drive.(*GoogleDrive).getRefreshToken", "file": "/home/runner/work/CasaOS/CasaOS/drivers/google_drive/util.go", "line": 41}
16T16:24:33.263+0100	info	resp	{"resp": "***", "func": "google_drive.(*GoogleDrive).GetUserInfo", "file": "/home/runner/work/CasaOS/CasaOS/drivers/google_drive/drive.go", "line": 79}
16T16:24:38.577+0100	error	check and mount by name error: 	{"error": "mount failed", "name": "***@gmail.com", "func": "v1.GetRecoverStorage", "file": "/home/runner/work/CasaOS/CasaOS/route/v1/recover.go", "line": 71}

interkelstar avatar Jan 16 '25 15:01 interkelstar

I get this same issue trying to connect OneDrive:

onedrive.(*Onedrive).getRefreshToken", "file": "/home/runner/work/CasaOS/CasaOS/drivers/onedrive/util.go", "line": 84} 03T04:59:58.864Z error check and mount by name error: {"error": "mount failed", "name": "[email protected]", "func": "v1.GetRecoverStorage", "file": "/home/runner/work/CasaOS/CasaOS/route/v1/recover.go", "line": 216}

smithbill17 avatar Feb 03 '25 05:02 smithbill17

I have the same issue with google drive but after the second time i tried to connect and mount.. the first time i mounted had no problems

brianmatozo avatar Apr 17 '25 23:04 brianmatozo

You could try updating the installed version of rclone using:

sudo rclone selfupdate

smithbill17 avatar Apr 18 '25 10:04 smithbill17

That didn't help, but thanks to you I now know that rclone is being used and I could fix the issue for myself by running

sudo rclone config

then deleting all listed configs, and adding my google drive throug the UI again

interkelstar avatar Apr 21 '25 19:04 interkelstar

then deleting all listed configs, and adding my google drive throug the UI again

I tried the same but google drive still did not show up as mounted. Also, this in the log suggests monting did not work check and mount by name error: {"error": "mount failed", "name": "**@gmail.com", "func": "v1.GetRecoverStorage", "file": "/home/runner/work/CasaOS/CasaOS/route/v1/recover.go", "line": 71} Did you have to do anything more than what you described?

robs23 avatar Jul 08 '25 11:07 robs23