ssbc / patchbay

An alternative Secure Scuttlebutt client interface that is fully compatible with Patchwork
http://www.scuttlebutt.nz
386 stars 78 forks source link

Error: could not connect to sbot (lite client) #42

Closed evbogue closed 8 years ago

evbogue commented 8 years ago

I'm still working of Cryptix's build of Patchbay for the lite client.

When I run npm run build and navigate to the file in my browser I see this error:

When I use an invite code, I also see this error after pressing 'accept'.

Error: could not connect to sbot
    at file:///home/ev/patchbay/index.html:24294:23
    at file:///home/ev/patchbay/index.html:18060:24
    at onConnect (file:///home/ev/patchbay/index.html:18278:11)
    at WebSocket.<anonymous> (file:///home/ev/patchbay/index.html:21760:13)
    at WebSocket.onError (file:///home/ev/patchbay/index.html:30976:14)
    at WebSocket.EventEmitter.emit (file:///home/ev/patchbay/index.html:48933:17)
    at response (file:///home/ev/patchbay/index.html:31245:12)
  Error: unexpected server response (404)
    at response (file:///home/ev/patchbay/index.html:31243:15)
    at g (file:///home/ev/patchbay/index.html:49017:16)
    at EventEmitter.emit (file:///home/ev/patchbay/index.html:48933:17)
    at ClientRequest._connect (file:///home/ev/patchbay/index.html:60744:7)
    at file:///home/ev/patchbay/index.html:60648:9

If I try to hard code my ws server with localStorage.remote, in the console I see:

GET http://evbogue.com:8989/ 404 (Not Found)
dominictarr commented 8 years ago

what code are you running (link to commit?)

evbogue commented 8 years ago

@dominictarr The current Master, plus pull #41 (https://github.com/dominictarr/patchbay/commit/b9bba16f6ace46db4e0c16644c6bd62775f1454c)

I got the same errors a few days ago, when I ended up using Cryptix's build.

evbogue commented 8 years ago

I have the same experience with a clean clone of Patchbay.

evbogue commented 8 years ago

I just tried erasing the .config/chromium folder and I noticed that this error does not appear until I attempt to use an invite code for the first time.

dominictarr commented 8 years ago

can you send me an invite code that you where using?

evbogue commented 8 years ago

@dominictarr sent via sbot

evbogue commented 8 years ago

@dominictarr The invites I sent work with ssb.evbogue.com (the cryptix build)

evbogue commented 8 years ago
npm info it worked if it ends with ok
npm info using npm@3.10.5
npm info using node@v6.3.0
patchbay@1.7.8 /home/ev/patchbay
├─┬ brfs@1.4.3
│ ├─┬ quote-stream@1.0.2
│ │ ├── buffer-equal@0.0.1
│ │ └── minimist@1.2.0
│ ├── resolve@1.1.7
│ ├─┬ static-module@1.3.1
│ │ ├─┬ concat-stream@1.4.10
│ │ │ ├── inherits@2.0.1
│ │ │ ├─┬ readable-stream@1.1.14
│ │ │ │ └── isarray@0.0.1
│ │ │ └── typedarray@0.0.6
│ │ ├─┬ duplexer2@0.0.2
│ │ │ └─┬ readable-stream@1.1.14
│ │ │   └── isarray@0.0.1
│ │ ├─┬ escodegen@1.3.3
│ │ │ ├── esprima@1.1.1
│ │ │ ├── estraverse@1.5.1
│ │ │ ├── esutils@1.0.0
│ │ │ └─┬ source-map@0.1.43
│ │ │   └── amdefine@1.0.0
│ │ ├─┬ falafel@1.2.0
│ │ │ ├── acorn@1.2.2
│ │ │ ├── foreach@2.0.5
│ │ │ ├── isarray@0.0.1
│ │ │ └── object-keys@1.0.11
│ │ ├─┬ has@1.0.1
│ │ │ └── function-bind@1.1.0
│ │ ├── object-inspect@0.4.0
│ │ ├─┬ quote-stream@0.0.0
│ │ │ └── minimist@0.0.8
│ │ ├─┬ readable-stream@1.0.34
│ │ │ ├── core-util-is@1.0.2
│ │ │ ├── isarray@0.0.1
│ │ │ └── string_decoder@0.10.31
│ │ ├── shallow-copy@0.0.1
│ │ ├─┬ static-eval@0.2.4
│ │ │ └─┬ escodegen@0.0.28
│ │ │   ├── esprima@1.0.4
│ │ │   └── estraverse@1.3.2
│ │ └─┬ through2@0.4.2
│ │   └─┬ xtend@2.1.2
│ │     └── object-keys@0.4.0
│ └─┬ through2@2.0.1
│   ├─┬ readable-stream@2.0.6
│   │ ├── isarray@1.0.0
│   │ ├── process-nextick-args@1.0.7
│   │ └── util-deprecate@1.0.2
│   └── xtend@4.0.1
├─┬ cont@1.0.3
│ ├── continuable@1.2.0
│ ├─┬ continuable-para@1.2.0
│ │ ├─┬ continuable-hash@0.1.4
│ │ │ └── continuable@1.1.8
│ │ └─┬ continuable-list@0.1.6
│ │   └── continuable@1.1.8
│ └── continuable-series@1.2.0
├── depject@1.0.2
├── hyperlightbox@0.1.0
├─┬ hyperscript@1.4.7
│ ├── browser-split@0.0.0
│ ├─┬ class-list@0.1.1
│ │ └── indexof@0.0.1
│ └── html-element@1.3.0
├── hypertabs@1.2.0
├─┬ indexhtmlify@1.2.1
│ ├─┬ optimist@0.6.1
│ │ ├── minimist@0.0.10
│ │ └── wordwrap@0.0.3
│ └─┬ through2@0.4.2
│   ├─┬ readable-stream@1.0.34
│   │ └── isarray@0.0.1
│   └─┬ xtend@2.1.2
│     └── object-keys@0.4.0
├─┬ mime-types@2.1.11
│ └── mime-db@1.23.0
├── moment@2.14.1
├─┬ multiserver@1.1.3
│ ├─┬ pull-ws@3.1.2
│ │ ├── relative-url@1.0.2
│ │ └─┬ ws@1.1.1
│ │   ├── ansi@0.3.1 extraneous
│ │   ├── benchmark@0.3.0 extraneous
│ │   ├── bufferutil@1.2.1 extraneous
│ │   ├── expect.js@0.3.1 extraneous
│ │   ├── istanbul@0.4.4 extraneous
│ │   ├── mocha@2.3.4 extraneous
│ │   ├── options@0.0.6
│ │   ├── should@8.0.2 extraneous
│ │   ├── tinycolor@0.0.1 extraneous
│ │   ├── ultron@1.0.2
│ │   └── utf-8-validate@1.2.1 extraneous
│ ├─┬ secret-handshake@1.0.0
│ │ ├── deep-equal@1.0.1
│ │ ├─┬ pull-box-stream@1.0.11
│ │ │ ├── increment-buffer@1.0.0
│ │ │ └── pull-through@1.0.18
│ │ ├─┬ pull-handshake@1.1.3
│ │ │ ├── pull-delayed-sink@1.0.0
│ │ │ └── pull-pair@1.0.0
│ │ ├── pull-pair@1.1.0
│ │ ├── pull-pushable@2.0.1
│ │ └─┬ pull-reader@1.2.5
│ │   └── bl@1.1.2
│ ├── separator-escape@0.0.0
│ └─┬ stream-to-pull-stream@1.7.0
│   └── looper@3.0.0
├── open-external@0.1.0
├── options@0.0.6 extraneous
├── pull-cat@1.1.10
├── pull-next@0.0.0
├── pull-paramap@1.1.6
├─┬ pull-reconnect@0.0.3
│ └── pull-defer@0.2.2
├─┬ pull-scroll@0.2.0
│ ├─┬ is-visible@2.0.4
│ │ ├── iselement@1.0.0
│ │ └── style-properties@1.2.1
│ ├── observable@2.1.4
│ ├── pull-pause@0.0.0
│ └── request-animation-loop@0.1.0
├── pull-stream@3.4.3
├── split-buffer@1.0.0
├─┬ ssb-avatar@0.1.0
│ └── ssb-msgs@5.2.0
├─┬ ssb-client@4.0.1
│ ├── explain-error@1.0.3
│ ├─┬ muxrpc@6.3.3
│ │ ├── packet-stream@2.0.0
│ │ ├── packet-stream-codec@1.1.1
│ │ └── pull-goodbye@0.0.1
│ └─┬ ssb-config@2.0.1
│   ├── deep-extend@0.4.1
│   ├─┬ non-private-ip@1.3.0
│   │ └── ip@0.3.3
│   ├─┬ osenv@0.1.3
│   │ ├── os-homedir@1.0.1
│   │ └── os-tmpdir@1.0.1
│   └─┬ rc@1.1.6
│     ├── ini@1.3.4
│     └── strip-json-comments@1.0.4
├─┬ ssb-feed@2.1.3
│ ├── monotonic-timestamp@0.0.9
│ └─┬ ssb-ref@2.3.0
│   ├── ip-regex@1.0.3
│   └── is-valid-domain@0.0.2
├─┬ ssb-keys@5.1.2
│ ├── blake2s@1.0.1
│ ├─┬ chloride@2.1.1
│ │ ├─┬ chloridedown@1.0.22
│ │ │ └── nan@2.4.0
│ │ ├─┬ sodium-browserify@1.1.2
│ │ │ ├─┬ libsodium-wrappers@0.2.12
│ │ │ │ └── libsodium@0.2.12
│ │ │ ├── sha.js@2.4.5
│ │ │ └── tweetnacl@0.14.3
│ │ └─┬ sodium-browserify-tweetnacl@0.1.0
│ │   ├── ed2curve@0.1.4
│ │   └── tweetnacl-auth@0.3.0
│ ├── deep-equal@0.2.2
│ ├── hmac@1.0.1
│ ├─┬ mkdirp@0.5.1
│ │ └── minimist@0.0.8
│ └── private-box@0.0.3
├─┬ ssb-markdown@3.0.0
│ ├── emoji-named-characters@1.0.2
│ └── ssb-marked@0.5.4
├── ssb-mentions@0.1.0
├── ssb-sort@0.0.0
├─┬ suggest-box@2.1.0
│ └── textarea-caret-position@0.1.1
├── text-node-searcher@1.1.1
└── ultron@1.0.2 extraneous

npm ERR! extraneous: options@0.0.6 /home/ev/patchbay/node_modules/options
npm ERR! extraneous: ultron@1.0.2 /home/ev/patchbay/node_modules/ultron
npm ERR! extraneous: ansi@0.3.1 /home/ev/patchbay/node_modules/ws/node_modules/ansi
npm ERR! extraneous: benchmark@0.3.0 /home/ev/patchbay/node_modules/ws/node_modules/benchmark
npm ERR! extraneous: bufferutil@1.2.1 /home/ev/patchbay/node_modules/ws/node_modules/bufferutil
npm ERR! extraneous: expect.js@0.3.1 /home/ev/patchbay/node_modules/ws/node_modules/expect.js
npm ERR! extraneous: istanbul@0.4.4 /home/ev/patchbay/node_modules/ws/node_modules/istanbul
npm ERR! extraneous: mocha@2.3.4 /home/ev/patchbay/node_modules/ws/node_modules/mocha
npm ERR! extraneous: should@8.0.2 /home/ev/patchbay/node_modules/ws/node_modules/should
npm ERR! extraneous: tinycolor@0.0.1 /home/ev/patchbay/node_modules/ws/node_modules/tinycolor
npm ERR! extraneous: utf-8-validate@1.2.1 /home/ev/patchbay/node_modules/ws/node_modules/utf-8-validate
[~/patchbay]─[⎇ master]─[±]─(1)-> npm run build
npm info it worked if it ends with ok
npm info using npm@3.10.5
npm info using node@v6.3.0
npm info lifecycle patchbay@1.7.8~prebuild: patchbay@1.7.8
npm info lifecycle patchbay@1.7.8~build: patchbay@1.7.8

> patchbay@1.7.8 build /home/ev/patchbay
> node build.js > modules/index.js; browserify -t brfs index.js | indexhtmlify > index.html

npm info lifecycle patchbay@1.7.8~postbuild: patchbay@1.7.8
npm info ok
dominictarr commented 8 years ago

I got a few of these, think they might have been from timeouts? the default timeout was hardcoded to 1 second, which breaks when it sometimes takes extra long (like lots of things are happening at once)

@evbogue by the way, with the newest chloride, you don't need to do CHLORIDE_JS=1, it can now use full c crypto in electron (via hack work around, not via proper fix though) but anyway it starts up a bit faster now

evbogue commented 8 years ago

This is fixed as the lite client is building for me now.

And yes! I don't need CHLORIDE_JS=1 anymore! Thanks @dominictarr!