# Protondrive 400 & 422 errors

**URL:** <https://forum.rclone.org/t/protondrive-400-422-errors/45692>\
**Category:** Help and Support\
**Created:** [April 23, 2024, 7:42pm UTC](https://forum.rclone.org/t/protondrive-400-422-errors/45692 "2024-04-23T19:42:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pearcep6517](https://forum.rclone.org/letter_avatar_proxy/v4/letter/p/958977/32.png) [@pearcep6517](https://forum.rclone.org/u/pearcep6517)\
**Post date:** [April 23, 2024, 7:42pm UTC](https://forum.rclone.org/t/protondrive-400-422-errors/45692/1 "2024-04-23T19:42:50Z")

</div>

#### What is the problem you are having with rclone?

Protondrive errors when trying to upload sync

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

rclone v1.66.0

- os/version: artix (64 bit)
- os/kernel: 6.8.7-artix1-1 (x86\_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.22.1
- go/linking: dynamic
- go/tags: none

Are you on the latest version of rclone? You can validate by checking the version listed here: [Rclone downloads](https://rclone.org/downloads/)  
Yep 1.66

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

Proton Drive

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

`rclone sync /tmp/sway.log proton:/images/`

#### Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

```auto
[proton]
type = protondrive
username = peter.pearce6517@protonmail.com
password = XXX
replace_existing_draft = true
client_uid = XXX
client_access_token = XXX
client_refresh_token = XXX
client_salted_key_pass = XXX

```

#### A log from the command that you were trying to run with the `-vv` flag

```auto
2024/04/23 21:29:12 DEBUG : Creating backend with remote "/tmp/sway.log"
2024/04/23 21:29:12 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2024/04/23 21:29:12 DEBUG : fs cache: adding new entry for parent of "/tmp/sway.log", "/tmp"
2024/04/23 21:29:12 DEBUG : Creating backend with remote "proton:/images/"
2024/04/23 21:29:12 DEBUG : proton drive root link ID 'images': Has cached credentials
2024/04/23 21:29:14 DEBUG : proton drive root link ID 'images': Used cached credential to initialize the ProtonDrive API
2024/04/23 21:29:16 DEBUG : fs cache: renaming cache item "proton:/images/" to be canonical "proton:images"
2024/04/23 21:29:17 DEBUG : sway.log: Need to transfer - File not found at Destination
2024/04/23 21:29:19.201227 WARN RESTY 422 POST https://mail.proton.me/api/drive/shares/DcIrd8Hw_1lOozJ_91ooZVJu24ls331Xx-xzZAxIciAcReJpwB7cqWAOKNWh3JSibmynyMHjvHnnRBUiraoJFw==/files: A file or folder with that name already exists (Code=2500, Status=422), Attempt 1
2024/04/23 21:29:19.201288 ERROR RESTY 422 POST https://mail.proton.me/api/drive/shares/DcIrd8Hw_1lOozJ_91ooZVJu24ls331Xx-xzZAxIciAcReJpwB7cqWAOKNWh3JSibmynyMHjvHnnRBUiraoJFw==/files: A file or folder with that name already exists (Code=2500, Status=422)
2024/04/23 21:29:22.836012 WARN RESTY 400 POST https://mail.proton.me/api/drive/blocks: You are using an outdated version of the app. Please update to upload this file’ (Code=2000, Status=400), Attempt 1
2024/04/23 21:29:22.836060 ERROR RESTY 400 POST https://mail.proton.me/api/drive/blocks: You are using an outdated version of the app. Please update to upload this file’ (Code=2000, Status=400)
2024/04/23 21:29:22 ERROR : sway.log: Failed to copy: 400 POST https://mail.proton.me/api/drive/blocks: You are using an outdated version of the app. Please update to upload this file’ (Code=2000, Status=400)
2024/04/23 21:29:22 ERROR : Attempt 1/3 failed with 1 errors and: 400 POST https://mail.proton.me/api/drive/blocks: You are using an outdated version of the app. Please update to upload this file’ (Code=2000, Status=400)
2024/04/23 21:29:23 DEBUG : sway.log: Need to transfer - File not found at Destination
2024/04/23 21:29:25.384401 WARN RESTY 422 POST https://mail.proton.me/api/drive/shares/DcIrd8Hw_1lOozJ_91ooZVJu24ls331Xx-xzZAxIciAcReJpwB7cqWAOKNWh3JSibmynyMHjvHnnRBUiraoJFw==/files: A file or folder with that name already exists (Code=2500, Status=422), Attempt 1
2024/04/23 21:29:25.384447 ERROR RESTY 422 POST https://mail.proton.me/api/drive/shares/DcIrd8Hw_1lOozJ_91ooZVJu24ls331Xx-xzZAxIciAcReJpwB7cqWAOKNWh3JSibmynyMHjvHnnRBUiraoJFw==/files: A file or folder with that name already exists (Code=2500, Status=422)
2024/04/23 21:29:29.034200 WARN RESTY 400 POST https://mail.proton.me/api/drive/blocks: You are using an outdated version of the app. Please update to upload this file’ (Code=2000, Status=400), Attempt 1
2024/04/23 21:29:29.034252 ERROR RESTY 400 POST https://mail.proton.me/api/drive/blocks: You are using an outdated version of the app. Please update to upload this file’ (Code=2000, Status=400)
2024/04/23 21:29:29 ERROR : sway.log: Failed to copy: 400 POST https://mail.proton.me/api/drive/blocks: You are using an outdated version of the app. Please update to upload this file’ (Code=2000, Status=400)
2024/04/23 21:29:29 ERROR : Attempt 2/3 failed with 1 errors and: 400 POST https://mail.proton.me/api/drive/blocks: You are using an outdated version of the app. Please update to upload this file’ (Code=2000, Status=400)
2024/04/23 21:29:30 DEBUG : sway.log: Need to transfer - File not found at Destination
2024/04/23 21:29:31.565145 WARN RESTY 422 POST https://mail.proton.me/api/drive/shares/DcIrd8Hw_1lOozJ_91ooZVJu24ls331Xx-xzZAxIciAcReJpwB7cqWAOKNWh3JSibmynyMHjvHnnRBUiraoJFw==/files: A file or folder with that name already exists (Code=2500, Status=422), Attempt 1
2024/04/23 21:29:31.565197 ERROR RESTY 422 POST https://mail.proton.me/api/drive/shares/DcIrd8Hw_1lOozJ_91ooZVJu24ls331Xx-xzZAxIciAcReJpwB7cqWAOKNWh3JSibmynyMHjvHnnRBUiraoJFw==/files: A file or folder with that name already exists (Code=2500, Status=422)
2024/04/23 21:29:35.153389 WARN RESTY 400 POST https://mail.proton.me/api/drive/blocks: You are using an outdated version of the app. Please update to upload this file’ (Code=2000, Status=400), Attempt 1
2024/04/23 21:29:35.153439 ERROR RESTY 400 POST https://mail.proton.me/api/drive/blocks: You are using an outdated version of the app. Please update to upload this file’ (Code=2000, Status=400)
2024/04/23 21:29:35 ERROR : sway.log: Failed to copy: 400 POST https://mail.proton.me/api/drive/blocks: You are using an outdated version of the app. Please update to upload this file’ (Code=2000, Status=400)
2024/04/23 21:29:35 ERROR : Attempt 3/3 failed with 1 errors and: 400 POST https://mail.proton.me/api/drive/blocks: You are using an outdated version of the app. Please update to upload this file’ (Code=2000, Status=400)
2024/04/23 21:29:35 INFO : 
Transferred: 493.995 KiB / 493.995 KiB, 100%, 19.299 KiB/s, ETA 0s
Errors: 1 (retrying may help)
Elapsed time: 23.0s

2024/04/23 21:29:35 DEBUG : 7 go routines active
2024/04/23 21:29:35 Failed to sync: 400 POST https://mail.proton.me/api/drive/blocks: You are using an outdated version of the app. Please update to upload this file’ (Code=2000, Status=400)

```

What am I doing wrong? Or what's gone wrong?  
Is "replace\_existing\_draft = true" working?

Thanks in advance. Peter.

---

<div class="post-metadata">

**Author:** ![pearcep6517](https://forum.rclone.org/letter_avatar_proxy/v4/letter/p/958977/32.png) [@pearcep6517](https://forum.rclone.org/u/pearcep6517)\
**Post date:** [April 25, 2024, 9:08am UTC](https://forum.rclone.org/t/protondrive-400-422-errors/45692/2 "2024-04-25T09:08:46Z")

</div>

It seems well broken. See:

# [Issue Uploading Non-Empty Files to Proton Drive with rclone v1.66.0](https://forum.rclone.org/t/issue-uploading-non-empty-files-to-proton-drive-with-rclone-v1-66-0/45690)

---

<div class="post-metadata">

**Author:** ![pearcep6517](https://forum.rclone.org/letter_avatar_proxy/v4/letter/p/958977/32.png) [@pearcep6517](https://forum.rclone.org/u/pearcep6517)\
**Post date:** [April 25, 2024, 1:58pm UTC](https://forum.rclone.org/t/protondrive-400-422-errors/45692/3 "2024-04-25T13:58:03Z")

</div>

> [@pearcep6517](#):
>
> rclone v1.66.0
> 
> - os/version: artix (64 bit)
> - os/kernel: 6.8.7-artix1-1 (x86\_64)
> - os/type: linux
> - os/arch: amd64
> - go/version: go1.22.1
> - go/linking: dynamic
> - go/tags: none

It seems to have fixed itself !! (at the moment).

---

<div class="post-metadata">

**Author:** ![pearcep6517](https://forum.rclone.org/letter_avatar_proxy/v4/letter/p/958977/32.png) [@pearcep6517](https://forum.rclone.org/u/pearcep6517)\
**Post date:** [April 30, 2024, 7:22am UTC](https://forum.rclone.org/t/protondrive-400-422-errors/45692/4 "2024-04-30T07:22:44Z")

</div>

@henrybear327 Broken again: SIGSEGV

rclone copy to existing file...

2024/04/30 06:00:34.014356 WARN RESTY 401 POST [https://mail.proton.me/api/drive/shares/DcIrd8Hw\_1lOozJ\_91ooZVJu24ls331Xx-xzZAxIciAcReJpwB7cqWAOKNWh3JSibmynyMHjvHnnRBUiraoJFw==/files:](https://mail.proton.me/api/drive/shares/DcIrd8Hw_1lOozJ_91ooZVJu24ls331Xx-xzZAxIciAcReJpwB7cqWAOKNWh3JSibmynyMHjvHnnRBUiraoJFw==/files:) Invalid access token (Code=401, Status=401), Attempt 1  
2024/04/30 06:00:34.014457 ERROR RESTY 401 POST [https://mail.proton.me/api/drive/shares/DcIrd8Hw\_1lOozJ\_91ooZVJu24ls331Xx-xzZAxIciAcReJpwB7cqWAOKNWh3JSibmynyMHjvHnnRBUiraoJFw==/files:](https://mail.proton.me/api/drive/shares/DcIrd8Hw_1lOozJ_91ooZVJu24ls331Xx-xzZAxIciAcReJpwB7cqWAOKNWh3JSibmynyMHjvHnnRBUiraoJFw==/files:) Invalid access token (Code=401, Status=401)  
2024/04/30 06:00:34.692937 WARN RESTY 422 POST [https://mail.proton.me/api/drive/shares/DcIrd8Hw\_1lOozJ\_91ooZVJu24ls331Xx-xzZAxIciAcReJpwB7cqWAOKNWh3JSibmynyMHjvHnnRBUiraoJFw==/files:](https://mail.proton.me/api/drive/shares/DcIrd8Hw_1lOozJ_91ooZVJu24ls331Xx-xzZAxIciAcReJpwB7cqWAOKNWh3JSibmynyMHjvHnnRBUiraoJFw==/files:) A file or folder with that name already exists (Code=2500, Status=422), Attempt 1  
2024/04/30 06:00:34.693018 ERROR RESTY 422 POST [https://mail.proton.me/api/drive/shares/DcIrd8Hw\_1lOozJ\_91ooZVJu24ls331Xx-xzZAxIciAcReJpwB7cqWAOKNWh3JSibmynyMHjvHnnRBUiraoJFw==/files:](https://mail.proton.me/api/drive/shares/DcIrd8Hw_1lOozJ_91ooZVJu24ls331Xx-xzZAxIciAcReJpwB7cqWAOKNWh3JSibmynyMHjvHnnRBUiraoJFw==/files:) A file or folder with that name already exists (Code=2500, Status=422)  
panic: runtime error: invalid memory address or nil pointer dereference  
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x636518da0569]

goroutine 1 [running]:  
[github.com/go-resty/resty/v2.(\*Response).StatusCode(...)](http://github.com/go-resty/resty/v2.(*Response).StatusCode(...))  
[github.com/go-resty/resty/v2@v2.11.0/response.go:66](http://github.com/go-resty/resty/v2@v2.11.0/response.go:66)  
[github.com/henrybear327/go-proton-api.(\*Client).CreateFile](http://github.com/henrybear327/go-proton-api.(*Client).CreateFile)(0xc0008aaa50, {0x63651a43a810, 0x63651b8df300}, {0xc000e785a0, 0x58}, {{0xc0011c4e40, 0x58}, {0xc0009906c0, 0x205}, {0xc0006d5200, ...}, ...})  
[github.com/henrybear327/go-proton-api@v1.0.0/link.go:51](http://github.com/henrybear327/go-proton-api@v1.0.0/link.go:51) +0xc9  
[github.com/henrybear327/Proton-API-Bridge.(\*ProtonDrive).createFileUploadDraft.func1()](http://github.com/henrybear327/Proton-API-Bridge.(*ProtonDrive).createFileUploadDraft.func1())  
[github.com/henrybear327/Proton-API-Bridge@v1.0.0/file\_upload.go:156](http://github.com/henrybear327/Proton-API-Bridge@v1.0.0/file_upload.go:156) +0xda  
[github.com/henrybear327/Proton-API-Bridge.(\*ProtonDrive).createFileUploadDraft](http://github.com/henrybear327/Proton-API-Bridge.(*ProtonDrive).createFileUploadDraft)(0xc000c28e00, {0x63651a43a810, 0x63651b8df300}, 0xc000d162a0, {0x7ffd7818bf59, 0xf}, {0xc001149068?, 0x76997f440648?, 0xc001149038?}, {0x6365194a63fb, ...})  
[github.com/henrybear327/Proton-API-Bridge@v1.0.0/file\_upload.go:191](http://github.com/henrybear327/Proton-API-Bridge@v1.0.0/file_upload.go:191) +0x42b  
[github.com/henrybear327/Proton-API-Bridge.(\*ProtonDrive).uploadFile](http://github.com/henrybear327/Proton-API-Bridge.(*ProtonDrive).uploadFile)(0xc000c28e00, {0x63651a43a810, 0x63651b8df300}, 0xc000d162a0, {0x7ffd7818bf59, 0xf}, {0x18?, 0x10?, 0x63651b87c720?}, {0x63651a41a480, ...}, ...)  
[github.com/henrybear327/Proton-API-Bridge@v1.0.0/file\_upload.go:435](http://github.com/henrybear327/Proton-API-Bridge@v1.0.0/file_upload.go:435) +0x11f  
[github.com/henrybear327/Proton-API-Bridge.(\*ProtonDrive).UploadFileByReader](http://github.com/henrybear327/Proton-API-Bridge.(*ProtonDrive).UploadFileByReader)(0xc000c28e00, {0x63651a43a810, 0x63651b8df300}, {0xc000e78600?, 0xc001149220?}, {0x7ffd7818bf59, 0xf}, {0x1af05567, 0xeddc263cf, 0x63651b87c720}, ...)  
[github.com/henrybear327/Proton-API-Bridge@v1.0.0/file\_upload.go:479](http://github.com/henrybear327/Proton-API-Bridge@v1.0.0/file_upload.go:479) +0xd6  
[github.com/rclone/rclone/backend/protondrive.(\*Object).Update.func1()](http://github.com/rclone/rclone/backend/protondrive.(*Object).Update.func1())  
[github.com/rclone/rclone/backend/protondrive/protondrive.go:950](http://github.com/rclone/rclone/backend/protondrive/protondrive.go:950) +0x9d  
[github.com/rclone/rclone/fs.pacerInvoker](http://github.com/rclone/rclone/fs.pacerInvoker)(0x1, 0xa, 0x80?)  
[github.com/rclone/rclone/fs/pacer.go:88](http://github.com/rclone/rclone/fs/pacer.go:88) +0x32  
[github.com/rclone/rclone/lib/pacer.(\*Pacer).call](http://github.com/rclone/rclone/lib/pacer.(*Pacer).call)(0xc000065680, 0xc000054100, 0xa)  
[github.com/rclone/rclone/lib/pacer/pacer.go:197](http://github.com/rclone/rclone/lib/pacer/pacer.go:197) +0x7c  
[github.com/rclone/rclone/lib/pacer.(\*Pacer).Call](http://github.com/rclone/rclone/lib/pacer.(*Pacer).Call)(0xc000065680, 0xc000054100)  
[github.com/rclone/rclone/lib/pacer/pacer.go:216](http://github.com/rclone/rclone/lib/pacer/pacer.go:216) +0x92  
[github.com/rclone/rclone/backend/protondrive.(\*Object).Update](http://github.com/rclone/rclone/backend/protondrive.(*Object).Update)(0xc000bba640, {0x63651a43a810, 0x63651b8df300}, {0x63651a41a480, 0xc000221a00}, {0x76997d7e0858, 0xc000be0960}, {0xc000c16460, 0x1, 0x1})  
[github.com/rclone/rclone/backend/protondrive/protondrive.go:949](http://github.com/rclone/rclone/backend/protondrive/protondrive.go:949) +0x2dc  
[github.com/rclone/rclone/fs/operations.(\*copy).updateOrPut](http://github.com/rclone/rclone/fs/operations.(*copy).updateOrPut)(0xc0009ea480, {0x63651a43a810, 0x63651b8df300}, {0x63651a42b370?, 0xc000255340?}, {0xc000c16460, 0x1, 0x1})  
[github.com/rclone/rclone/fs/operations/copy.go:203](http://github.com/rclone/rclone/fs/operations/copy.go:203) +0x1a5  
[github.com/rclone/rclone/fs/operations.(\*copy).manualCopy](http://github.com/rclone/rclone/fs/operations.(*copy).manualCopy)(0xc0009ea480, {0x63651a43a810, 0x63651b8df300})  
[github.com/rclone/rclone/fs/operations/copy.go:262](http://github.com/rclone/rclone/fs/operations/copy.go:262) +0x6d8  
[github.com/rclone/rclone/fs/operations.(\*copy).copy](http://github.com/rclone/rclone/fs/operations.(*copy).copy)(0xc0009ea480, {0x63651a43a810, 0x63651b8df300})  
[github.com/rclone/rclone/fs/operations/copy.go:302](http://github.com/rclone/rclone/fs/operations/copy.go:302) +0x16c  
[github.com/rclone/rclone/fs/operations.Copy](http://github.com/rclone/rclone/fs/operations.Copy)({0x63651a43a810, 0x63651b8df300}, {0x63651a450d40, 0xc0008aa9a0}, {0x63651a450db0, 0xc000bba640}, {0x7ffd7818bf59, 0xf}, {0x63651a4503a0, 0xc000be0960})  
[github.com/rclone/rclone/fs/operations/copy.go:404](http://github.com/rclone/rclone/fs/operations/copy.go:404) +0x485  
[github.com/rclone/rclone/fs/operations.moveOrCopyFile](http://github.com/rclone/rclone/fs/operations.moveOrCopyFile)({0x63651a43a810, 0x63651b8df300}, {0x63651a450d40, 0xc0008aa9a0}, {0x63651a450330, 0xc00067fd60}, {0x7ffd7818bf59, 0xf}, {0x7ffd7818bf59, 0xf}, ...)  
[github.com/rclone/rclone/fs/operations/operations.go:1996](http://github.com/rclone/rclone/fs/operations/operations.go:1996) +0xcd1  
[github.com/rclone/rclone/fs/operations.CopyFile(...)](http://github.com/rclone/rclone/fs/operations.CopyFile(...))  
[github.com/rclone/rclone/fs/operations/copy.go:409](http://github.com/rclone/rclone/fs/operations/copy.go:409)  
[github.com/rclone/rclone/cmd/copy.init.func1.1()](http://github.com/rclone/rclone/cmd/copy.init.func1.1())  
[github.com/rclone/rclone/cmd/copy/copy.go:106](http://github.com/rclone/rclone/cmd/copy/copy.go:106) +0x79  
[github.com/rclone/rclone/cmd.Run](http://github.com/rclone/rclone/cmd.Run)(0x1, 0x1, 0x63651b6d1c00, 0xc000e21c38)  
[github.com/rclone/rclone/cmd/cmd.go:255](http://github.com/rclone/rclone/cmd/cmd.go:255) +0x125  
[github.com/rclone/rclone/cmd/copy.init.func1](http://github.com/rclone/rclone/cmd/copy.init.func1)(0x63651b6d1c00, {0xc000a177e0, 0x2, 0x2})  
[github.com/rclone/rclone/cmd/copy/copy.go:102](http://github.com/rclone/rclone/cmd/copy/copy.go:102) +0xbd  
[github.com/spf13/cobra.(\*Command).execute](http://github.com/spf13/cobra.(*Command).execute)(0x63651b6d1c00, {0xc000a17780, 0x2, 0x2})  
[github.com/spf13/cobra@v1.8.0/command.go:987](http://github.com/spf13/cobra@v1.8.0/command.go:987) +0xab1  
[github.com/spf13/cobra.(\*Command).ExecuteC(0x63651b6cc5c0)](http://github.com/spf13/cobra.(*Command).ExecuteC(0x63651b6cc5c0))  
[github.com/spf13/cobra@v1.8.0/command.go:1115](http://github.com/spf13/cobra@v1.8.0/command.go:1115) +0x3ff  
[github.com/spf13/cobra.(\*Command).Execute(...)](http://github.com/spf13/cobra.(*Command).Execute(...))  
[github.com/spf13/cobra@v1.8.0/command.go:1039](http://github.com/spf13/cobra@v1.8.0/command.go:1039)  
[github.com/rclone/rclone/cmd.Main()](http://github.com/rclone/rclone/cmd.Main())  
[github.com/rclone/rclone/cmd/cmd.go:563](http://github.com/rclone/rclone/cmd/cmd.go:563) +0x31  
main.main()  
[github.com/rclone/rclone/rclone.go:14](http://github.com/rclone/rclone/rclone.go:14) +0xf

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [May 30, 2024, 7:23am UTC](https://forum.rclone.org/t/protondrive-400-422-errors/45692/5 "2024-05-30T07:23:01Z")

</div>

Closed on May 30, 2024, 7:23am UTC

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