Unable to replicate data in IPFS-CORE

I am unable to replicate Orbit-DB data across different peers. I am using IPFS-CORE and have my application open in two different browsers but the data that is created in one browser is not showing up in another browser.

This is my code:

I am using ā€œipfs-coreā€: ā€œ^0.14.1ā€

When I print the peers in my swarm Iā€™m getting an empty list which shouldnā€™t be the case. Any assistance would be greatly appreciated in solving this!

So it isnā€™t printing the same list of peers in the ā€˜other browserā€™ which means different physical machine, virtual machine or chromium vs Firefox/gecko on same machine with same IP address? Different sessions ? Maybe it actually needs to have pubsub communicate with the peers since it is enabled. That would allow crosstalk or ā€œinter process communicationā€ :pray: that and a flux capacitor with 1.21 Gigawattsā€¦ :sunglasses:

It might be related to the fact that WebRTC only works if you are publicly dialable (not behind NAT/firewall).

In such cases, itā€™s common to use WebSockets and a relay server. See this guide: Create a simple chat app | IPFS Docs for more information on how to do this.