ssbc / ssb-server

The gossip and replication server for Secure Scuttlebutt - a distributed social network
1.69k stars 164 forks source link

unhandled error after upgrading to 9.0.1 #361

Closed mmckegg closed 8 years ago

mmckegg commented 8 years ago
TypeError: Cannot read property 'mean' of null
    at isLongterm (/Users/matt/Code/ferment/node_modules/scuttlebot/plugins/gossip/schedule.js:69:30)
    at Array.filter (native)
    at connect (/Users/matt/Code/ferment/node_modules/scuttlebot/plugins/gossip/schedule.js:120:45)
    at Timeout._onTimeout (/Users/matt/Code/ferment/node_modules/scuttlebot/plugins/gossip/schedule.js:166:5)
    at tryOnTimeout (timers.js:232:11)
    at Timer.listOnTimeout (timers.js:202:5)
function isLongterm (e) {
  return e.ping && e.ping.rtt.mean > 0 // throws here
}

Any ideas @dominictarr?

dominictarr commented 8 years ago

oh, this is from upgrading pull-ping, it should have been a breaking change

dominictarr commented 8 years ago

I've unpublished pull-ping@1.0.2, and republished it as 2.0.0 reinstall and I think it will work

mmckegg commented 8 years ago

Cool, that fixed the error. But a new one has appeared:

Error: argument n must be 32 bytes long
    at Error (native)
    at State.verifyClientAuth (/Users/matt/Code/ferment/node_modules/secret-handshake/state.js:102:15)
    at Object.cb (/Users/matt/Code/ferment/node_modules/secret-handshake/handshake.js:80:19)
    at drain (/Users/matt/Code/ferment/node_modules/pull-reader/index.js:39:14)
    at more (/Users/matt/Code/ferment/node_modules/pull-reader/index.js:51:13)
    at /Users/matt/Code/ferment/node_modules/pull-reader/index.js:62:9
    at /Users/matt/Code/ferment/node_modules/pull-reader/index.js:20:7
    at drain (/Users/matt/Code/ferment/node_modules/stream-to-pull-stream/index.js:141:18)
    at Socket.<anonymous> (/Users/matt/Code/ferment/node_modules/stream-to-pull-stream/index.js:150:5)
    at emitOne (events.js:96:13)

Looks like something isn't expecting the address to start with net:....

dominictarr commented 8 years ago

dammit, sorry for breaking everything... how to reproduce?

dominictarr commented 8 years ago

what if you update to 9.0.2 instead?

mmckegg commented 8 years ago

Doesn't look like 9.0.2 has been published to npm, and it can't be installed direct from github because the noderify only runs on prepublish and bin links to sbot.js.

Good news though: I've joined both the sodium-prebuilt repo and leveldown as a contributor and will be pushing electron prebuilds to make it way easier to get things running

dominictarr commented 8 years ago

oh that is great news, I'll publish 9.0.2

mmckegg commented 8 years ago

This also means cross-building patchwork/ferment will be a lot easier. I'll be able to build for mac, linux and maybe even windows all on one machine without booting up VMs.

dominictarr commented 8 years ago

9.0.2 is published

mmckegg commented 8 years ago

Problem is still there.

By the way, this scuttlebot test is also failing on my machine with the same error above:

https://github.com/ssbc/scuttlebot/blob/master/test/block.js#L37

mmckegg commented 8 years ago

Alright, the problem has been caused by a breaking change in sodium-prebuilt which was pushed out yesterday.

https://github.com/mafintosh/node-sodium-prebuilt/pull/1

@dominictarr Maybe we should pin sodium-prebuilt@1.0.22?

dominictarr commented 8 years ago

hmm, oh maybe this wasn't effecting me because I was on node@6.1

dominictarr commented 8 years ago

pinned in chloride@2.2.4, reinstall to get update

mmckegg commented 8 years ago

Awesome 👍

Closing. Everything else is working great, btw!