Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to deserialize torrent metainfo #454

Open
mueslo opened this issue Jun 19, 2020 · 3 comments
Open

Failed to deserialize torrent metainfo #454

mueslo opened this issue Jun 19, 2020 · 3 comments
Labels

Comments

@mueslo
Copy link

mueslo commented Jun 19, 2020

$ imdl torrent show tmp/somefile.torrent
error: Failed to deserialize torrent metainfo from `tmp/somefile.torrent`: Error: bencode encoding corrupted (Keys were not sorted)

Created by uTorrent/2210

File cannot be provided, but works fine in normal torrent clients.

imdl version 0.1.8

@casey
Copy link
Owner

casey commented Jun 19, 2020

That's interesting!

BitTorrent metainfo is stored in a format called bencode, which requires that keys in dictionaries be stored in sorted order. Intermodal rejects .torrent files where the keys aren't in order.

It sounds like other torrent clients don't actually do this, which is surprising.

I'd like to get my hands on the torrent file, just to make sure that the keys are actually out of order, but I understand if the contents are sensitive. I might be able to write a tool that dumps the keys in a torrent file, which would help diagnose the problem without exposing any information about the contents.

Is this the only torrent file that you've had issues with, and did you create it yourself?

@casey casey added the defect label Jun 19, 2020
@awsms
Copy link

awsms commented Jul 19, 2021

same here with torrents from oppaitime.

@casey
Copy link
Owner

casey commented Jul 19, 2021

@awsms Is it the same bencode encoding corrupted (Keys were not sorted) error? Torrents with unsorted keys are technically invalid, so I'm unsure what should be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants