OneDrive Crypt Move/Copy = async operation completed but readMetaData failed: object not found

What is the problem you are having with rclone?

On OneDrive Business, when trying to move folders/files between 2 drives (authenticated by and shared with the same user) the operation results in the following error for each file:

async operation completed but readMetaData failed: object not found

However, the files are actually transferred and available on the target backend. Only, due to this error the source file is not deleted with a move command.

Additional note:
This is reproduceable on OneDrive Busniess crypt remotes.
I did a lot of testing and was able to successfully complete the operation one-time, when doing a move operation between 2 OneDrive unencrypted remotes. The first attempt failed with the error above, but the automatic 2nd attempt succeeded. Unfortunately, I did not store the Log of this.
This makes me wonder if it is a timing issue that is especially present when encryption is involved. i.e. rclone tries to read the object, which takes some time until it is visible a the destination.

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

rclone v1.64.0

  • os/version: debian 12.1 (64 bit)
  • os/kernel: 6.1.0-12-amd64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.21.1
  • go/linking: static
  • go/tags: none

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

OneDrive for Business

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

$ rclone move crypt1:test crypt2:test -P -vv --log-file move.log --server-side-across-configs
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Checks:                 7 / 7, 100%
Deleted:                2 (files), 0 (dirs)
Elapsed time:        25.1s

The rclone config contents with secrets removed.

[onedrive1]
type = onedrive
client_id = <REDACTED>
client_secret = <REDACTED>
auth_url = https://login.microsoftonline.com/<REDACTED>/oauth2/v2.0/authorize
token_url = https://login.microsoftonline.com/<REDACTED>/oauth2/v2.0/token
drive_type = business
no_versions = true
link_scope = organization
av_override = true
token = {"access_token":<REDACTED>}
drive_id = <REDACTED>
server_side_across_configs = true

[crypt1]
type = crypt
remote = onedrive1:crypt
password = <REDACTED>
password2 = <REDACTED>
filename_encoding = base32768
suffix = none
server_side_across_configs = true

[onedrive2]
type = onedrive
client_id = <REDACTED> -> same as for "onedrive1"
client_secret = <REDACTED> -> same as for "onedrive1"
auth_url = https://login.microsoftonline.com/<REDACTED>/oauth2/v2.0/authorize
token_url = https://login.microsoftonline.com/<REDACTED>/oauth2/v2.0/token
drive_type = business
no_versions = true
link_scope = organization
av_override = true
token = {"access_token":<REDACTED>}
drive_id = <REDACTED>
root_folder_id = <REDACTED> -> shared folder
server_side_across_configs = true

[crypt2]
type = crypt
remote = onedrive2:crypt
password = <REDACTED>  -> same as for "crypt1"
password2 = <REDACTED>  -> same as for "crypt1"
filename_encoding = base32768
suffix = none
server_side_across_configs = true

A log from the command with the -vv flag

2023/09/29 15:06:47 DEBUG : rclone: Version "v1.64.0" starting with parameters ["rclone" "move" "crypt1:test" "crypt2:test" "-P" "-vv" "--log-file" "move.log" "--server-side-across-configs"]
2023/09/29 15:06:47 DEBUG : Creating backend with remote "crypt1:test"

2023/09/29 15:06:52 DEBUG : Using config file from "/rclone/rclone.conf"
2023/09/29 15:06:52 DEBUG : Creating backend with remote "onedrive1:crypt/<test-as-base32768>"
2023/09/29 15:06:52 DEBUG : Creating backend with remote "crypt2:test"
2023/09/29 15:06:52 DEBUG : Creating backend with remote "onedrive2:crypt/<test-as-base32768>"
2023/09/29 15:06:53 DEBUG : 1GB.bin: Need to transfer - File not found at Destination
2023/09/29 15:06:53 DEBUG : Encrypted drive 'crypt2:test': Waiting for checks to finish
2023/09/29 15:06:53 DEBUG : Encrypted drive 'crypt2:test': Waiting for transfers to finish
2023/09/29 15:06:53 DEBUG : OneDrive root 'crypt/<test-as-base32768>': Can't move files between drives (<REDACTED> != <REDACTED>)
2023/09/29 15:06:53 DEBUG : 1GB.bin: Can't move, switching to copy
2023/09/29 15:07:00 ERROR : 1GB.bin: Failed to copy: async operation completed but readMetaData failed: object not found
2023/09/29 15:07:00 ERROR : 1GB.bin: Not deleting source as copy failed: async operation completed but readMetaData failed: object not found
2023/09/29 15:07:00 ERROR : Attempt 1/3 failed with 1 errors and: async operation completed but readMetaData failed: object not found
2023/09/29 15:07:00 DEBUG : Encrypted drive 'crypt2:test': Waiting for checks to finish
2023/09/29 15:07:00 DEBUG : 1GB.bin: Modification times differ by 15m16s: 2023-09-29 12:51:40 +0000 UTC, 2023-09-29 13:06:56 +0000 UTC
2023/09/29 15:07:00 DEBUG : Encrypted drive 'crypt2:test': Waiting for transfers to finish
2023/09/29 15:07:00 INFO  : 1GB.bin: Deleted
2023/09/29 15:07:00 DEBUG : OneDrive root 'crypt/<test-as-base32768>': Can't move files between drives (<REDACTED> != <REDACTED>)
2023/09/29 15:07:00 DEBUG : 1GB.bin: Can't move, switching to copy
2023/09/29 15:07:06 ERROR : 1GB.bin: Failed to copy: async operation completed but readMetaData failed: object not found
2023/09/29 15:07:06 ERROR : 1GB.bin: Not deleting source as copy failed: async operation completed but readMetaData failed: object not found
2023/09/29 15:07:06 ERROR : Attempt 2/3 failed with 1 errors and: async operation completed but readMetaData failed: object not found
2023/09/29 15:07:06 DEBUG : Encrypted drive 'crypt2:test': Waiting for checks to finish
2023/09/29 15:07:06 DEBUG : 1GB.bin: Modification times differ by 15m21s: 2023-09-29 12:51:40 +0000 UTC, 2023-09-29 13:07:01 +0000 UTC
2023/09/29 15:07:06 DEBUG : Encrypted drive 'crypt2:test': Waiting for transfers to finish
2023/09/29 15:07:06 INFO  : 1GB.bin: Deleted
2023/09/29 15:07:06 DEBUG : OneDrive root 'crypt/<test-as-base32768>': Can't move files between drives (<REDACTED> != <REDACTED>)
2023/09/29 15:07:06 DEBUG : 1GB.bin: Can't move, switching to copy
2023/09/29 15:07:12 ERROR : 1GB.bin: Failed to copy: async operation completed but readMetaData failed: object not found
2023/09/29 15:07:12 ERROR : 1GB.bin: Not deleting source as copy failed: async operation completed but readMetaData failed: object not found
2023/09/29 15:07:12 ERROR : Attempt 3/3 failed with 1 errors and: async operation completed but readMetaData failed: object not found
2023/09/29 15:07:12 INFO  : 
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Checks:                 7 / 7, 100%
Deleted:                2 (files), 0 (dirs)
Elapsed time:        25.1s

2023/09/29 15:07:12 DEBUG : 12 go routines active
2023/09/29 15:07:12 Failed to move: async operation completed but readMetaData failed: object not found

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