Skip to content

Dropbox batch commit failed with emojis in filename #6199

Closed

Description

What is the problem you are having with rclone?

I'm trying to transfer files from Google Drive to Dropbox, and encountering errors with some filenames containing emojis.

What is your rclone version (output from rclone version)

rclone v1.58.1
- os/version: debian 11.3 (64 bit)
- os/kernel: 5.10.0-13-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.17.9
- go/linking: static
- go/tags: none

Which OS you are using and how many bits (e.g. Windows 7, 64 bit)

Debian 11, 64-bit

Which cloud storage system are you using? (e.g. Google Drive)

Google Drive -> Dropbox

The command you were trying to run (e.g. rclone copy /tmp remote:tmp)

rclone sync -P --drive-service-account-file ~/.config/rclone/srv1.json --transfers 8 td-crypt: dropbox:

A log from the command with the -vv flag (e.g. output from rclone -vv copy /tmp remote:tmp)

Slightly different command, but same idea:

root@milkyway:~# rclone copy -vv -P --drive-service-account-file ~/.config/rclone/srv1.json --transfers 8 td-crypt:'K-Pop/VLIVE/BLACKPINK' dropbox:'K-Pop/VLIVE/BLACKPINK'
2022/05/28 09:02:57 DEBUG : rclone: Version "v1.58.1" starting with parameters ["rclone" "copy" "-vv" "-P" "--drive-service-account-file" "/root/.config/rclone/srv1.json"
 "--transfers" "8" "td-crypt:K-Pop/VLIVE/BLACKPINK" "dropbox:K-Pop/VLIVE/BLACKPINK"]                                                                                      
2022/05/28 09:02:57 DEBUG : Creating backend with remote "td-crypt:K-Pop/VLIVE/BLACKPINK"                                                                                 
2022/05/28 09:02:57 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"                                                                                     
2022/05/28 09:02:57 DEBUG : Creating backend with remote "td:Private/0108hicc4ue5lunfdvauu82p3g/j6s0qol4lta0n0gpi9qi73vbn8/it3ggtdf1sv5q02e2354ud98c4"
2022/05/28 09:02:57 DEBUG : td: detected overridden config - adding "{Ug4pl}" suffix to name
2022/05/28 09:02:58 DEBUG : fs cache: renaming cache item "td:Private/0108hicc4ue5lunfdvauu82p3g/j6s0qol4lta0n0gpi9qi73vbn8/it3ggtdf1sv5q02e2354ud98c4" to be canonical "t
d{Ug4pl}:Private/0108hicc4ue5lunfdvauu82p3g/j6s0qol4lta0n0gpi9qi73vbn8/it3ggtdf1sv5q02e2354ud98c4"
2022/05/28 09:02:58 DEBUG : fs cache: switching user supplied name "td:Private/0108hicc4ue5lunfdvauu82p3g/j6s0qol4lta0n0gpi9qi73vbn8/it3ggtdf1sv5q02e2354ud98c4" for canon
ical name "td{Ug4pl}:Private/0108hicc4ue5lunfdvauu82p3g/j6s0qol4lta0n0gpi9qi73vbn8/it3ggtdf1sv5q02e2354ud98c4"
2022/05/28 09:02:58 DEBUG : Creating backend with remote "dropbox:K-Pop/VLIVE/BLACKPINK"
2022-05-28 09:02:59 DEBUG : 2018-.rtf: Size and modification time the same (differ by 0s, within tolerance 1s)
2022-05-28 09:02:59 DEBUG : 2018-.rtf: Unchanged skipping
[removed a bunch of unchanged files]
2022-05-28 09:03:46 DEBUG : Dropbox root 'K-Pop/VLIVE/BLACKPINK': Waiting for transfers to finish                                                                        
2022-05-28 09:03:49 DEBUG : 2017/BLINKSS 뇽안 💖/BLINKSS 뇽안 💖 [720p].mp4: Uploading chunk 3/5                                                                          
2022-05-28 09:03:49 DEBUG : 2017/8월8일8시 블핑 탄생일 ♥️🙏/8월8일8시 블핑 탄생일 ♥️🙏 [720p].mp4: Uploading chunk 3/7
2022-05-28 09:03:49 DEBUG : 2017/다시 돌아온 일상🤘🖤/다시 돌아온 일상🤘🖤 [720p].mp4: Uploading chunk 3/6
2022-05-28 09:03:50 DEBUG : 2017/두번째 도전🙏🏻✨/두번째 도전🙏🏻✨ [720p].mp4: Uploading chunk 3/6
2022-05-28 09:03:50 DEBUG : 2017/블랙핑크가 어딜간다규??🙊🙈/블랙핑크가 어딜간다규??🙊🙈 [720p].mp4: Uploading chunk 3/4
2022-05-28 09:03:50 DEBUG : 2017/이동중인 챙 ◻︎🍁/이동중인 챙 ◻︎🍁 [720p].mp4: Uploading chunk 3/9                        
2022-05-28 09:03:50 DEBUG : 2017/머리띠잇슈😎/머리띠잇슈😎 [720p].mp4: Uploading chunk 3/10                                                                         
2022-05-28 09:03:51 DEBUG : 2017/BP at White Night ◻︎🖤💖/BP at White Night ◻︎🖤💖 [360p].mp4: Uploading chunk 2/2                                          
2022-05-28 09:03:51 DEBUG : 2017/두번째 도전🙏🏻✨/두번째 도전🙏🏻✨ [720p].mp4: Uploading chunk 4/6
2022-05-28 09:03:52 DEBUG : 2017/머리띠잇슈😎/머리띠잇슈😎 [720p].mp4: Uploading chunk 4/10
2022-05-28 09:03:52 DEBUG : 2017/다시 돌아온 일상🤘🖤/다시 돌아온 일상🤘🖤 [720p].mp4: Uploading chunk 4/6
2022-05-28 09:03:52 DEBUG : 2017/8월8일8시 블핑 탄생일 ♥️🙏/8월8일8시 블핑 탄생일 ♥️🙏 [720p].mp4: Uploading chunk 4/7                                                      
2022-05-28 09:03:53 DEBUG : 2017/BLINKSS 뇽안 💖/BLINKSS 뇽안 💖 [720p].mp4: Uploading chunk 4/5                                                                          
2022-05-28 09:03:53 DEBUG : 2017/블랙핑크가 어딜간다규??🙊🙈/블랙핑크가 어딜간다규??🙊🙈 [720p].mp4: Uploading chunk 4/4
2022-05-28 09:03:53 DEBUG : 2017/이동중인 챙 ◻︎🍁/이동중인 챙 ◻︎🍁 [720p].mp4: Uploading chunk 4/9        
2022-05-28 09:03:54 DEBUG : Dropbox root 'K-Pop/VLIVE/BLACKPINK': Adding "/K-Pop/VLIVE/BLACKPINK/2017/BP at White Night ◻︎🖤💖/BP at White Night ◻︎🖤💖 [360p].mp4" to batch
2022-05-28 09:03:54 DEBUG : 2017/두번째 도전🙏🏻✨/두번째 도전🙏🏻✨ [720p].mp4: Uploading chunk 5/6
2022-05-28 09:03:54 DEBUG : Dropbox root 'K-Pop/VLIVE/BLACKPINK': Batch idle for 500ms so committing
2022-05-28 09:03:54 DEBUG : Dropbox root 'K-Pop/VLIVE/BLACKPINK': Committing sync batch length 1 starting with: /K-Pop/VLIVE/BLACKPINK/2017/BP at White Night ◻︎🖤💖/BP at 
White Night ◻︎🖤💖 [360p].mp4
2022-05-28 09:03:55 DEBUG : 2017/다시 돌아온 일상🤘🖤/다시 돌아온 일상🤘🖤 [720p].mp4: Uploading chunk 5/6
2022-05-28 09:03:55 DEBUG : Dropbox root 'K-Pop/VLIVE/BLACKPINK': Upload batch completed in 179.487685ms
2022-05-28 09:03:55 ERROR : Dropbox root 'K-Pop/VLIVE/BLACKPINK': sync batch commit: failed to commit batch length 1: batch had 1 errors: last error: path/malformed_path
2022-05-28 09:03:55 ERROR : 2017/BP at White Night ◻︎🖤💖/BP at White Night ◻︎🖤💖 [360p].mp4: Failed to copy: upload failed: batch upload failed: path/malformed_path

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.

Activity

  1. animosity022 commented on May 28, 2022

    @animosity022
    Contributor

    I'd imagine those emojis or whatnot are not allowed on dropbox.

    Can you name that file without that in it?

    https://help.dropbox.com/files-folders/sort-preview/file-names

  2. ncw commented on May 30, 2022

    @ncw
    Member

    path/malformed_path

    The means that the path failed dropbox path tests.

    Unfortunately emojis aren't allowed in dropbox file names :-(

    $ echo hello | rclone -vv rcat dropbox:😊.txt
    2022/05/30 17:13:46 DEBUG : rclone: Version "v1.59.0-beta.6166.ce988e6a1.fix-keepalives" starting with parameters ["rclone" "-vv" "rcat" "dropbox:😊.txt"]
    2022/05/30 17:13:46 DEBUG : Creating backend with remote "dropbox:"
    2022/05/30 17:13:46 DEBUG : Using config file from "/home/ncw/.rclone.conf"
    2022/05/30 17:13:46 DEBUG : Dropbox root '': File to upload is small (6 bytes), uploading instead of streaming
    2022/05/30 17:13:47 DEBUG : 😊.txt: Uploading chunk 1/1
    2022/05/30 17:13:48 DEBUG : 😊.txt: Uploading chunk 2/1
    2022/05/30 17:13:49 DEBUG : Dropbox root '': Adding "/😊.txt" to batch
    2022/05/30 17:13:49 DEBUG : Dropbox root '': Batch idle for 500ms so committing
    2022/05/30 17:13:49 DEBUG : Dropbox root '': Committing sync batch length 1 starting with: /😊.txt
    2022/05/30 17:13:49 WARNING: API `UploadSessionFinishBatch` is deprecated
    2022/05/30 17:13:49 Use API `UploadSessionFinishBatchV2` instead
    2022/05/30 17:13:51 DEBUG : Dropbox root '': Upload batch completed in 571.018239ms
    2022/05/30 17:13:51 ERROR : Dropbox root '': sync batch commit: failed to commit batch length 1: batch had 1 errors: last error: path/malformed_path
    2022/05/30 17:13:51 ERROR : 😊.txt: Failed to copy: upload failed: batch upload failed: path/malformed_path
    2022/05/30 17:13:51 ERROR : 😊.txt: Post request rcat error: upload failed: batch upload failed: path/malformed_path
    2022/05/30 17:13:51 DEBUG : 11 go routines active
    2022/05/30 17:13:51 Failed to rcat: upload failed: batch upload failed: path/malformed_path
    2022/05/30 17:13:51 INFO  : Dropbox root '': Commiting uploads - please wait...
    
  3. ghost changed the title [-]Dropbox batch commit failed with Korean characters in filename[/-] [+]Dropbox batch commit failed with emojis in filename[/+] on May 31, 2022
  4. animosity022 commented on May 31, 2022

    @animosity022
    Contributor

    I assume you can use rename/ sed / perl / etc and just remove all the garbage.

    In English, I'd do:

    mv 'file' $(echo 'file' | sed -e 's/[^A-Za-z0-9._-]/_/g')
    

    Something like that I'd imagine.

  5. animosity022 commented on May 31, 2022

    @animosity022
    Contributor

    I'd imagine it's possible with the encoding options but I tend to use the simpler tool to get the job done rather than trying to remap stuff, I'd just use rename/etc and fix it globally so my source and destination match up.

  6. animosity022 commented on Jun 12, 2022

    @animosity022
    Contributor

    Closing this out as answered.

  7. NyaMisty commented on May 26, 2023

    @NyaMisty
    Contributor

    I've got emoji working on dropbox in my fork, but I'm not sure whether this mod is okay for rclone.

  8. ncw commented on May 31, 2023

    @ncw
    Member

    @NyaMisty how did you manage that?

  9. NyaMisty commented on May 31, 2023

    @NyaMisty
    Contributor

    @NyaMisty how did you manage that?

    after experiment I found actually Dropbox not only refuses emoji, but also all non-BMP chars.

    So I added an encoder that directed all runes > 0x10000 to EncodeInvalidUtf8 logic (which encodes rune into escaped utf8 bytes.

    (Also please have a look at my PR if you have spare time, thanks)

  10. ncw commented on Jun 1, 2023

    @ncw
    Member

    @NyaMisty how did you manage that?

    after experiment I found actually Dropbox not only refuses emoji, but also all non-BMP chars.

    OK

    So I added an encoder that directed all runes > 0x10000 to EncodeInvalidUtf8 logic (which encodes rune into escaped utf8 bytes.

    Sound interesting.

    Did you add this logic to lib/encoder? Or is is separate?

    (Also please have a look at my PR if you have spare time, thanks)

    Have done so :-)

  11. NyaMisty commented on Jun 1, 2023

    @NyaMisty
    Contributor

    yeah, added in lib/encoder.go, I'll try to form a PR in recent days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions