ssbc / ssb-invite

"followbot" style invite codes for ssb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Error replicating with @xxxxx" after calling invite.accept

mixmix opened this issue · comments

scenario:

  • alice creates and invite with invite.create, passes it to bob
  • bob calls invite.accpet with that invite, then we see this erorr:
Error replicating wit

h @i91sIVrJDopSsqFUCmdDjcgZeWASXfZHE5QXN1Nn6eE=.ed25519:
   Error: no source:createHistoryStream
    at Object.localCall (/home/mix/projects/SSBC/ssb-invite/node_modules/muxrpc/local-api.js:29:13)
    at Object.<anonymous> (/home/mix/projects/SSBC/ssb-invite/node_modules/muxrpc/local-api.js:37:22)
    at PacketStreamSubstream.stream.read (/home/mix/projects/SSBC/ssb-invite/node_modules/muxrpc/stream.js:69:23)
    at PacketStream._onstream (/home/mix/projects/SSBC/ssb-invite/node_modules/packet-stream/index.js:228:11)
    at PacketStream.write (/home/mix/projects/SSBC/ssb-invite/node_modules/packet-stream/index.js:135:41)
    at /home/mix/projects/SSBC/ssb-invite/node_modules/muxrpc/pull-weird.js:56:15
    at /home/mix/projects/SSBC/ssb-invite/node_modules/pull-stream/sinks/drain.js:24:37
    at /home/mix/projects/SSBC/ssb-invite/node_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11
    at Object.cb (/home/mix/projects/SSBC/ssb-invite/node_modules/packet-stream-codec/index.js:111:11)
    at drain (/home/mix/projects/SSBC/ssb-invite/node_modules/pull-reader/index.js:39:14)

What' appears strange is that "feedId" is not for alice or bob. It is the id of a one-off keypair used in the invite, which is used to initiate a remote connection during the accept.

Basically a connection is formed where and we have RPC rights to call invite.use.
BUT ssb-replicate has a hook on ssb.on('rpc:connect') so when we connect with out invite code, it's a bit different to a "normal" connection .. but ssb-replicate doesn't know that and tries to call createHistoryStream nonetheless.

As far as I can tell, this is a safe error, and should not cause problems with the peers replicating ...