Closed
Description
DHT doesn't seem to work because of this. Built the latest js-ipfs + the DHT PR + the latest js-libp2p:
Then tried to use DHT:
ipfs.dht.findprovs('QmXXtHtDwXFbCTzMDjacZxid6CCNY4m5oM6MgBhyPVT3Tr')
ipfs._libp2pNode.contentRouting.findProviders('QmXXtHtDwXFbCTzMDjacZxid6CCNY4m5oM6MgBhyPVT3Tr', 5000, (...args) => console.log('done:', ...args));
Same result: the "No content routers available" error.
Dump of the console logs:
ipfs.dht.findprovs('QmXXtHtDwXFbCTzMDjacZxid6CCNY4m5oM6MgBhyPVT3Tr')
Promise {<rejected>: Error: No content routers available
at Object.findProviders (https://ipfs.io/ipfs/QmdFgDWRTB4L3K…}
content-routing.js:28 Uncaught (in promise) Error: No content routers available
at Object.findProviders (content-routing.js:28)
at Function.findprovs.promisify (dht.js:95)
at index.js:41
at new Promise (<anonymous>)
at Object.findprovs (index.js:35)
at <anonymous>:1:10
findProviders @ content-routing.js:28
findprovs.promisify @ dht.js:95
(anonymous) @ index.js:41
(anonymous) @ index.js:35
(anonymous) @ VM1356:1
6crypto.js:80 Uncaught Error: dialed to the wrong peer, Ids do not match
at PeerId.createFromPubKey (crypto.js:80)
at pubKey.hash (index.js:201)
at Multihashing.Multihashing.digest (index.js:33)
at index.js:15
at run (setImmediate.js:40)
at runIfPresent (setImmediate.js:69)
at onGlobalMessage (setImmediate.js:109)
PeerId.createFromPubKey @ crypto.js:80
pubKey.hash @ index.js:201
Multihashing.Multihashing.digest @ index.js:33
(anonymous) @ index.js:15
run @ setImmediate.js:40
runIfPresent @ setImmediate.js:69
onGlobalMessage @ setImmediate.js:109
postMessage (async)
registerImmediate @ setImmediate.js:120
setImmediate @ setImmediate.js:27
(anonymous) @ index.js:14
Promise.then (async)
nodeify @ index.js:13
(anonymous) @ crypto-sha1-2-browser.js:37
sha2256 @ crypto-sha1-2-browser.js:49
Ipfs../node_modules/peer-id/node_modules/multihashing-async/src/index.js.Multihashing.digest @ index.js:84
Multihashing @ index.js:28
hash @ rsa-class.js:43
Ipfs../node_modules/peer-id/src/index.js.exports.createFromPubKey @ index.js:196
Ipfs../node_modules/libp2p-secio/src/handshake/crypto.js.exports.identify @ crypto.js:72
waterfall @ propose.js:24
nextTask @ waterfall.js:16
next @ waterfall.js:23
(anonymous) @ onlyOnce.js:12
onComplete @ decode.js:49
reader.read @ decode.js:125
drain @ index.js:39
more @ index.js:55
(anonymous) @ index.js:66
(anonymous) @ index.js:20
(anonymous) @ map.js:19
(anonymous) @ index.js:114
(anonymous) @ index.js:114
(anonymous) @ map.js:19
(anonymous) @ source.js:31
ipfs._libp2pNode.contentRouting.findProviders('QmXXtHtDwXFbCTzMDjacZxid6CCNY4m5oM6MgBhyPVT3Tr', 5000, () => {});
undefined
2crypto.js:80 Uncaught Error: dialed to the wrong peer, Ids do not match
at PeerId.createFromPubKey (crypto.js:80)
at pubKey.hash (index.js:201)
at Multihashing.Multihashing.digest (index.js:33)
at index.js:15
at run (setImmediate.js:40)
at runIfPresent (setImmediate.js:69)
at onGlobalMessage (setImmediate.js:109)
PeerId.createFromPubKey @ crypto.js:80
pubKey.hash @ index.js:201
Multihashing.Multihashing.digest @ index.js:33
(anonymous) @ index.js:15
run @ setImmediate.js:40
runIfPresent @ setImmediate.js:69
onGlobalMessage @ setImmediate.js:109
postMessage (async)
registerImmediate @ setImmediate.js:120
setImmediate @ setImmediate.js:27
(anonymous) @ index.js:14
Promise.then (async)
nodeify @ index.js:13
(anonymous) @ crypto-sha1-2-browser.js:37
sha2256 @ crypto-sha1-2-browser.js:49
Ipfs../node_modules/peer-id/node_modules/multihashing-async/src/index.js.Multihashing.digest @ index.js:84
Multihashing @ index.js:28
hash @ rsa-class.js:43
Ipfs../node_modules/peer-id/src/index.js.exports.createFromPubKey @ index.js:196
Ipfs../node_modules/libp2p-secio/src/handshake/crypto.js.exports.identify @ crypto.js:72
waterfall @ propose.js:24
nextTask @ waterfall.js:16
next @ waterfall.js:23
(anonymous) @ onlyOnce.js:12
onComplete @ decode.js:49
reader.read @ decode.js:125
drain @ index.js:39
more @ index.js:55
(anonymous) @ index.js:66
(anonymous) @ index.js:20
(anonymous) @ map.js:19
(anonymous) @ index.js:114
(anonymous) @ index.js:114
(anonymous) @ map.js:19
(anonymous) @ source.js:31
ipfs._libp2pNode.contentRouting.findProviders('QmXXtHtDwXFbCTzMDjacZxid6CCNY4m5oM6MgBhyPVT3Tr', 5000, (...args) => console.log('done:', ...args));
VM1532:1 done: Error: No content routers available
at Object.findProviders (content-routing.js:28)
at <anonymous>:1:33