Failed to about: About call failed: failed to read disk usage: The system cannot find the path specified

What is the problem you are having with rclone?

I have error "Failed to about: About call failed: failed to read disk usage: The system cannot find the path specified."

[BP]
type = drive
scope = drive
service_account_file = D:\Credentials\BP\bp.json
team_drive =

what's wrong?

Run the command 'rclone version' and share the full output of the command.

rclone v1.58.0

  • os/version: Microsoft Windows 7 Enterprise Service Pack 1 (64 bit)
  • os/kernel: 6.1.7601.24546 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.17.8
  • go/linking: dynamic
  • go/tags: cmount

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone about 

The rclone config contents with secrets removed.

???

A log from the command with the -vv flag

D:\RClone>rclone about BP -vv
2022/05/17 22:18:48 DEBUG : rclone: Version "v1.58.0" starting with parameters [
"rclone" "about" "BP" "-vv"]
2022/05/17 22:18:48 DEBUG : Creating backend with remote "BP"
2022/05/17 22:18:48 DEBUG : Using config file from "C:\\Users\\Dir\\AppData\\Roa
ming\\rclone\\rclone.conf"
2022/05/17 22:18:48 DEBUG : fs cache: renaming cache item "BP" to be canonical "
//?/D:/RClone/BP"
2022/05/17 22:18:48 DEBUG : 2 go routines active
2022/05/17 22:18:48 Failed to about: About call failed: failed to read disk usag
e: The system cannot find the path specified.

hello and welcome to the forum,

when you posted, there was a set of questions.
please answer them so we can help you.

1 Like

ok, those are good answers,

remote names, need to use :, the colon character
so try
rclone about BP: -vv

when using BP, rclone thinks that is a local subfolder of the current working folder.
notice this from the debug output
renaming cache item "BP" to be canonical //?/D:/RClone/BP"

D:\RClone>rclone about BP: -vv
2022/05/18 07:59:21 DEBUG : rclone: Version "v1.58.0" starting with parameters [
"rclone" "about" "BP:" "-vv"]
2022/05/18 07:59:21 DEBUG : Creating backend with remote "BP:"
2022/05/18 07:59:21 DEBUG : Using config file from "C:\Users\Dir\AppData\Roa
ming\rclone\rclone.conf"
2022/05/18 07:59:21 Failed to create file system for "BP:": drive: failed when m
aking oauth client: failed to create oauth client from service account: error pr
ocessing credentials: google: read JWT from JSON credentials: 'type' field is ""
(expected "service_account")

didn't understand

Something is wrong with JSON. Is there a JSON example for Rclone?

It sounds like the service account credentials are wrong. It should look something like this

{
  "type": "service_account",
  "project_id": "XXX",
  "private_key_id": "XXX",
  "private_key": "-----BEGIN PRIVATE KEY-----\nXXX\n-----END PRIVATE KEY-----\n",
  "client_email": "XXX@XXX.iam.gserviceaccount.com",
  "client_id": "XXX",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/XXX.iam.gserviceaccount.com"
}
1 Like

PS team drives don't support About anyway, there is no API to read usage for a team drive so when you get the auto working, rclone about will print nothing.

I downloaded my JOIN file from "API Console - Google Cloud Platform". It has two fields that I didn't find in your example file: "client_secret" and "redirect_uris".

this is a working example,

{
  "type": "service_account",
  "project_id": "redacted",
  "private_key_id": "redacted",
  "private_key": redacted",
  "client_email": "redacted.iam.gserviceaccount.com",
  "client_id": "redacted",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/redacted.iam.gserviceaccount.com"
}
1 Like

Where can I get the values โ€‹โ€‹of the "private_key_id" and "private_key" and "client_email" fields?

that file is created by google. i downloaded it as is.

and this is my remote

[gdrivesa]
type = drive
scope = drive
service_account_file = C:\data\rclone\rr\other\gdrive.sa\test01-22331-333144bb217f.json

I downloaded from goggle but it's different:

{"installed":
{"client_id":"ั…ั…ั…ั…",
"project_id":"ั…ั…ั…ั…",
"auth_uri":"ั…ั…ั…ั…",
"token_uri":"ั…ั…ั…ั…",
"auth_provider_x509_cert_url":"ั…ั…ั…ั…",
"client_secret":"ั…ั…ั…ั…",
"redirect_uris":["http://localhost"]}
}

did some quick testing, and this minimal sa file works

{
  "type": "service_account",
  "private_key": "redacted",
  "client_email": "redacted.iam.gserviceaccount.com",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadatax509/redacted.iam.gserviceaccount.com"
}

and tested as

@set RCLONE_CONFIG_GDRIVESAC_TYPE=drive
@set RCLONE_CONFIG_GDRIVESAC_SCOPE_=DRIVE
@set RCLONE_CONFIG_GDRIVESAC_SERVICE_ACCOUNT_CREDENTIALS={^
  "type": "service_account",^
  "private_key": "redacted",^
  "client_email": "redacted",^
  "client_x509_cert_url": "redacted"^
}

rclone lsd gdrivesac: -vv

DEBUG : rclone: Version "v1.58.0" starting with parameters ["C:\\data\\rclone\\rclone.exe" "lsd" "gdrivesac:" "-vv"]
DEBUG : Creating backend with remote "gdrivesac:"
DEBUG : Setting type="drive" for "gdrivesac" from environment variable RCLONE_CONFIG_GDRIVESAC_TYPE
DEBUG : Setting service_account_credentials="{  \"type\": \"service_account\",   \"private_key\": \"redacted",   \"client_email\": \"redacted\",   \"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/redacted.iam.gserviceaccount.com\"}" for "gdrivesac" from environment variable RCLONE_CONFIG_GDRIVESAC_SERVICE_ACCOUNT_CREDENTIALS
DEBUG : gdrivesac: detected overridden config - adding "{CuC71}" suffix to name
DEBUG : Using config file from "C:\\data\\rclone\\rclone.conf"
DEBUG : Setting service_account_credentials="{  \"type\": \"service_account\",   \"private_key\": \"redacted",   \"client_email\": \"redacted.gserviceaccount.com\",   \"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/redacted.iam.gserviceaccount.com\"}" for "gdrivesac" from environment variable RCLONE_CONFIG_GDRIVESAC_SERVICE_ACCOUNT_CREDENTIALS
DEBUG : Google drive root '': 'root_folder_id = redacted' - save this in the config to speed up startup
DEBUG : fs cache: renaming cache item "gdrivesac:" to be canonical "gdrivesac{CuC71}:"
          -1 2021-11-18 20:26:31        -1 test
          -1 2022-03-03 09:33:10        -1 zork
1 Like

Where can I get the values โ€‹โ€‹of the "private_key" and "client_email" fields?

There are no such fields in the file from Google.

i followed the rclone documentation; that is all i know about.

Here?

i followed these steps.
https://rclone.org/drive/#1-create-a-service-account-for-example-com

1 Like

Molte grazie!
Everything worked out!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.