Problem wit google drive

<I did try to find my issue in the forum, but did not find it.

What is the problem you are having with rclone?

I run this command:

./Applications/RClone/rclone sync -P /Users/marcelloh/stack workspace:stack --fast-list

which should connect to my googledrive and start to sync, but it just rains errors:

: error reading destination directory: couldn't list directory: googleapi: Error 404: File not found: ., notFound
2021-08-01 01:17:54 ERROR : Google drive root 'stack': not deleting files as there were IO errors
2021-08-01 01:17:54 ERROR : Google drive root 'stack': not deleting directories as there were IO errors
2021-08-01 01:17:54 ERROR : Attempt 1/3 failed with 1 errors and: couldn't list directory: googleapi: Error 404: File not found: ., notFound

Have no idea how I can solve this :frowning:

What is your rclone version (output from rclone version)

rclone v1.55.1

  • os/type: darwin
  • os/arch: arm64
  • go/version: go1.16.3
  • go/linking: dynamic
  • go/tags: cmount

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Mac BigSur 11.5

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)

./Applications/RClone/rclone sync -P /Users/marcelloh/stack workspace:stack --fast-list

The rclone config contents with secrets removed.

workspace]
type = drive
client_id = 974844545748-gh80rm6j3p1pe90jue9um9r98uv4ukdq.apps.googleusercontent.com
client_secret = lalala
scope = drive
root_folder_id = stack
token = lalala

A log from the command with the -vv flag

./Applications/RClone/rclone sync -P /Users/marcelloh/stack workspace:stack -vv --fast-list
2021/08/01 01:32:52 DEBUG : Using config file from "/Users/marcelloh/.config/rclone/rclone.conf"
2021/08/01 01:32:52 DEBUG : rclone: Version "v1.55.1" starting with parameters ["./Applications/RClone/rclone" "sync" "-P" "/Users/marcelloh/stack" "workspace:stack" "-vv" "--fast-list"]
2021/08/01 01:32:52 DEBUG : Creating backend with remote "/Users/marcelloh/stack"
2021/08/01 01:32:52 DEBUG : Creating backend with remote "workspace:stack"
2021-08-01 01:32:53 ERROR : : error reading destination directory: couldn't list directory: googleapi: Error 404: File not found: ., notFound
2021-08-01 01:32:53 DEBUG : Google drive root 'stack': Waiting for checks to finish
2021-08-01 01:32:53 DEBUG : Google drive root 'stack': Waiting for transfers to finish
2021-08-01 01:32:53 ERROR : Google drive root 'stack': not deleting files as there were IO errors
2021-08-01 01:32:53 ERROR : Google drive root 'stack': not deleting directories as there were IO errors
2021-08-01 01:32:53 ERROR : Attempt 1/3 failed with 1 errors and: couldn't list directory: googleapi: Error 404: File not found: ., notFound
2021-08-01 01:32:53 ERROR : : error reading destination directory: couldn't list directory: googleapi: Error 404: File not found: ., notFound
2021-08-01 01:32:53 DEBUG : Google drive root 'stack': Waiting for checks to finish
2021-08-01 01:32:53 DEBUG : Google drive root 'stack': Waiting for transfers to finish
2021-08-01 01:32:53 ERROR : Google drive root 'stack': not deleting files as there were IO errors
2021-08-01 01:32:53 ERROR : Google drive root 'stack': not deleting directories as there were IO errors
2021-08-01 01:32:53 ERROR : Attempt 2/3 failed with 1 errors and: couldn't list directory: googleapi: Error 404: File not found: ., notFound
2021-08-01 01:32:53 ERROR : : error reading destination directory: couldn't list directory: googleapi: Error 404: File not found: ., notFound
2021-08-01 01:32:53 DEBUG : Google drive root 'stack': Waiting for checks to finish
2021-08-01 01:32:53 DEBUG : Google drive root 'stack': Waiting for transfers to finish
2021-08-01 01:32:53 ERROR : Google drive root 'stack': not deleting files as there were IO errors
2021-08-01 01:32:53 ERROR : Google drive root 'stack': not deleting directories as there were IO errors
2021-08-01 01:32:53 ERROR : Attempt 3/3 failed with 1 errors and: couldn't list directory: googleapi: Error 404: File not found: ., notFound
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         1.0s
2021/08/01 01:32:53 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         1.0s

2021/08/01 01:32:53 DEBUG : 6 go routines active
2021/08/01 01:32:53 Failed to sync: couldn't list directory: googleapi: Error 404: File not found: ., notFound

The error indicates a missing directory in your remote or sync command.

I suggest you try to narrow down the issue using the lsd command like this:

    ./Applications/RClone/rclone lsd workspace:

Does the command give any errors?
Do you see the stack folder in the directory listing?

./Applications/RClone/rclone lsd workspace:

2021/08/02 09:10:12 ERROR : : error listing: couldn't list directory: googleapi: Error 404: File not found: ., notFound

2021/08/02 09:10:12 Failed to lsd with 2 errors: last error was: couldn't list directory: googleapi: Error 404: File not found: ., notFound

Perhaps it does this as a wrong user (I have 2  Gdrive accounts) and only 1 has that configuration which I wanted to use with rclone

