ssbc / ssb-tribes2-demo

A simple electron app demonstrating the features of ssb-tribes2
Other
2 stars 0 forks source link

Demo issue tracker #2

Closed Powersource closed 1 year ago

Powersource commented 1 year ago
Powersource commented 1 year ago

asked @staltz about the automatic disconnects

There could be many reasons why the disconnect is happening Try to use debug to figure out Repl scheduler doesn't connect nor disconnect. ssb-conn does, but it only disconnects if there are too many connections

Tried debug but the connection stuff doesn't log a ton (note to self that it isn't prefixed by ssb:). Replication scheduler does mention that it'd be nice if conn was installed, I'll try that even if I guess it shouldn't help.

Powersource commented 1 year ago

Using ssb.conn.connect now I just get

ssb:conn-hub connecting to net:localhost:54704~shs:eK7TvrMtKOFkbn44NxVTri+btIbeQpoBHNLZavrYGmo= +0ms
ssb:conn-hub connected to net:localhost:54704~shs:eK7TvrMtKOFkbn44NxVTri+btIbeQpoBHNLZavrYGmo= +29ms
ssb:conn-hub disconnected from net:localhost:54704~shs:eK7TvrMtKOFkbn44NxVTri+btIbeQpoBHNLZavrYGmo= +6s

so not super informative

Powersource commented 1 year ago

Added a list of current connections so that should at least make the user feel less confused

staltz commented 1 year ago

ssb:conn-hub disconnected from net:localhost:54704~shs:eK7TvrMtKOFkbn44NxVTri+btIbeQpoBHNLZavrYGmo= +6s

You could try to add a console.trace() to the conn-hub disconnect logic, to figure out who is calling this disconnect, and why.

Powersource commented 1 year ago

Ha, found something!

"muxrpc:psc encoded" has this error:

"Error: unexpected end of parent stream
    at PacketStream.destroy (/home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/packet-stream@2.0.6/node_modules/packet-stream/index.js:64:7)
    at PacketStream.write (/home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/packet-stream@2.0.6/node_modules/packet-stream/index.js:126:41)
    at /home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/muxrpc@6.7.3/node_modules/muxrpc/pull-weird.js:74:17
    at /home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/pull-stream@3.7.0/node_modules/pull-stream/sinks/drain.js:26:24
    at /home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/pull-stream@3.7.0/node_modules/pull-stream/throughs/filter.js:17:11
    at Object.pscDecodeHead [as cb] (/home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/packet-stream-codec@1.2.0/node_modules/packet-stream-codec/index.js:94:25)
    at drain (/home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/pull-reader@1.3.1/node_modules/pull-reader/index.js:46:23)
    at /home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/pull-reader@1.3.1/node_modules/pull-reader/index.js:63:18
    at /home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/pull-abortable@4.1.1/node_modules/pull-abortable/index.js:43:11
    at /home/me/prj/ssb/ssb-tribes2-demo/node_modules/.pnpm/pull-stream@3.7.0/node_modules/pull-stream/throughs/through.js:19:9"
Powersource commented 1 year ago

Not sure what to do with that though. Maybe not worth spending time on.

Powersource commented 1 year ago

I'd say demo is done enough now actually

Powersource commented 1 year ago

André found a way to fix longer connections! f64560965e128b7911140f2f3f8170570800b41f

Powersource commented 1 year ago

Fixed one of the issues, the demo is definitely good enough now

Powersource commented 1 year ago

also did https://github.com/ssbc/ssb-tribes2-demo/issues/9