holepunchto / hyperdht

The DHT powering Hyperswarm
https://docs.holepunch.to
MIT License
323 stars 46 forks source link

Cannot read property length of null when using flushed() in Hyperswarm #75

Closed hexadecible closed 2 years ago

hexadecible commented 2 years ago

The following error started occurring when using flushed() in server mode in Hyperswarm. This only started happening in v5.0.13 and does not appear when reverting to v5.0.12.

TypeError: Cannot read property 'length' of null
    at Object.preencode (.../node_modules/compact-encoding/index.js:309:34)
    at Object.preencode (.../node_modules/@hyperswarm/dht/lib/messages.js:179:15)
    at Object.encode (.../node_modules/compact-encoding/index.js:371:7)
    at annSignable (.../node_modules/@hyperswarm/dht/lib/persistent.js:261:7)
    at signAnnounce (.../node_modules/@hyperswarm/dht/lib/persistent.js:237:44)
    at HyperDHT._requestAnnounce (.../node_modules/@hyperswarm/dht/index.js:306:27)
    at commit (.../node_modules/@hyperswarm/dht/index.js:138:18)
    at Query.commit [as _commit] (.../node_modules/@hyperswarm/dht/index.js:94:14)
mafintosh commented 2 years ago

Fixed in latest