You are right, the error indicates that the stack folder doesn’t exist in the root of the account you are using.

I suggest you create a new remote (E.g. myGoogleDrive) where you leave the root_folder blank, and then verify the setup like this:

        ./Applications/RClone/rclone config show myGoogleDrive:

The config should be identical to the one in your first post, except there should be no line with root_folder_id.

Then verify the access and content of the remote like this:

        ./Applications/RClone/rclone lsd myGoogleDrive:

The directory listing hopefully completes without error and includes the stack folder (if you are using the right account).

Still the same error. How would rclone know which account to use?

Strange, please post the (redacted) output from these commands:

./Applications/RClone/rclone version -vv
./Applications/RClone/rclone config show myGoogleDrive:
./Applications/RClone/rclone lsd myGoogleDrive: -vv
./Applications/RClone/rclone lsl myGoogleDrive: --max-depth=1
./Applications/RClone/rclone version -vv
2021/08/02 10:46:49 DEBUG : Using config file from "/Users/marcelloh/.config/rclone/rclone.conf"
2021/08/02 10:46:49 DEBUG : rclone: Version "v1.55.1" starting with parameters ["./Applications/RClone/rclone" "version" "-vv"]
rclone v1.55.1
- os/type: darwin
- os/arch: arm64
- go/version: go1.16.3
- go/linking: dynamic
- go/tags: cmount
2021/08/02 10:46:49 DEBUG : rclone: Version "v1.55.1" finishing with parameters ["./Applications/RClone/rclone" "version" "-vv"]

./Applications/RClone/rclone config show workspace
--------------------
[workspace]
type = drive
client_id = secretstuff.apps.googleusercontent.com
client_secret = secretstuff
scope = drive
token = {"access_token":"ya29.a0ARrdaM_MGLShH-N9HACRHXBGDEXzi4ymxkoIZIRl2dukcE7OK2ejK4ZFDj2uz6vYTDhsUVVpF24sQzTPjJJW0mnQgPyVydm47jyVhPc3dMCcY7dXLys6a0Ss8t6W6-psCPVcQ8kUv1Fu9nEKJeGxJzTia-3h","token_type":"Bearer","refresh_token":"1//09UJzuexCz0UCCgYIARAAGAkSNwF-L9Ir_0AV5wFcM3P5BKsbVbx1llckOnIDxJOo1-5FRkOmP6x_l_b_Go2p2MR4eWe_K1PrOY8","expiry":"2021-08-02T11:46:31.409858+02:00"}
--------------------

/Applications/RClone/rclone lsd workspace: -vv     
2021/08/02 10:48:41 DEBUG : Using config file from "/Users/marcelloh/.config/rclone/rclone.conf"
2021/08/02 10:48:41 DEBUG : rclone: Version "v1.55.1" starting with parameters ["./Applications/RClone/rclone" "lsd" "workspace:" "-vv"]
2021/08/02 10:48:41 DEBUG : Creating backend with remote "workspace:"
2021/08/02 10:48:41 DEBUG : Google drive root '': root_folder_id = "0ABEQKDKjI_gnUk9PVA" - save this in the config to speed up startup
          -1 2021-07-30 11:52:44        -1 stack
2021/08/02 10:48:42 DEBUG : 6 go routines active

./Applications/RClone/rclone lsl workspace: --max-depth=1
..nothing..

Looks good and now there are no errors, and the stack folder exists in your root folder :slight_smile:

Unfortunately, the token is a secret that should never be shared - it gives access to your data without username, password and 2FA.

I therefore recommend you immediately log into https://myaccount.google.com/permissions and revoke access for your personal client ID and then recreate your rclone remote to get access again.

You can verify the recreated remote with these commands:

./Applications/RClone/rclone config show myGoogleDrive:
./Applications/RClone/rclone lsd myGoogleDrive: -vv

No need to post the output if the second command shows the same as last time.

That's what I don't like about rclone: there is no command to show the config without secret details :frowning: So if a sender makes a mistake in that, the sender will have to do things all over again.
Anyway, I hope by doing this all over, it will still work. (Thanks for the help so far)

But now I'm looking at the instructions to add everything to Google, and it's not clear what I can leave it like it is, and what to delete and do over again. :frowning:

You have a valid point, I suggest you give this issue an upvote (:+1:)

especially the proposal for:

rclone config show --redacted

I would delete the remote and then create it again from scratch to get everything right.

You can reuse your client ID.

works as it should. Wow, thanks again.
Wrote a comment on that redacted issue, how helpful it would be.

Great, thanks.

I assume you mean that the remote passed the verification in this post?

If so, then please check the content of the stack folder like this:

./Applications/RClone/rclone lsl workspace:stack --max-depth=1

No need to post output at this point.
Does it have the expected content?
Do you have a stack folder in the stack folder?

It does have expected content (jnside the stack folder that I had pre-made)
and no stack-folder inside that stack-folder, so everything is good.
Syncing goes way faster that a sync with MSoft, which was to point to begin with.

Perfect!

Happy that GoogleDrive fits your needs.

I use both and actually have the opposite experience, so data and usage pattern must have a great impact.

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