This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
swarm.connect: Error: multiaddr must have a valid format #3501
Labels
need/triage
Needs initial labeling and prioritization
Severity: High
Description:
I have one peer trying to connect to another one with only his CID using:
ipfs.swarm.connect('/p2p-circuit/p2p/${peerId}')
And got this error:
Error: multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".
At first I was using
ipfs@0.50.2
withipfs.swarm.connect('/p2p-circuit/ipfs/${peerId}')
and worked just fine.So I dig around and found that it's now preferable to use
p2p
instead ofipfs
for the multiaddress but still didn't resolve anything.I found that
ipfs.swarm.connect
is using thedial
function oflibp2p
, so I'm not sure if this an issue only related to libp2p.I also tried to use the
get
function of theaddressBook
present in libp2p to find the precise mutliaddress to use but with the same result:So what should I do, is there something that I'm missing here ?
Steps to reproduce the error:
Two nodes running in the browser using this config:
Get the CID of the first one and try to connect to the first with the second one using:
The text was updated successfully, but these errors were encountered: