Error with multipart upload using Box

I’ve been having an issue with uploading files larger than 2 GiB to Box. No matter the size of the file, the upload fails when it hits 2 GiB. The output of -vv is below.

2018/07/22 18:08:54 DEBUG : largefile.iso: Uploading part 67/89 offset 2.062G/2.757G part size 32M
2018/07/22 18:08:57 DEBUG : largefile.iso: Uploading part 68/89 offset 2.094G/2.757G part size 32M
2018/07/22 18:09:08 DEBUG : largefile.iso: Uploading part 69/89 offset 2.125G/2.757G part size 32M
2018/07/22 18:09:44 INFO  :
Transferred:   2.095 GBytes (1.275 MBytes/s)
Errors:                 0
Checks:                 0
Transferred:            0
Elapsed time:     28m1.9s
Transferring:
 *                                 largefile.iso: 75% /2.757G, 1.275M/s, 8m51s

2018/07/22 18:10:35 DEBUG : largefile.iso: Cancelling multipart upload: multipart upload failed to upload part: json: cannot unmarshal number 2147483648 into Go struct field Part.offset of type int
2018/07/22 18:10:35 ERROR : largefile.iso: Failed to copy: multipart upload failed to upload part: json: cannot unmarshal number 2147483648 into Go struct field Part.offset of type int

The command used is pretty simple: rclone -vv sync /media/freenas/test freenas-box:/test. The backend is a Freenas NFS share mounted to /media/freenas. When I upload large files without multipart (using --min-size 2G --box-upload-cutoff 15G) it works fine. Some people were having issues with Box and multipart upload (#2054), but the error seems different. To be safe, I tried increasing --low-level-retries to 100 but it didn’t help.

Also something to note is that I ran this on a Raspberry Pi, and I’m pretty sure that’s 32-bit (armv71). I’m using rclone v1.42. Thanks in advance for your help!

Edit: I ran the same thing on a Windows machine and it worked fine. Seems to be specific to the device/architecture.

Apologies for the delay in responding, I’ve been on vacation.

Yes, this sounds like a 32bit vs 64bit problem. I think I see the problem - it is to do with the Offset field not being a 64 bit int.

I’ve had a go at fixing this here - can you see if it works for you?

https://beta.rclone.org/branch/v1.42-060-g84d8db91-fix-box-upload-32bit/ (uploaded in 15-30 mins)

No worries! I’ve tested it and it seems to work great. Thanks a lot for your help!

Thanks for testing. I’ve merged the above fix which will be in the latest beta and v1.43 when it is released.