dmotz / trystero

✨🤝✨ Build instant multiplayer webapps, no server required — Magic WebRTC matchmaking over BitTorrent, Nostr, MQTT, IPFS, Supabase, and Firebase
https://oxism.com/trystero
MIT License
1.33k stars 92 forks source link

can't seem to send data between peers with firebase and supabase #94

Open hchiam opened 3 weeks ago

hchiam commented 3 weeks ago

i noticed nostr relays stopped working and then also noticed an issue reported about nostr getting spammed, so i looked into using firebase and supabase instead, but now i can't seem to get data to transfer between peers:

onPeerJoin and onPeerLeave don't seem to be working for either firebase and supabase as of 0.20.0 in my minimal demo code:

you can use these to reproduce the bug for yourself, but you'll have to supply your own URLs and API keys to actually run the code. (aside: i had to download the minified files from https://github.com/dmotz/trystero/releases/tag/0.20.0 instead of using CDNs for some reason)

hchiam commented 2 weeks ago

"Trystero: no peer with id <...random-string-that-doesn't-match-local-selfId...> found" when using firebase https://github.com/dmotz/trystero/blob/main/src/room.js#L54 it seems that the peerIds being stored in firebase don't match the peers' own peerIds, or peerMap isn't getting properly populated to match firebase?