Rclone complains when updating a file on OneDrive

Problem Descrption
When I run rclone (in copy mode) it complains when the file already exists giving the following error message:
2019/11/03 00:08:08 ERROR : Business/Direct/DirectClients.xlsx: Failed to copy: nameAlreadyExists: An upload session already exists for this file (is it a OneNote file?)

It happens for any type of file e.g. text, shell script, Office type files and I believe that it happens every time. If the file does not exist on OneDrive then I have never seen a problem.

I looked on the forum and saw similar questions e.g. same error message when spaces or hyphens are in the filename but not the exact same issue as I have i.e. any existing file.

Please not that I may be a little slow in responding to answers over the next couple of days so please accept my apologies in advance.

rclone version
rclone v1.48.0

  • os/arch: darwin/amd64
  • go version: go1.12.6

OS
MacOS
Darwin Kernel Version 17.7.0: Sun Jun 2 20:31:42 PDT 2019; root:xnu-4570.71.46~1/RELEASE_X86_64 x86_64

Cloud storage system
I am using OneDrive supplied as part with MS Exchange Business subscription.

Command
rclone copy -vv ~/Documents OneDriveCloud:iMac/Documents --checksum --retries 6 --exclude '[~.]*' --log-file=/tmp/rclone-mac-docs.log

Logfile extract
9/11/03 00:08:07 ERROR : Business/CV/.DS_Store: Failed to copy: nameAlreadyExists: An upload session already exists for this file (is it a OneNote file?)

2019/11/03 00:08:07 NOTICE: Administration/iCloud/Links/iCloudBackupDestDirLnk: Can't follow symlink without -L/--copy-links

2019/11/03 00:08:08 ERROR : Business/Direct/DirectClients.xlsx: Failed to copy: nameAlreadyExists: An upload session already exists for this file (is it a OneNote file?)

2019/11/03 00:08:08 ERROR : Office/.DS_Store: Failed to copy: nameAlreadyExists: An upload session already exists for this file (is it a OneNote file?)

2019/11/03 00:08:09 INFO : Tmp/OutlookExport/Outlook/.DS_Store: Copied (new)

weclome to the forum,

perhaps update to latest stable release and test again.

Thank you.

I have followed your suggestion and downloaded version 1.5 (details below) and get the same results.

rclone v1.50.1

  • os/arch: darwin/amd64
  • go version: go1.13.4

And here is an extract from the log showing the same file causing an issue as before:
2019/11/04 20:39:50 ERROR : Business/Direct/DirectClients.xlsx: Failed to copy: nameAlreadyExists: An upload session already exists for this file (is it a OneNote file?)

i noticed this flag
https://rclone.org/onedrive/#onedrive-expose-onenote-files

and i found this

i have onedrive, do not use it much, but i just tested and i do not get any errors.

Thanks for the suggestions.

I have added the --ignore-checksum and --ignore-size that seems to reduce the errors. I also removed an old connection in the config file (no idea if it helped but no need for it to be there either).

The only errors I have now are from .xlsx files. These don't fit in to any of the categories of the issues in the article you pointed to.

Is there any way to find out what causes the "nameAlreadyExists: An upload session already exists for this file (is it a OneNote file?)", particularly what is an upload session as that may be way forward.

It sounds like that on the remote you have existing .xlsx files which are onenote files. Rclone is trying to replace them with a file and hence that error.

Is that correct - are there existing .xlsx files? How did they get uploaded?

Yes, they are existing .xlsx files, they have been modified/updated locally and therefore should be updated i.e. copied across to the remote.

They got there via an earlier rclone run. Can't say when that was as I did not check my logs every time just do a spot check every few weeks (aside: I have a backup NAS and that is backed up to two portable disks one of which is kept off site plus I have timemachine on the Mac - so I am adding this as an extra layer of protection - hence the lax checking of logs).

OneNote is a mystery. I have don't have any one note files that I know off. I do have OneNote on the Mac but it stores all its files in the cloud and can't be set to put them on my local disk or any remote disk.

So the "nameAlreadyExists" part is understandable - it does, it is/should be updated. The upload session already exists is not clear to me as I don't know what an upload session is (is this an rclone error or OneDrive error) but I guess that it thinks it is already trying to upload it somehow and the OneNote is a complete mystery but could be some helpful suggestion (applicable or not) that is added to the error message.

One final point. I did do strings $(which rclone) and it did not show the error message in rclone. No conclusive as it could be elsewhere.

I think that we need to call for help here :slight_smile:

If you could collect all the relevant info about this and make a new issue on github then I can ask our onedrive expert to take a look and we can see if we can fix it! Put a link to this forum thread in the issue please.

I've created a bug report:

Rclone complains when updating a file on OneDrive - overwriting/replacing #3702

FYI: I will be offline for a few days over the weekend.

1 Like

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