Dropbox root 'External/85.Kxswo [ZM]': sync batch commit: failed to commit batch length 1: batch commit failed: Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH

What is the problem you are having with rclone?

Copying files to Dropbox get stuck in the middle and will not finish uploading at all throws error 400 all the time!

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

- os/version: Microsoft Windows 11 Pro 22H2 (64 bit)
- os/kernel: 10.0.22621.1485 Build 22621.1485.1485 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.20.2
- go/linking: static
- go/tags: cmount```

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

Dropbox 

#### The command you were trying to run (eg `rclone copy /tmp remote:tmp`)  
<!--  You should use 3 backticks to begin and end your paste to make it readable.   -->

```rclone copy G:"アニメ" dbmexternalcrypt:"Anime [PC]" --config rclone.conf -vP --buffer-size 128m  –log-file=FILE```


#### The rclone config contents with secrets removed.  


[dbmexternal]
type = dropbox
client_id =
client_secret =
token = {""}

[dbmexternalcrypt]
type = crypt
filename_encryption = obfuscate
remote = dbmexternal:/External
password =
password2 =

#### A log from the command with the `-vv` flag  
```2023-04-20 18:44:48 DEBUG : pacer: low level retry 1/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023-04-20 18:44:48 DEBUG : pacer: Rate limited, increasing sleep to 20ms
2023-04-20 18:44:48 DEBUG : pacer: low level retry 2/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023-04-20 18:44:48 DEBUG : pacer: Rate limited, increasing sleep to 40ms
2023-04-20 18:44:48 DEBUG : pacer: low level retry 3/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023-04-20 18:44:48 DEBUG : pacer: Rate limited, increasing sleep to 80ms
2023-04-20 18:44:49 DEBUG : pacer: low level retry 4/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023-04-20 18:44:49 DEBUG : pacer: Rate limited, increasing sleep to 160ms
2023-04-20 18:44:49 DEBUG : pacer: low level retry 5/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023-04-20 18:44:49 DEBUG : pacer: Rate limited, increasing sleep to 320ms
2023-04-20 18:44:50 DEBUG : pacer: low level retry 6/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023-04-20 18:44:50 DEBUG : pacer: Rate limited, increasing sleep to 640ms
2023-04-20 18:44:50 DEBUG : pacer: low level retry 7/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023-04-20 18:44:50 DEBUG : pacer: Rate limited, increasing sleep to 1.28s
2023-04-20 18:44:51 DEBUG : pacer: low level retry 8/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023-04-20 18:44:51 DEBUG : pacer: Rate limited, increasing sleep to 2s
2023-04-20 18:44:52 DEBUG : pacer: low level retry 9/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023-04-20 18:44:54 DEBUG : pacer: low level retry 10/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023-04-20 18:44:54 ERROR : Dropbox root 'External/85.Kxswo [ZM]': sync batch commit: failed to commit batch length 1: batch commit failed: Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH
Transferred:        5.752 GiB / 370.196 GiB, 2%, 0 B/s, ETA -
Checks:               722 / 722, 100%
Transferred:            0 / 1443, 0%
Elapsed time:     28m23.1s
Transferring:
 * [AI-Raws] 劇場用映画 ちびまる子ち…40 FLAC)[1EC6F87E].mkv:100% /4.224Gi, 0/s, -
 * [2021-22][Muv-Luv Alte…NDATION (flac+png).rar:100% /776.594Mi, 0/s, -
 * [2021-22][Muv-Luv Alte… FOUNDATION (flac).rar:100% /143.711Mi, 0/s, -
 * [2021-22][Muv-Luv Alte…ンドトラック (wavx2+jpg).rar:100% /642.694Mi, 0/s, -```

Do you file names contain emojis? These are invalid in dropbox file names.

Check here for the full list: Naming Dropbox files and folders - Dropbox Help

They contain Kanji / japanese characters not emojis perhaps.
does that mean i gotta rename all them to japanese and try again?

Test one file, check the logs and validate the error.

Share the FULL debug log of the error.

I think Kanji should be OK. Can you share a file name which is failing then we can check what is wrong with it?

ok sure sorry about the 3 day delay almost forgot will get the log now and share here

1 Like

Failing here too. Just coping /Applications to Dropbox. Is there an option to skip on error?

2023/05/19 20:38:53 NOTICE: Adobe XD/Adobe XD.app/Contents/Frameworks/CommonInterop.framework/Versions/A/Frameworks/AdobeAGM.framework/AdobeAGM: Can't follow symlink without -L/--copy-links

2023/05/19 20:38:53 NOTICE: Adobe XD/Adobe XD.app/Contents/Frameworks/CommonInterop.framework/Versions/A/Frameworks/AdobeAGM.framework/Resources: Can't follow symlink without -L/--copy-links

2023/05/19 20:39:04 NOTICE: Adobe XD/Adobe XD.app/Contents/Frameworks/aiLibWrapperFramework.framework/Versions/A/Frameworks/AdobeJP2K.framework/Resources: Can't follow symlink without -L/--copy-links

2023/05/19 20:39:04 NOTICE: Adobe XD/Adobe XD.app/Contents/Frameworks/aiLibWrapperFramework.framework/Versions/A/Frameworks/AdobeJP2K.framework/AdobeJP2K: Can't follow symlink without -L/--copy-links

2023/05/19 20:39:08 NOTICE: Adobe XD/Adobe XD.app/Contents/Frameworks/CommonInterop.framework/Versions/A/Frameworks/AdobeACE.framework/Versions/Current: Can't follow symlink without -L/--copy-links

2023/05/19 20:39:10 NOTICE: Adobe Photoshop CC 2019/Adobe Photoshop CC 2019.app/Contents/Frameworks/AdobeExtendScript.framework/Resources: Can't follow symlink without -L/--copy-links

2023/05/19 20:39:10 NOTICE: Adobe Photoshop CC 2019/Adobe Photoshop CC 2019.app/Contents/Frameworks/AdobeExtendScript.framework/AdobeExtendScript: Can't follow symlink without -L/--copy-links

2023/05/19 20:40:17 NOTICE: Adobe XD/Adobe XD.app/Contents/Frameworks/aiLibWrapperFramework.framework/Versions/A/Frameworks/AdobeAXEDOMCore.framework/Versions/Current: Can't follow symlink without -L/--copy-links

2023/05/19 20:40:24 NOTICE: Adobe Photoshop CC 2019/Adobe Photoshop CC 2019.app/Contents/Frameworks/AdobeCrashReporter.framework/Versions/Current: Can't follow symlink without -L/--copy-links

2023/05/19 20:40:29 NOTICE: DB Browser for SQLite.app/Contents/Frameworks/QtCore.framework/Resources: Can't follow symlink without -L/--copy-links

2023/05/19 20:40:29 NOTICE: DB Browser for SQLite.app/Contents/Frameworks/QtCore.framework/QtCore: Can't follow symlink without -L/--copy-links

2023/05/19 20:40:33 NOTICE: DB Browser for SQLite.app/Contents/Frameworks/QtConcurrent.framework/Versions/Current: Can't follow symlink without -L/--copy-links

2023/05/19 20:41:25 NOTICE: Adobe Bridge CC 2019/Adobe Bridge 2019.app/Contents/Frameworks/AdobeJP2K.framework/Resources: Can't follow symlink without -L/--copy-links

2023/05/19 20:41:25 NOTICE: Adobe Bridge CC 2019/Adobe Bridge 2019.app/Contents/Frameworks/AdobeJP2K.framework/AdobeJP2K: Can't follow symlink without -L/--copy-links

2023/05/19 20:41:43 NOTICE: Adobe Photoshop 2021/Adobe Photoshop 2021.app/Contents/MacOS/DynamicLinkMediaServer/dynamiclinkmanager.app/Contents/Frameworks/boost_date_time.framework/boost_date_time: Can't follow symlink without -L/--copy-links

2023/05/19 20:41:43 NOTICE: Adobe Photoshop 2021/Adobe Photoshop 2021.app/Contents/MacOS/DynamicLinkMediaServer/dynamiclinkmanager.app/Contents/Frameworks/boost_date_time.framework/Resources: Can't follow symlink without -L/--copy-links

2023/05/19 20:42:28 ERROR : Dropbox root 'Crypted/Apps': sync batch commit: failed to commit batch length 1: batch commit failed: Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH

2023/05/19 20:43:05 ERROR : Dropbox root 'Crypted/Apps': sync batch commit: failed to commit batch length 1: batch commit failed: Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH

2023/05/19 20:43:33 ERROR : Dropbox root 'Crypted/Apps': sync batch commit: failed to commit batch length 2: batch commit failed: Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH

Can you show me the file name which is failing?

Note that dropbox file names can not have emojis in.

narrow down to the character

mkdir -p ~/Downloads/test
touch ~/Downloads/test/鿵
rclone copy -vv ~/Downloads/test dp:

reproduced the issue:

2023/05/23 15:41:35 DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "copy" "-vv" "/Users/z/Downloads/test" "dp:"]
2023/05/23 15:41:35 DEBUG : Creating backend with remote "/Users/z/Downloads/test"
2023/05/23 15:41:35 DEBUG : Using config file from "/Users/z/.config/rclone/rclone.conf"
2023/05/23 15:41:35 DEBUG : Creating backend with remote "dp:"
2023/05/23 15:41:35 DEBUG : Dropbox root '': Waiting for checks to finish
2023/05/23 15:41:35 DEBUG : Dropbox root '': Waiting for transfers to finish
2023/05/23 15:41:36 DEBUG : 鿵: Uploading chunk 1/0
2023/05/23 15:41:36 DEBUG : 鿵: Uploading chunk 2/0
2023/05/23 15:41:36 DEBUG : Dropbox root '': Adding "/鿵" to batch
2023/05/23 15:41:37 DEBUG : Dropbox root '': Batch idle for 500ms so committing
2023/05/23 15:41:37 DEBUG : Dropbox root '': Committing sync batch length 1 starting with: /鿵
2023/05/23 15:41:37 DEBUG : pacer: low level retry 1/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023/05/23 15:41:37 DEBUG : pacer: Rate limited, increasing sleep to 20ms
2023/05/23 15:41:37 DEBUG : pacer: low level retry 2/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023/05/23 15:41:37 DEBUG : pacer: Rate limited, increasing sleep to 40ms
2023/05/23 15:41:37 DEBUG : pacer: low level retry 3/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023/05/23 15:41:37 DEBUG : pacer: Rate limited, increasing sleep to 80ms
2023/05/23 15:41:38 DEBUG : pacer: low level retry 4/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023/05/23 15:41:38 DEBUG : pacer: Rate limited, increasing sleep to 160ms
2023/05/23 15:41:38 DEBUG : pacer: low level retry 5/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023/05/23 15:41:38 DEBUG : pacer: Rate limited, increasing sleep to 320ms
2023/05/23 15:41:38 DEBUG : pacer: low level retry 6/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023/05/23 15:41:38 DEBUG : pacer: Rate limited, increasing sleep to 640ms
2023/05/23 15:41:38 DEBUG : pacer: low level retry 7/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023/05/23 15:41:38 DEBUG : pacer: Rate limited, increasing sleep to 1.28s
2023/05/23 15:41:39 DEBUG : pacer: low level retry 8/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023/05/23 15:41:39 DEBUG : pacer: Rate limited, increasing sleep to 2s
2023/05/23 15:41:40 DEBUG : pacer: low level retry 9/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023/05/23 15:41:42 DEBUG : pacer: low level retry 10/10 (error Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH)
2023/05/23 15:41:42 ERROR : Dropbox root '': sync batch commit: failed to commit batch length 1: batch commit failed: Error in call to API function "files/upload_session/finish_batch:2": 400 Bad Request - Invalid path: INVALID_PATH
^C2023/05/23 15:42:08 INFO  : Signal received: interrupt
2023/05/23 15:42:08 INFO  : Dropbox root '': Committing uploads - please wait...
2023/05/23 15:42:08 INFO  : Exiting...

c.c. @ncw

You'd want to remove that character.

It is not my naming, it is generated from the filename obfuscation for crypt dropbox folders

Well done for tracking the character down. That is unicode character 0x9ff5 which apparently is not a valid character. Dropbox (unlike most other providers) check the unicode for validity in their file names.

Hmm, that is unfortunate, I didn't realise obfuscate could generate invalid unicode characters. I'm not sure it something we can fix easily.

Thoughts @sweh ?

You could switch encoding? base32768 works very well with Dropbox and it is much more efficient than the usual base32 but less efficient than obfuscate.

This is possibly a GoLang bug or a Dropbox limitation. We've seen this before (e.g. April '21); The upload fails when the rclone copy command transfers a specific file

1 Like

Its definitely a Dropbox limitation. Unfortunately it looks like the obfuscate mode has generated an invalid unicode character 0x9ff5 which Dropbox refuses.

I'm not sure why obfuscate did that though - do you know?

You could switch encoding? base32768 works very well with Dropbox and it is much more efficient than the usual base32 but less efficient than obfuscate .

Should filename_encoding = base32768 be used with filename_encryption = obfuscate or filename_encryption = standard?

Standard.

Obfuscate doesn't encrypt the file name at all.

As the referenced post mentions, GoLang thinks it's a valid Rune and so it gets allowed.

1 Like

@sweh Yes we've had this conversation before haven't we, sorry!

With filename_encryption = standard I think.

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