-
Notifications
You must be signed in to change notification settings - Fork 1.2k
DHT is not available #1602
Comments
Hello @mccoysc The DHT is not enabled by default on We are working on having it enabled by default in a near future, you can track this on js-ipfs#856 |
in browser ,i config the dht to be true,the error appear again |
@mccoysc can you post the code you're using to configure the DHT and the code you're calling to cause this error? |
ping @mccoysc |
await ipfs.dht.findpeer("QmXp22HFGvo29o6dsGnJwxaHvTieEqMGr1pS55ZsZUonMf") Uncaught (in promise) Error: Callback function "anonymous" timed out. Error: Callback function "anonymous" timed out. (anonymous) @ timeout.js:68 |
really,"time out" should not be an error. |
and also, it's not work well. |
and if await ipfs.dht.findpeer("QmZ6YuHZUJd6k9hbJNaNUZBsWfwZGv62piZMU6oxHPBtDx"),it works well. |
@mccoysc can you share a full example of how you are creating the node and making this call? |
just like the code in this issue |
This is because the DHT module is not passed to libp2p in the browser. In 0.34 DHT will be enabled in the browser also. |
Uncaught (in promise) Error: DHT is not available Error: DHT is not available
at Object.findProviders (content-routing.js:7)
at Function.findprovs.n (dht.js:86)
at index.js:41
at i.e._execute (bluebird.min.js:29)
at i._resolveFromExecutor (bluebird.min.js:30)
at new i (bluebird.min.js:30)
at Object.findprovs (index.js:35)
at :1:38
at :1:100
The text was updated successfully, but these errors were encountered: