orbitdb / field-manual

The Offical User's Guide to OrbitDB
207 stars 43 forks source link

In `04_P2P_Part_1`, `NPP.connectToPeer` got `Error: Circuit relay dial failed as addresses did not have peer id` #147

Open zhiquan911 opened 2 years ago

zhiquan911 commented 2 years ago

When I was studying the chapter of 04_P2P_Part_1, I opened two browsers, and the node of one browser called NPP.connectToPeer("QmUExv5GFBqqMWq9PQcur4UmnEGiY99gmqZQoMgCd2C8rd") to connect to the node of the other browser. I got Error: Circuit dial relay failed as addresses did not have peer id.

lilian131 commented 2 years ago

did you solve your problem ? same thing for me

Gezi-lzq commented 2 years ago

Now how is the situation, I also have this problem, which makes it can't learn later.

julienmalard commented 2 years ago

I had the same problem. I ended up having to implement a Webrtc-star server (https://suda.pl/free-webrtc-star-heroku/) to fix connection issues. Let me know if I can help further!

phonofidelic commented 2 years ago

Hi @julienmalard, thanks so much for pointing to this. Do you have any example code you could share for how you implemented this in regards to the orbit-db tutorial?

julienmalard commented 2 years ago

No problem! Here's my code: https://github.com/reseau-constellation/ipa/blob/main/src/ipfs.ts I added a line for my specific Webrtc-star server.

julienmalard commented 2 years ago

No problem! Here's my code: https://github.com/reseau-constellation/ipa/blob/main/src/ipfs.ts I added a line for my specific Webrtc-star server. You would then simply pass this ipfs instance into the orbit-db instance when you create it, and all should then work.