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

[BUG] Weird metainfo validation error in CLI #201

Open
atomashpolskiy opened this issue Dec 16, 2021 · 3 comments
Open

[BUG] Weird metainfo validation error in CLI #201

atomashpolskiy opened this issue Dec 16, 2021 · 3 comments
Labels

Comments

@atomashpolskiy
Copy link
Owner

Describe the bug
Happens in CLI, then it just hangs (does not terminate).

[16/Dec/2021:19:49:54,073] INFO  BtRuntimeBuilder: Loading standard extension module bt.peer.lan.LocalServiceDiscoveryModule
[16/Dec/2021:19:49:54,079] INFO  BtRuntimeBuilder: Loading standard extension module bt.peerexchange.PeerExchangeModule
[16/Dec/2021:19:49:54,080] INFO  BtRuntimeBuilder: Overriding auto-loaded module bt.dht.DHTModule
[16/Dec/2021:19:49:54,081] INFO  BtRuntimeBuilder: Auto-loading module bt.portmapping.upnp.UpnpPortMapperModule with default configuration
[16/Dec/2021:19:49:54,081] INFO  BtRuntimeBuilder: Auto-loading module bt.tracker.http.HttpTrackerModule with default configuration
[16/Dec/2021:19:49:54,784] INFO  PortMappingInitializer: Mapping application's acceptor port on startup.
[16/Dec/2021:19:49:55,022] INFO  SocketChannelConnectionAcceptor: Opening server channel for incoming connections @ /192.168.1.134:6891
[16/Dec/2021:19:49:55,268] ERROR TerminateOnErrorProcessingStage: Unexpected error during processing, will finalize context and terminate...
bt.BtException: Validation failed for torrent metainfo:
1. Standard torrent model: [Wrong type -- expected java.lang.Number, actual: [B]
2. Standalone info dictionary model: [properties are mutually exclusive: [[length], [files]]; properties are required: [length, files]; properties are required: [piece length, pieces]]
        at bt.metainfo.MetadataService.buildTorrent(MetadataService.java:110)
        at bt.metainfo.MetadataService.fromUrl(MetadataService.java:74)
        at bt.TorrentClientBuilder.fetchTorrentFromUrl(TorrentClientBuilder.java:340)
        at bt.TorrentClientBuilder.lambda$buildProcessingContext$0(TorrentClientBuilder.java:273)
        at bt.processor.torrent.FetchTorrentStage.doExecute(FetchTorrentStage.java:36)
        at bt.processor.torrent.FetchTorrentStage.doExecute(FetchTorrentStage.java:25)
        at bt.processor.TerminateOnErrorProcessingStage.doExecute(TerminateOnErrorProcessingStage.java:38)
        at bt.processor.RoutingProcessingStage.execute(RoutingProcessingStage.java:39)
        at bt.processor.ChainProcessor.doExecute(ChainProcessor.java:112)
        at bt.processor.ChainProcessor.executeStage(ChainProcessor.java:96)
        at bt.processor.ChainProcessor.lambda$process$0(ChainProcessor.java:81)
        at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
[16/Dec/2021:19:49:55,376] WARN  PortMappingListener: Failed to add port mapping: (PortMapping) Protocol: UDP, 49001 => /192.168.1.134
[16/Dec/2021:19:49:55,377] WARN  PortMappingListener: Reason: Error: Argument Value Invalid (HTTP response was: 500 Internal Server Error)
[16/Dec/2021:19:49:55,796] WARN  PortMappingListener: Failed to add port mapping: (PortMapping) Protocol: TCP, 6891 => /192.168.1.134
[16/Dec/2021:19:49:55,797] WARN  PortMappingListener: Reason: Error: Argument Value Invalid (HTTP response was: 500 Internal Server Error)

To Reproduce
Can't post the link to .torrent here.

@pvishnyakov
Copy link

Got the same error, have you found the cause?
Another library is parsing the same torrent file without any problem so it's not a file issue.

@pyckle
Copy link
Collaborator

pyckle commented Nov 29, 2023

This sounds like a corrupted torrent file. More specifically from http://bittorrent.org/beps/bep_0003.html

There is also a key length or a key files, but not both or neither. If length is present then the download represents a single file, otherwise it represents a set of files which go in a directory structure.

@pvishnyakov
Copy link

I would consider the file corrupted but jlibtorrent is handling the same file without any issue

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