cjb / GitTorrent

A decentralization of GitHub using BitTorrent and Bitcoin
MIT License
4.75k stars 264 forks source link

`TypeError: Cannot read property 'length' of undefined` #15

Open vinipsmaker opened 9 years ago

vinipsmaker commented 9 years ago
vinipsmaker ~/test $ git clone gittorrent://github.com/cjb/recursers
Cloning into 'recursers'...

Okay, we want to get: 5fbfea8de70ddc686dafdd24b690893f98eb9475

/usr/lib/node_modules/gittorrent/node_modules/bittorrent-dht/node_modules/k-bucket/index.js:225
    if ((id.length <= bytesDescribedByBitIndex)
           ^
TypeError: Cannot read property 'length' of undefined
    at KBucket.determineBucket (/usr/lib/node_modules/gittorrent/node_modules/bittorrent-dht/node_modules/k-bucket/index.js:225:12)
    at KBucket.get (/usr/lib/node_modules/gittorrent/node_modules/bittorrent-dht/node_modules/k-bucket/index.js:258:18)
    at DHT._onPut (/usr/lib/node_modules/gittorrent/node_modules/bittorrent-dht/client.js:485:27)
    at DHT._onQuery (/usr/lib/node_modules/gittorrent/node_modules/bittorrent-dht/client.js:1051:30)
    at DHT._onData (/usr/lib/node_modules/gittorrent/node_modules/bittorrent-dht/client.js:1035:10)
    at Socket.emit (events.js:110:17)
    at UDP.onMessage (dgram.js:472:8)
zsh: exit 128   git clone gittorrent://github.com/cjb/recursers

Version 0.1.7 installed through npm.

cjb commented 9 years ago

Interesting, I think someone must be putting a mutable key with a bad value or something.