shesek / spark-wallet

⚡️ A minimalistic wallet GUI for c-lightning, accessible over the web or through mobile and desktop apps.
MIT License
344 stars 77 forks source link

Error installing Tor when running with --onion #60

Closed hillelt closed 5 years ago

hillelt commented 5 years ago

ubuntu 18.04 nodejs v11.6.0 spark 0.2.2 Full log: 2019-01-29T17_31_10_085Z-debug.log

>> spark-wallet --onion
Connected to c-lightning v0.6.3rc1-7-g6b5db38 with id 03e1c1c6a49d4045a015cd1c2d2da3b8c0acc1e15f7d391230a8211d066a6dbf7c on network bitcoin at /home/hillel/.lightning/lightning-rpc
No LOGIN or --login specified, picked username "xxxxxx" with password "xxxxxxxxxxxxxxxx"

Tor Hidden Service enabled (via --onion) for the first time, downloading the Tor Bundle...
The Spark .onion server will start automatically when its ready.

In the meanwhile, you can access the local HTTP server directly.

HTTP server running on http://localhost:9737

> granax@3.1.3 postinstall /usr/lib/node_modules/spark-wallet/dist/transport/hsv3-dep/node_modules/granax
> node script/download-tbb.js

read ECONNRESET
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! granax@3.1.3 postinstall: `node script/download-tbb.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the granax@3.1.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/hillel/.npm/_logs/2019-01-29T17_31_10_085Z-debug.log
unhandledRejection, stopping process
Error: Tor installation failed, exited with code 1
    at ChildProcess.<anonymous> (/usr/lib/node_modules/spark-wallet/dist/transport/hsv3-dep/index.js:54:55)
    at ChildProcess.emit (events.js:188:13)
    at maybeClose (internal/child_process.js:978:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
Error: Tor installation failed, exited with code 1
    at ChildProcess.<anonymous> (/usr/lib/node_modules/spark-wallet/dist/transport/hsv3-dep/index.js:54:55)
    at ChildProcess.emit (events.js:188:13)
    at maybeClose (internal/child_process.js:978:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
shesek commented 5 years ago

The ECONNRESET error appears to indicate a connection error with the download server on torproject.org.

Can you test if wget https://dist.torproject.org/torbrowser/8.0.5/tor-browser-linux64-8.0.5_en-US.tar.xz works from the same machine?

hillelt commented 5 years ago

Yes, wget works, but while it was running I reran spark-wallet --onion and this time it worked as expected so I can now access the Tor service from mobile (nifty!). I guess it was just a temporary connection problem.

shesek commented 5 years ago

Awesome! Glad it worked out.

shesek commented 5 years ago

No LOGIN or --login specified, picked username "xxxxxx" with password "xxxxxxxxxxxxxxxx"

Btw, you might want to persist the randomly generated login/password/access-key by using --cookie-file ~/.spark-wallet/cookie. This way it won't change every time you start it up.