clifordsymack / Electron-Cash

Electrum; Bitcoin thin client
MIT License
6 stars 3 forks source link

EC+Shuffle fails to start - workaround to clear config directory #115

Closed emergent-reasons closed 5 years ago

emergent-reasons commented 5 years ago

MacOS: Mojave 10.14.3 Model: 2017 MacBook Pro

I walked a shuffle user through recovering their setup. Here is the history I heard:

When we investigated with the commandline, we found the following:

We cleared out everything but wallets from .electron-cash and then it started normally and seems to be working with no problems.

asdfs-MacBook-Pro:~ asdf$ ps -ax | grep -i electron
[...some electron framework used by discord]
 1490 ??         0:01.46 /Applications/Electron-Cash.app/Contents/MacOS/Electron-Cash -psn_0_520319
 1492 ??         0:00.58 /Applications/Electron-Cash.app/Contents/MacOS/Electron-Cash
 1513 ttys000    0:00.00 grep -i electron

asdfs-MacBook-Pro:~ asdf$ kill 1490

asdfs-MacBook-Pro:~ asdf$ ps -ax | grep -i electron
[...some electron framework used by discord]
 1515 ttys000    0:00.00 grep -i electron

asdfs-MacBook-Pro:~ asdf$ /Applications/Electron-Cash.app/Contents/MacOS/Electron-Cash -v
|  0.425| |00| [SimpleConfig] electron-cash directory /Users/asdf/.electron-cash
^CTraceback (most recent call last):
  File "http/client.py", line 1331, in getresponse
  File "http/client.py", line 297, in begin
  File "http/client.py", line 258, in _read_status
  File "socket.py", line 586, in readinto
KeyboardInterrupt
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "electron-cash", line 373, in <module>
  File "Electron_Cash-3.9.15ShufBeta-py3.6.egg/electroncash/daemon.py", line 64, in get_fd_or_server
  File "Electron_Cash-3.9.15ShufBeta-py3.6.egg/electroncash/daemon.py", line 87, in get_server
  File "jsonrpclib/jsonrpc.py", line 652, in call
  File "jsonrpclib/jsonrpc.py", line 531, in _request
  File "jsonrpclib/jsonrpc.py", line 564, in _run_request
  File "xmlrpc/client.py", line 1154, in request
  File "jsonrpclib/jsonrpc.py", line 372, in single_request
  File "http/client.py", line 1331, in getresponse
KeyboardInterrupt
[1520] Failed to execute script electron-cash
|289.582| |00| [_ExpiringCacheMgr] Cache 'format_satoshis cache' has been gc'd, 0 still alive
|289.582| |00| [_ExpiringCacheMgr] No more caches, stopping manager thread and removing singleton
|289.582| |01| [_ExpiringCacheMgr] thread exit
asdfs-MacBook-Pro:~ asdf$
cculianu commented 5 years ago

In the first ps the two processes are the pyintstaller parent process (pyinstaller is used for the .app -- it basically unzips Electron Cash into a tmpdir then runs it).

So.. I'm not clear -- in the end the workaround was to kill the running EC and then it worked? Or?

What is the issue exactly? EC + EC Shuffle cannot be run at the same time because they use the same daradir...

emergent-reasons commented 5 years ago

If that is the case, then the pyinstaller was permanently stuck somehow. It was persistently running until we killed it each time we tried. EC was in the app list but perhaps it never finished "installing"?

Also as above, even if the process was the installer, we were able to run the app from command line but it hung after the first log entry.

Whatever it was, after we cleared all the config except the wallets, she was able to start EC normally.

emergent-reasons commented 5 years ago

Transferred to mainline repo.