P2P Docs

Troubleshoot common issues

Fixes for peer-to-peer building-block issues.

Troubleshooting confusing scenarios while developing with the peer-to-peer building blocks.

Looking for Pear CLI or deployment issues instead? See Pear's troubleshooting guide. Looking for Bare runtime issues? See Bare's troubleshooting guide.

Joining a Hyperswarm topic takes a long time

Hyperswarm topic discovery can stall for several common reasons:

  • Random NAT networks can take longer as another node may be needed to facilitate the connection. See Peer-to-peer, demystified for what's actually happening at the IP level.
  • Not destroying the hyperswarm instance during application teardown so Hyperswarm can unannounce and clean up the HyperDHT. It's recommended to clean up the hyperswarm instance with swarm.destroy() before exiting the application. This prevents conflicting records in the DHT for the application's peer which cause it take longer to join a topic. See Connect to many peers by topic with Hyperswarm for the full one-instance-per-app pattern.
  • A firewall is blocking the traffic. Please let Holepunch know if this is the case.

See also

On this page