ssbc / ssb-server

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

errors spinning up scuttlebot #147

Closed mixmix closed 9 years ago

mixmix commented 9 years ago

heya, I'm trying ot insatll scuttletbot and running into errors. I ran

$ npm install -g scuttlebot
$ sbot server
...
$ sbot whoami
LOCAL_API { auth: 'async' }
{
  "id": "Q/uYK0Pt2XnfQ7Uv7fkh4iiM7LvyXMAjTjcWuh/xubA=.blake2s",
  "public": "bYGuUDYn8mtjGENJ8lEQXyS3oVZrO/hXiYcsMkcbNpv+tRwXf8Uj3uPTE6pGakAKcOhNnI48KGWIdgmO60Msnw==.k256"
}
$ sbot invite.addMe '176.58.117.63,TNn7v0MsAs8OpQnyRwtsMeROVWGlKnS/ItX966PAWjI=.blake2s,yCHiB1JfBdIEUZEW/eURMRYe64FTTKuj7+F1p/xDrUc='
sbot {cmd} {options}

If i browse to http://localhost:2000/, i'm prompted for a nickname, which if i input it crashes the server with

/home/mix/.nvm/v0.10.34/lib/node_modules/scuttlebot/node_modules/secure-scuttlebutt/validation.js:198
      if(!pub && !prev && next.content.type === 'init') {
                                      ^
TypeError: Cannot read property 'type' of undefined
    at validate (/home/mix/.nvm/v0.10.34/lib/node_modules/scuttlebot/node_modules/secure-scuttlebutt/validation.js:198:39)
    at /home/mix/.nvm/v0.10.34/lib/node_modules/scuttlebot/node_modules/secure-scuttlebutt/validation.js:149:7
    at /home/mix/.nvm/v0.10.34/lib/node_modules/scuttlebot/node_modules/secure-scuttlebutt/validation.js:118:16
    at continuation (/home/mix/.nvm/v0.10.34/lib/node_modules/scuttlebot/node_modules/cont/node_modules/continuable-para/node_modules/continuable-list/index.js:20:21)
    at /home/mix/.nvm/v0.10.34/lib/node_modules/scuttlebot/node_modules/secure-scuttlebutt/index.js:152:24
    at /home/mix/.nvm/v0.10.34/lib/node_modules/scuttlebot/node_modules/secure-scuttlebutt/node_modules/level-sublevel/shell.js:101:15
    at /home/mix/.nvm/v0.10.34/lib/node_modules/scuttlebot/node_modules/secure-scuttlebutt/node_modules/level-sublevel/nut.js:120:19

I've also tried using @dominictarr 's proposed invite :

sbot invite.addMe '176.58.117.63,TNn7v0MsAs8OpQnyRwtsMeROVWGlKnS/ItX966PAWjI=.blake2s,yCHiB1JfBdIEUZEW/eURMRYe64FTTKuj7+F1p/xDrUc='

and there's no response. If there's something obvious I'm doing that's wrong would love to hear. Also happy to pair at Node.conf if you have time Dominic

pfrazee commented 9 years ago

Thanks, this was reported in a related repo, https://github.com/ssbc/phoenix/issues/355. I'm working on it now.

mixmix commented 9 years ago

wow, lightning fast response! comment/close this when it's ready and I'll help test it if you like

:bouquet:

pfrazee commented 9 years ago

cool

pfrazee commented 9 years ago

Copying from the other issue...

Ok! I believe this was a dependency issue -- scuttlebot was importing an old version of the web frontend (phoenix). I've published scuttlebot 4.0.1, which includes the fix. Please give that a shot for me! You should have the ssbplug-phoenix dependency at 4.3.2.

mixmix commented 9 years ago

I'm seeing the dependency at ~4.3.0

interface is working now though.

noted a potential error on npm -g update scuttlebot :

make: Entering directory '/home/mix/.nvm/v0.10.34/lib/node_modules/scuttlebot/node_modules/secure-scuttlebutt/node_modules/level/node_modules/leveldown/build'
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.14.0/db/builder.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.14.0/db/db_impl.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.14.0/db/db_iter.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.14.0/db/filename.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.14.0/db/dbformat.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.14.0/db/log_reader.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.14.0/db/log_writer.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.14.0/db/memtable.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.14.0/db/repair.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.14.0/db/table_cache.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.14.0/db/version_edit.o
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-1.14.0/db/version_set.o
../deps/leveldb/leveldb-1.14.0/db/version_set.cc:58:13: warning: ‘std::string leveldb::{anonymous}::IntSetToString(const std::set<long unsigned int>&)’ defined but not used [-Wunused-function]
 std::string IntSetToString(const std::set<uint64_t>& s) {
             ^
mixmix commented 9 years ago

closing this, seems to be working fine now

pfrazee commented 9 years ago

:+1:

thanks for the heads up on the install issue, looks like it's just a warning so not going worry about it