Proton Drive uploads via rclone have been broken since ~November 2025. This documents the root causes, fixes, and testing.
Three issues combine to break uploads:
- Missing block verification tokens — Proton's storage backend now requires a
Verifier.Tokenper block inPOST /drive/blocks. Without it, every block upload fails with422 / Code=200501. This is the primary cause. - Broken
shouldRetry()—backend/protondrive/protondrive.go:248always returns(false, err), disabling rclone's pacer retry logic entirely. - Orphaned draft accumulation — Failed uploads leave draft links on Proton's servers. Subsequent uploads hit
Code=2500("already exists") andGetRevisionsreturnsCode=2501("not found") for the broken draft, causing an unrecoverable error loop.
Changes across three repos in the rclone ecosystem:
- Added
Verifierstruct andVerificationResstruct toblock_types.go - Added
Verifierfield toBlockUploadInfo - Added
Verification()API endpoint toblock.go—GET /drive/shares/{shareID}/links/{linkID}/revisions/{revisionID}/verification
- Block verification (
uploadAndCollectBlockData): fetchesVerificationCode+ContentKeyPacketfrom the verification endpoint, derives a verifier session key, and generates per-block verification tokens via XOR of the verification code with leading bytes of each block's ciphertext (algorithm sourced from ProtonDriveApps/sdk) - Block-level retry (
uploadBlockWrapper): 5 attempts with exponential backoff (2s→32s) for transient errors (Code=200501, Status=429, 5xx) - Orphaned draft cleanup (
handleRevisionConflict): whenGetRevisionsfails with 2501 and link is in draft state, deletes the orphaned draft and signals retry
Cherry-picked from existing PRs/commits:
- shouldRetry fix (from PR #9080): properly retries Code=200501, Status=429, 5xx errors
- shouldRetry tests: 10 table-driven test cases
- Crash fix (from issue #9117):
o.Size()instead of*o.originalSizenil deref inOpen()
- Cross-compiled static linux/amd64 binary (
CGO_ENABLED=0) - Injected into running gitea-backup container on VPS
- Small file upload — succeeded
- Full 1.39 GiB Gitea backup upload — succeeded in 5m32s, SHA1 verified
- Rebuilt Docker image with patched binary, deployed via docker compose
- Next cron backup scheduled for Saturday 2026-03-07 15:00 UTC
| Repo | PR/Issue | Status | Description |
|---|---|---|---|
| rclone/rclone | #9080 | Open | shouldRetry fix |
| rclone/rclone | #9081 | Open | Block verification + draft cleanup (rclone-level) |
| rclone/rclone | #9117 | Open | nil originalSize crash |
| rclone/Proton-API-Bridge | #1 | Open | Draft cleanup + verification (Bridge-level) |
| rclone/go-proton-api | #2 | Open | Verification endpoint + Verifier types |
| henrybear327/Proton-API-Bridge | #34 | Open | Verification API (LouisBrunner) |
| henrybear327/go-proton-api | #5 | Open | Verification endpoint (LouisBrunner) |