qBittorrent unable to locate files containing 'Left-To-Right-Mark character' in the filename #15233

Closed
opened 2026-02-22 01:55:06 -05:00 by deekerman · 12 comments
Owner

Originally created by @vincejv on GitHub (Nov 28, 2023).

qBittorrent & operating system versions

qBittorrent: v4.6.2 (also tested until v4.6.0)
Qt: 6.6.1
Libtorrent: 2.0.9.0
Boost: 1.82.0
OpenSSL: 3.1.4
zlib: 1.3

Operating System:
Linux Pictor 5.15.137 #0 SMP Tue Nov 14 13:38:11 2023 x86_64 GNU/Linux
Ubuntu 22.04.3 LTS x86_64
Docker version 24.0.5, build ced0996
linuxserver image

What is the problem?

Unable to upload torrent, error message "mismatching file size" after several torrent re-creation
File is copyrighted content, I'm not sure if I can upload it in github as "fair use"? It's isolated to this specific file, i've uploaded a bunch of torrents already to a private tracker (1TB+) no issues there
Tried using Transmission 4.0.4, no issue

Steps to reproduce

  1. Import the torrent file with the following import settings
    image
  2. Status of the imported torrent file will show 'Missing files', this is the execution log
  3. To try to remediate the issue by manual "recheck"
  4. Missing this exact file
    image

Full error on fast resume:

Failed to restore torrent. Files were probably moved or storage isn't accessible. Torrent: "Pokemon (1997) Season 18 S18 (1080p Mixed x265 HEVC 10bit Mixed 2.0 YOGI)". Reason: "Pokemon (1997) Season 18 S18 (1080p Mixed x265 HEVC 10bit Mixed 2.0 YOGI) fast resume rejected. file_stat(/data/torrents/uploads/Pokemon (1997) Season 18 S18 (1080p Mixed x265 HEVC 10bit Mixed 2.0 YOGI)/Pokemon - S18E137 - The Wisdom Not to Run! WEBDL-1080p.mkv): mismatching file size""

When rechecking the torrent file:
image

Additional context

File is stored on BTRFS FS with the following mount options
autodefrag,noatime,compress=zstd:3,compress-force=zstd:3,space_cache=v2,discard=async,commit=120,device=/dev/sdc1,device=/dev/sdb

When uploading the torrent and stored in ext4 fs, no issue
Tried using Transmission 4.0.4, no issue as well

Further Troubleshooting:

  • Flush ram/OS Disk Cahce
  • Restart docker image
  • Redownload and reupload the file from original source
  • Check file integrity by sha256sum
  • check file permissions with ls -alh

Log(s) & preferences file(s)

[custom-init] No custom files found, skipping...
WebUI will be started shortly after internal preparations. Please wait...

******** Information ********
To control qBittorrent, access the WebUI at: http://localhost:9089

Connection to localhost (::1) 9089 port [tcp/*] succeeded!
[ls.io-init] done.

Execution Log

Added new torrent. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p"
Failed to restore torrent. Files were probably moved or storage isn't accessible. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p". Reason: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p.mkv fast resume rejected. file_stat(/data/torrents/uploads/Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p/Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p.mkv): mismatching file size"
Enqueued torrent move. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p". Source: "/data/torrents/uploads". Destination: "/data/torrents/downloads/incomplete"
Start moving torrent. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p". Destination: "/data/torrents/downloads/incomplete"
Moved torrent successfully. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p". Destination: "/data/torrents/downloads/incomplete"
Originally created by @vincejv on GitHub (Nov 28, 2023). ### qBittorrent & operating system versions qBittorrent: v4.6.2 (also tested until v4.6.0) Qt: 6.6.1 Libtorrent: 2.0.9.0 Boost: 1.82.0 OpenSSL: 3.1.4 zlib: 1.3 Operating System: Linux Pictor 5.15.137 #0 SMP Tue Nov 14 13:38:11 2023 x86_64 GNU/Linux Ubuntu 22.04.3 LTS x86_64 Docker version 24.0.5, build ced0996 linuxserver image ### What is the problem? Unable to upload torrent, error message "mismatching file size" after several torrent re-creation File is copyrighted content, I'm not sure if I can upload it in github as "fair use"? It's isolated to this specific file, i've uploaded a bunch of torrents already to a private tracker (1TB+) no issues there Tried using Transmission 4.0.4, no issue ### Steps to reproduce 1. Import the torrent file with the following import settings ![image](https://github.com/qbittorrent/qBittorrent/assets/1276544/660e6289-4cca-464a-9eec-25dfb4971f41) 2. Status of the imported torrent file will show 'Missing files', **this is the execution log** 3. To try to remediate the issue by manual "recheck" 4. Missing this exact file ![image](https://github.com/qbittorrent/qBittorrent/assets/1276544/5df9d540-1af6-4af8-9385-560df6598e5e) Full error on fast resume: ``` Failed to restore torrent. Files were probably moved or storage isn't accessible. Torrent: "Pokemon (1997) Season 18 S18 (1080p Mixed x265 HEVC 10bit Mixed 2.0 YOGI)". Reason: "Pokemon (1997) Season 18 S18 (1080p Mixed x265 HEVC 10bit Mixed 2.0 YOGI) fast resume rejected. file_stat(/data/torrents/uploads/Pokemon (1997) Season 18 S18 (1080p Mixed x265 HEVC 10bit Mixed 2.0 YOGI)/Pokemon - S18E137 - The Wisdom Not to Run! WEBDL-1080p.mkv): mismatching file size"" ``` When rechecking the torrent file: ![image](https://github.com/qbittorrent/qBittorrent/assets/1276544/65d00bc8-a9b8-4a66-b45e-8576ac24d1ba) ### Additional context File is stored on BTRFS FS with the following mount options `autodefrag,noatime,compress=zstd:3,compress-force=zstd:3,space_cache=v2,discard=async,commit=120,device=/dev/sdc1,device=/dev/sdb` ~**When uploading the torrent and stored in ext4 fs, no issue**~ **Tried using Transmission 4.0.4, no issue as well** Further Troubleshooting: - [x] Flush ram/OS Disk Cahce - [x] Restart docker image - [x] Redownload and reupload the file from original source - [x] Check file integrity by sha256sum - [x] check file permissions with `ls -alh` ### Log(s) & preferences file(s) ``` [custom-init] No custom files found, skipping... WebUI will be started shortly after internal preparations. Please wait... ******** Information ******** To control qBittorrent, access the WebUI at: http://localhost:9089 Connection to localhost (::1) 9089 port [tcp/*] succeeded! [ls.io-init] done. ``` Execution Log ``` Added new torrent. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p" Failed to restore torrent. Files were probably moved or storage isn't accessible. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p". Reason: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p.mkv fast resume rejected. file_stat(/data/torrents/uploads/Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p/Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p.mkv): mismatching file size" Enqueued torrent move. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p". Source: "/data/torrents/uploads". Destination: "/data/torrents/downloads/incomplete" Start moving torrent. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p". Destination: "/data/torrents/downloads/incomplete" Moved torrent successfully. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p". Destination: "/data/torrents/downloads/incomplete" ```
Author
Owner

@vincejv commented on GitHub (Nov 28, 2023):

Related: https://github.com/qbittorrent/qBittorrent/issues/19609

@vincejv commented on GitHub (Nov 28, 2023): Related: https://github.com/qbittorrent/qBittorrent/issues/19609
Author
Owner

@vincejv commented on GitHub (Nov 28, 2023):

Reopening as workaround described on: https://github.com/qbittorrent/qBittorrent/issues/19609 and https://github.com/qbittorrent/qBittorrent/issues/16127 does not work
File name: Pokémon - S18E137 - The Wisdom Not to Run!‎ WEBDL-1080p.mkv

Works with transmission

@vincejv commented on GitHub (Nov 28, 2023): Reopening as workaround described on: https://github.com/qbittorrent/qBittorrent/issues/19609 and https://github.com/qbittorrent/qBittorrent/issues/16127 does not work File name: `Pokémon - S18E137 - The Wisdom Not to Run!‎ WEBDL-1080p.mkv` Works with transmission
Author
Owner

@glassez commented on GitHub (Dec 1, 2023):

@vincejv
Having provided quite a lot of information, you still managed to hide what really matters (or just confuse, using incorrect wording).

When uploading the torrent and stored in ext4 fs, no issue
Tried using Transmission 4.0.4, no issue as well

So maybe it's not about qBittorrent after all? Although, of course, it can also be in qBittorrent+BtrFS...

File name: Pokémon - S18E137 - The Wisdom Not to Run!‎ WEBDL-1080p.mkv

As I can see there is é in the file name. There was an Issue somewhere in qBittorrent bug tracker due to the fact that such characters were encoded differently in the torrent metadata and the file system.

@glassez commented on GitHub (Dec 1, 2023): @vincejv Having provided quite a lot of information, you still managed to hide what really matters (or just confuse, using incorrect wording). >When uploading the torrent and stored in ext4 fs, no issue Tried using Transmission 4.0.4, no issue as well So maybe it's not about qBittorrent after all? Although, of course, it can also be in qBittorrent+BtrFS... > File name: `Pokémon - S18E137 - The Wisdom Not to Run!‎ WEBDL-1080p.mkv` As I can see there is `é` in the file name. There was an Issue somewhere in qBittorrent bug tracker due to the fact that such characters were encoded differently in the torrent metadata and the file system.
Author
Owner

@glassez commented on GitHub (Dec 1, 2023):

  • Upload the .torrent file to QBT
  • Run a recheck

Why do you need to Run a recheck. Isn't files checked initially?

@glassez commented on GitHub (Dec 1, 2023): > * Upload the `.torrent` file to QBT > * Run a recheck Why do you need to `Run a recheck`. Isn't files checked initially?
Author
Owner

@glassez commented on GitHub (Dec 1, 2023):

Execution Log

Added new torrent. Torrent: "Pokemon (1997) S18 (1080p Mixed x265 HEVC 10bit Mixed 2.0 YOGI)"
Failed to restore torrent. Files were probably moved or storage isn't accessible. Torrent: "Pokemon (1997) S18 (1080p Mixed x265 HEVC 10bit Mixed 2.0 YOGI)". Reason: "Pokemon (1997) S18 (1080p Mixed x265 HEVC 10bit Mixed 2.0 YOGI) fast resume rejected. file_stat(/data/torrents/uploads/Pokemon (1997) S18 (1080p Mixed x265 HEVC 10bit Mixed 2.0 YOGI)/Pokemon - S18E137 - The Wisdom Not to Run! WEBDL-1080p.mkv): mismatching file size"

Did these entries exactly follow in a row in the log? Theoretically, this should not happen, since the second is possible only when restoring a previously added torrent (i.e., one added before restarting qBittorrent).

P.S. Such questions could have been avoided if you had provided the log as it is, without trying to assume what information might be useful and what might not.

@glassez commented on GitHub (Dec 1, 2023): >Execution Log ``` Added new torrent. Torrent: "Pokemon (1997) S18 (1080p Mixed x265 HEVC 10bit Mixed 2.0 YOGI)" Failed to restore torrent. Files were probably moved or storage isn't accessible. Torrent: "Pokemon (1997) S18 (1080p Mixed x265 HEVC 10bit Mixed 2.0 YOGI)". Reason: "Pokemon (1997) S18 (1080p Mixed x265 HEVC 10bit Mixed 2.0 YOGI) fast resume rejected. file_stat(/data/torrents/uploads/Pokemon (1997) S18 (1080p Mixed x265 HEVC 10bit Mixed 2.0 YOGI)/Pokemon - S18E137 - The Wisdom Not to Run! WEBDL-1080p.mkv): mismatching file size" ``` Did these entries exactly follow in a row in the log? Theoretically, this should not happen, since the second is possible only when restoring a previously added torrent (i.e., one added before restarting qBittorrent). P.S. Such questions could have been avoided if you had provided the log as it is, without trying to assume what information might be useful and what might not.
Author
Owner

@vincejv commented on GitHub (Dec 1, 2023):

@glassez

Why do you need to Run a recheck. Isn't files checked initially?

No I didn't import the torrent with recheck, but i tried to manually recheck after the import, but the error persists
image

As I can see there is é in the file name.

image
As part of my troubleshooting I tried to replace the é, with e, still doesn't work so it's probably something else in the file name, probably the !

Did these entries exactly follow in a row in the log? Theoretically, this should not happen, since the second is possible only when restoring a previously added torrent (i.e., one added before restarting qBittorrent).

Yes,

Updated steps to reproduce: (will update the initial post)

  1. Import the torrent file with the following import settings
    image
  2. Status of the imported torrent file will show 'Missing files', this is the execution log
  3. To try to remediate the issue by manual "recheck"
  4. Missing this exact file
    image

Also I think you are correct missed some of the logs

Added new torrent. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p"
Failed to restore torrent. Files were probably moved or storage isn't accessible. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p". Reason: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p.mkv fast resume rejected. file_stat(/data/torrents/uploads/Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p/Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p.mkv): mismatching file size"
Enqueued torrent move. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p". Source: "/data/torrents/uploads". Destination: "/data/torrents/downloads/incomplete"
Start moving torrent. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p". Destination: "/data/torrents/downloads/incomplete"
Moved torrent successfully. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p". Destination: "/data/torrents/downloads/incomplete"

So maybe it's not about qBittorrent after all?

as per initial post, there's no issue importing and rechecking it with Transmission 4.0.4

There was an Issue somewhere in qBittorrent bug tracker due to the fact that such characters were encoded differently in the torrent metadata and the file system.

Is there any work around documented? So i can check if this isn't the case?

@vincejv commented on GitHub (Dec 1, 2023): @glassez > Why do you need to Run a recheck. Isn't files checked initially? No I didn't import the torrent with recheck, but i tried to manually recheck after the import, but the error persists ![image](https://github.com/qbittorrent/qBittorrent/assets/1276544/80b14c4e-d408-4637-bcb7-61a57487e9f6) > As I can see there is é in the file name. ![image](https://github.com/qbittorrent/qBittorrent/assets/1276544/d06cb132-f9f7-4761-8b1a-a9ba8e6f5331) As part of my troubleshooting I tried to replace the `é`, with `e`, still doesn't work so it's probably something else in the file name, probably the `!` > Did these entries exactly follow in a row in the log? Theoretically, this should not happen, since the second is possible only when restoring a previously added torrent (i.e., one added before restarting qBittorrent). Yes, Updated steps to reproduce: (will update the initial post) 1. Import the torrent file with the following import settings ![image](https://github.com/qbittorrent/qBittorrent/assets/1276544/660e6289-4cca-464a-9eec-25dfb4971f41) 2. Status of the imported torrent file will show 'Missing files', **this is the execution log** 3. To try to remediate the issue by manual "recheck" 4. Missing this exact file ![image](https://github.com/qbittorrent/qBittorrent/assets/1276544/5df9d540-1af6-4af8-9385-560df6598e5e) Also I think you are correct missed some of the logs ``` Added new torrent. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p" Failed to restore torrent. Files were probably moved or storage isn't accessible. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p". Reason: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p.mkv fast resume rejected. file_stat(/data/torrents/uploads/Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p/Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p.mkv): mismatching file size" Enqueued torrent move. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p". Source: "/data/torrents/uploads". Destination: "/data/torrents/downloads/incomplete" Start moving torrent. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p". Destination: "/data/torrents/downloads/incomplete" Moved torrent successfully. Torrent: "Pokémon - S18E137 - The Wisdom Not to Run! WEBDL-1080p". Destination: "/data/torrents/downloads/incomplete" ``` > So maybe it's not about qBittorrent after all? as per initial post, there's no issue importing and rechecking it with Transmission 4.0.4 > There was an Issue somewhere in qBittorrent bug tracker due to the fact that such characters were encoded differently in the torrent metadata and the file system. Is there any work around documented? So i can check if this isn't the case?
Author
Owner

@vincejv commented on GitHub (Dec 1, 2023):

@glassez
Please see the attached torrent file here, i've only included the problematic file
Pokémon - S18E137 - The Wisdom Not to Run!‎ WEBDL-1080p.mkv.torrent.zip

@vincejv commented on GitHub (Dec 1, 2023): @glassez Please see the attached torrent file here, i've only included the problematic file [Pokémon - S18E137 - The Wisdom Not to Run!‎ WEBDL-1080p.mkv.torrent.zip](https://github.com/qbittorrent/qBittorrent/files/13531449/Pokemon.-.S18E137.-.The.Wisdom.Not.to.Run.WEBDL-1080p.mkv.torrent.zip)
Author
Owner

@glassez commented on GitHub (Dec 2, 2023):

@glassez Please see the attached torrent file here, i've only included the problematic file Pokémon - S18E137 - The Wisdom Not to Run!‎ WEBDL-1080p.mkv.torrent.zip

For some reason file name (written in torrent file) has Left-To-Right-Mark character between Run! and next space.
I wonder what file name qBittorrent gets from the file system?

@glassez commented on GitHub (Dec 2, 2023): > @glassez Please see the attached torrent file here, i've only included the problematic file [Pokémon - S18E137 - The Wisdom Not to Run!‎ WEBDL-1080p.mkv.torrent.zip](https://github.com/qbittorrent/qBittorrent/files/13531449/Pokemon.-.S18E137.-.The.Wisdom.Not.to.Run.WEBDL-1080p.mkv.torrent.zip) For some reason file name (written in torrent file) has [Left-To-Right-Mark character](https://www.unicodepedia.com/unicode/general-punctuation/200e/left-to-right-mark/) between `Run!` and next space. I wonder what file name qBittorrent gets from the file system?
Author
Owner

@vincejv commented on GitHub (Dec 2, 2023):

Left-To-Right-Mark character between Run!

After confirming with the source metadata TVDB, that seems to be the issue, is it something you will not fix due to BEP-8 specification as mentioned in other issues? I'll update the issue to reflect this.

@vincejv commented on GitHub (Dec 2, 2023): > [Left-To-Right-Mark character](https://www.unicodepedia.com/unicode/general-punctuation/200e/left-to-right-mark/) between `Run!` After confirming with the source metadata TVDB, that seems to be the issue, is it something you will not fix due to BEP-8 specification as mentioned in other issues? I'll update the issue to reflect this.
Author
Owner

@vincejv commented on GitHub (Dec 2, 2023):

Hi @glassez
Upon further investigation, seems like not a file system issue, happening in ext4 as well, i think when i copied the file over to ext4, it stripped off the lrm character somehow.

Also it seems like a libtorrent issue since it's happening in Deluge 2.1.1, libtorrent 2.0.9.0 as well. Will file a separate libtorrent issue, what happens is libtorrent completely removes the lrm character completely while in the file system, the lrm character is still there, that's why it's unable to locate the files.

For anyone else reading this, for the meantime, you can use non libtorrent clients such as Transmission as it leaves the filenames alone.

@vincejv commented on GitHub (Dec 2, 2023): Hi @glassez Upon further investigation, seems like not a file system issue, happening in ext4 as well, i think when i copied the file over to ext4, it stripped off the `lrm` character somehow. Also it seems like a libtorrent issue since it's happening in Deluge 2.1.1, libtorrent 2.0.9.0 as well. Will file a separate libtorrent issue, what happens is libtorrent completely removes the `lrm` character completely while in the file system, the `lrm` character is still there, that's why it's unable to locate the files. For anyone else reading this, for the meantime, you can use non libtorrent clients such as Transmission as it leaves the filenames alone.
Author
Owner

@glassez commented on GitHub (Dec 3, 2023):

Also it seems like a libtorrent issue since it's happening in Deluge 2.1.1, libtorrent 2.0.9.0 as well.

Well, then it should definitely be reported to libtorrent.

what happens is libtorrent completely removes the lrm character completely while in the file system, the lrm character is still there, that's why it's unable to locate the files.

It seems that the problem only affects the original seeders (that have files with such a names on disk). If someone wants to download such a torrent, libtorrent will simply create new files without these characters in the name and use them further.

@glassez commented on GitHub (Dec 3, 2023): > Also it seems like a libtorrent issue since it's happening in Deluge 2.1.1, libtorrent 2.0.9.0 as well. Well, then it should definitely be reported to `libtorrent`. > what happens is libtorrent completely removes the `lrm` character completely while in the file system, the `lrm` character is still there, that's why it's unable to locate the files. It seems that the problem only affects the original seeders (that have files with such a names on disk). If someone wants to download such a torrent, `libtorrent` will simply create new files without these characters in the name and use them further.
Author
Owner

@vincejv commented on GitHub (Dec 3, 2023):

It seems that the problem only affects the original seeders

Will also be an issue if someone migrates from Transmission/Non-libtorrent client to QBT/Libtorrent clients and vice versa, nevertheless, it's primarily a libtorrent issue, every tool out there, torrent clients & torrent creators - mktorrent, torrentfile, torf, does not strip off anything in the filenames, including uTorrent/Bittorrent, I don't see why libtorrent will go out of spec.

@vincejv commented on GitHub (Dec 3, 2023): > It seems that the problem only affects the original seeders Will also be an issue if someone migrates from Transmission/Non-libtorrent client to QBT/Libtorrent clients and vice versa, nevertheless, it's primarily a libtorrent issue, every tool out there, torrent clients & torrent creators - mktorrent, torrentfile, torf, does not strip off anything in the filenames, including uTorrent/Bittorrent, I don't see why libtorrent will go out of spec.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#15233
No description provided.