I am new to libp2p and running into two problems with two different sets of example code found on the libp2p website. I am running Windows 10 virtual machine and using the libp2p-js lib.
UnhandledPromiseRejectionWarning: Error: The dial request has no addresses
- node index.js /ip4/127.0.0.1/tcp/63963/p2p/QmYdWmXac5AxnQoJ5cwRAjicbx …
+ CategoryInfo : NotSpecified: ((node:15584) Un...as no addresses:String) , RemoteException + FullyQualifiedErrorId : NativeCommandError at Dialer.connectToPeer (C:\Users\...\node_modules\libp2p\src\dialer\index.js:74:21)
I have ensured the example code is copied as expected. Launching the first node (the listener) works fine, however launching a second node (the dialer) with args fails. I have tried sending the address in various address formats, as well as sending the multicast object, directly to
'node.ping(..)'. All fail.
Looking at the libp2p src, it looks the
src/dialer/index.js dialer connectToPeer() method is getting caught on
(!dialTarget.addrs.length). It maybe looks like libp2p’s ping/index.js
ping(node, peer) method is not taking the multiaddr format that is being passed in.
Is there a chance this format has changed or is not fully implemented properly in the js lib? Noticing there is only one param being sent in the example code for ping, but two params are expected in the ping src file.
I have setup the chat example from https://github.com/libp2p/js-libp2p/tree/master/examples/chat:
Similarly to the first example, I am able to successfully deploy the first node (listener) but the second node (dialer) fails due the connection not being multiplexed (error below). I am using the code exactly as specified in the example, and have confirmed the multiplexing module is enabled.
Error: node : (node:14652) UnhandledPromiseRejectionWarning: Error: connection is not + CategoryInfo : NotSpecified: ((node:14652) Un...not multiplexed:String) , RemoteException + FullyQualifiedErrorId : NativeCommandError at ClassIsWrapper.errConnectionNotMultiplexed [as _newStream] (C:\Users\...\node_modules\libp2p\src\upgrader.js:278:21)
New to libp2p and would really love any support here. Thanks!