You are reading content from Scuttlebutt
@Gordon %/dvwgA/RGvfZR/iOqykIJWTAEiwNYdl7b8jwj6fbmE0=.sha256

Palaroonies. I'm looking for some pointers / help getting to the bottom with an issue with feed replication / EBT I'm having in the browser.

I've been tinkering with ssb-chess in the browser over at recently and I've ran into an issue where two browser clients stop (or never start) replicating over EBT and it seems to go something like this

  • Two browsers are following each other's feeds and know how to connect to each other via an ssb-room.
  • Two browser clients successfully connect and replicate updates between each other over EBT.
  • They share some metadata like this:
"feedId": <number>"
  • They send and receive message updates of new messages (chess moves in this case)
  • One browser refreshes / changes page and a connection is re-established
  • Neither browser sends or receives new messages from each other, even after refreshing the page on both devices.

Video here:

Around the 1 minute mark I refresh the page on my mobile phone and the replication stops working. Neither the phone or laptop receives any new messages from each other.

@23sJ/XY... is the laptop browser client and @t1BjKDM... is the mobile phone browser client

One curiosity is that the logging appears to imply they both connect to each other, and then the laptop receives this from the phone:

"laptopFeedId": -1

From the phone. I haven't seen the -1 message when successful replication happens (and I don't think it's in the video above at the start)

Does anyone know what that -1 message might mean? It seems like a good place to start digging...

This is where I set up the ssb-browser-core config:

#ssb-browser #ssb-ebt #halp

Other curiosities:

  • Sometimes it doesn't seem to work in the first place, prior to a refresh. I think this might have something to do with me going to before or something.

  • Sometimes they appear to send empty objects to each other as the metadata on connecting, and then no messages (which just happened just now):

Connected to: @cZ2MPKxavTiqd/zljKjerRh/6YL3RR3DMUTHFYltURE=.ed25519
chess.js:73216 connected to: @t1BjKDMB0ghEVyXhIJxVlwe2slq8AnazH/drXTg2mP8=.ed25519
chess.js:29598 EBT:conn @t1BjKDMB0ghEVyXhIJxVlwe2slq8AnazH/drXTg2mP8=.ed25519
chess.js:29809 EBT:send (@23sJ/XYmtbxfHNlfhV/DpvQ7Zv2lg8QnOqY3pSVjVh0=.ed25519) {}[[Prototype]]: Object
chess.js:29745 EBT:recv {}
  • I don't think it's a phone browser issue because I've seen the same behaviour on firefox + chrome with different identities on the same device.

CC @arj @cryptix

User has not chosen to be hosted publicly
@Anders %hffX7UiwA+b27SuUg3y+cN1FhI4u5GuFzwUTuzXL2WM=.sha256

@happy0 I recently uncovered a race condition in ssb-ebt that has been lurking there the whole time. Try delaying the conn start a bit and see if that helps. Also are the two nodes following each other? -1 should mean it does not want to replicate a feed.

Join Scuttlebutt now