max-mapper / max-mapper/torrent
Error: not part of int at:6
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 630
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
Very often, in the middle of a torrent download, I get:
/Users/nathanh/.npm-packages/lib/node_modules/torrent/node_modules/bncode/bncode.js:222
throw new Error('not part of int at:'+pos.toString(16))
^
Error: not part of int at:6
at BdecodeSMachine.parse (/Users/nathanh/.npm-packages/lib/node_modules/torrent/node_modules/bncode/bncode.js:222:19)
at Bdecode.decode (/Users/nathanh/.npm-packages/lib/node_modules/torrent/node_modules/bncode/bncode.js:322:14)
at Object.decode (/Users/nathanh/.npm-packages/lib/node_modules/torrent/node_modules/bncode/bncode.js:444:11)
at null.<anonymous> (/Users/nathanh/.npm-packages/lib/node_modules/torrent/node_modules/torrent-stream/lib/exchange-metadata.js:22:23)
at g (events.js:199:16)
at emit (events.js:110:17)
at Wire._onextended (/Users/nathanh/.npm-packages/lib/node_modules/torrent/node_modules/peer-wire-protocol/index.js:306:7)
at onmessage (/Users/nathanh/.npm-packages/lib/node_modules/torrent/node_modules/peer-wire-protocol/index.js:112:16)
at Wire._write (/Users/nathanh/.npm-packages/lib/node_modules/torrent/node_modules/peer-wire-protocol/index.js:355:8)
at doWrite (_stream_writable.js:301:12)
at writeOrBuffer (_stream_writable.js:288:5)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with bncode.js:222 and trace the decode call from torrent-stream/lib/exchange-metadata.js:22 through peer-wire-protocol. Reproduce the error during a torrent download, then verify the behavior for the metadata input that triggers the parser failure and add or update a regression test if the repository provides one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100