ssbc / ssb-ebt

secure scuttlebutt replication with epidemic-broadcast-trees
MIT License
18 stars 10 forks source link

TypeError #31

Closed mixmix closed 4 years ago

mixmix commented 5 years ago
TypeError: Cannot read property '@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed25519' of null
    at Object.peerStatus (/home/mix/projects/SSBC/patchbay/node_modules/ssb-ebt/index.js:179:54)
    at Object.<anonymous> (/home/mix/projects/SSBC/patchbay/node_modules/ssb-server/node_modules/secret-stack/util.js:80:17)
    at Object.<anonymous> (/home/mix/projects/SSBC/patchbay/node_modules/ssb-server/node_modules/hoox/index.js:3:17)
    at Object.hooked (/home/mix/projects/SSBC/patchbay/node_modules/ssb-server/node_modules/hoox/index.js:10:15)
    at Object.localCall (/home/mix/projects/SSBC/patchbay/node_modules/ssb-server/node_modules/muxrpc/local-api.js:23:40)
    at Object.<anonymous> (/home/mix/projects/SSBC/patchbay/node_modules/ssb-server/node_modules/muxrpc/local-api.js:37:22)
    at Object.request (/home/mix/projects/SSBC/patchbay/node_modules/ssb-server/node_modules/muxrpc/stream.js:48:17)
    at PacketStream._onrequest (/home/mix/projects/SSBC/patchbay/node_modules/ssb-server/node_modules/packet-stream/index.js:161:17)
    at PacketStream.write (/home/mix/projects/SSBC/patchbay/node_modules/ssb-server/node_modules/packet-stream/index.js:134:41)
    at /home/mix/projects/SSBC/patchbay/node_modules/ssb-server/node_modules/muxrpc/pull-weird.js:56:15

Line index.js:179 looks like this, and this is saying peer.replicating === null

    peerStatus: function (id) {
      id = id || sbot.id
      var data = {
        id: id,
        seq: ebt.state.clock[id],
        peers: {},
      }
      for(var k in ebt.state.peers) {
        var peer = ebt.state.peers[k]
        if(peer.clock[id] != null || peer.replicating[id] != null) { // <<<<<<<< 179
          var rep = peer.replicating && peer.replicating[id]
          data.peers[k] = {
            seq: peer.clock[id],
            replicating: rep
          }
        }
      }
      return data
    },
stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?