rclone: SharePoint: "The upload session was not found" on .xlsx files
The associated forum post URL from https://forum.rclone.org
N/A
What is the problem you are having with rclone?
When copying to SharePoint, we are seeing this problem with .xlsx files:
2025/05/07 14:10:06 NOTICE: file.xlsx: Failed to cancel multipart upload: itemNotFound: The upload session was not found (upload failed due to: HTTP error 404 (404 Not Found) returned body: "{\"error\":{\"code\":\"itemNotFound\",\"message\":\"The upload session was not found\"}}")
I notice that all uploads are multipart uploads, which I think happens for a file of any non-zero size. The documentation says this:
Using a fragment size that doesn’t divide evenly by 320 KiB results in errors committing some files.
In these cases, the files are smaller than 320 KiB, and the chunk size is the file size, which does not divide envenly by 320 KiB. I can’t be sure, but it would seem that files smaller than that threshold should be uploaded outside of the multipart semantics, but I can’t find a way to make that happen.
What is your rclone version (output from rclone version)
v1.69.1
Which OS you are using and how many bits (e.g. Windows 7, 64 bit)
Windows Server, 64 bit
Which cloud storage system are you using? (e.g. Google Drive)
SharePoint Online
The command you were trying to run (e.g. rclone copy /tmp remote:tmp)
rclone copy Source: Target:
A log from the command with the -vv flag (e.g. output from rclone -vv copy /tmp remote:tmp)
I can provide this via email.
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don’t comment if you have no relevant information to add. It’s just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (7 by maintainers)
Commits related to this issue
- onedrive: fix "The upload session was not found" errors Before this change, sometimes, perhaps on heavily loaded sharepoint servers, uploads would sometimes fail with the error: {"error":{"code":"it... — committed to rclone/rclone by ncw 2 years ago
- onedrive: fix "The upload session was not found" errors Before this change, sometimes, perhaps on heavily loaded sharepoint servers, uploads would sometimes fail with the error: {"error":{"code":"it... — committed to rclone/rclone by ncw 2 years ago
- onedrive: re-add --onedrive-upload-cutoff flag This was removed as part of #1716 to fix rclone uploads taking double the space. 7f744033d8eae0fa onedrive: Removed upload cutoff and always do session... — committed to rclone/rclone by ncw 2 years ago
- onedrive: re-add --onedrive-upload-cutoff flag This was removed as part of #1716 to fix rclone uploads taking double the space. 7f744033d8eae0fa onedrive: Removed upload cutoff and always do session... — committed to rclone/rclone by ncw 2 years ago
- onedrive: re-add --onedrive-upload-cutoff flag This was removed as part of #1716 to fix rclone uploads taking double the space. 7f744033d8eae0fa onedrive: Removed upload cutoff and always do session... — committed to rclone/rclone by ncw 2 years ago
- onedrive: fix "The upload session was not found" errors Before this change, sometimes, perhaps on heavily loaded sharepoint servers, uploads would sometimes fail with the error: {"error":{"code":"it... — committed to ravenolf/rclone by ncw 2 years ago
We use a lot of flags, but the two that allow it to work are
--streaming-upload-cutoff 4Mand--onedrive-upload-cutoff 4M.