cryptoadvance / specter-desktop

A desktop GUI for Bitcoin Core optimised to work with hardware wallets
MIT License
793 stars 236 forks source link

Specter stuck on Initializing HWI when USB-HWW is connected (and on sleep?) #818

Open olofedlund opened 3 years ago

olofedlund commented 3 years ago

bitcoind is installed in default folder as per Windows install and server=1 is set.

0.10.1 also had this problem so installed latest version but it has same problem.

Googling gives no clue.

ben-kaufman commented 3 years ago

This means it fails to start the Specter daemon. Which Windows version are you using? Also, I'd suggest checking if restarting the computer helps.

olofedlund commented 3 years ago

Thank you for the prompt reply.

A restart of Windows doesn’t help. I’m on version 10.0.19042 of Windows.

I would request a better error message for this situation where specterd doesn’t start.

How should I debug what is going on with specterd?

ben-kaufman commented 3 years ago

You can try just downloading specterd instead on the Specter Desktop from the Github release page (here: https://github.com/cryptoadvance/specter-desktop/releases/download/v0.10.4/specterd-v0.10.4-win64.zip) try to run this and see what it writes in the console it will open (and share here).

olofedlund commented 3 years ago

Forever stuck on this (120+ secs)

PS C:\Users\olofe\Documents> .\specterd.exe Initializing HWI...

ben-kaufman commented 3 years ago

Have you used Specter before? Can you try maybe with the pre-release? https://github.com/cryptoadvance/specter-desktop/releases/tag/v0.11.0-pre3

olofedlund commented 3 years ago

Yes, it was working with 0.10.1 but I was trying to also run it with Ledger which requires setting rpcuser and pwssword. I had issues with that so I gave up on that and I wanted to get it working again with specter so I have reverted that but now I can't get it working again.

olofedlund commented 3 years ago

In my attempts to run that version, I ctrl-C'd specterd and got the following information:

PS C:\Users\olofe\Documents> .\specterd.exe Initializing HWI... Traceback (most recent call last): File "specterd.py", line 2, in File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "c:\users\ss\miniconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module File "cryptoadvance\specter\cli__init__.py", line 3, in File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "c:\users\ss\miniconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module File "cryptoadvance\specter\cli\cli_server.py", line 11, in File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "c:\users\ss\miniconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module File "cryptoadvance\specter\server.py", line 12, in File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "c:\users\ss\miniconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module File "cryptoadvance\specter\hwi_server.py", line 21, in File "cryptoadvance\specter\hwi_rpc.py", line 52, in init File "cryptoadvance\specter\helpers.py", line 42, in wrapper_fn File "cryptoadvance\specter\hwi_rpc.py", line 66, in enumerate File "cryptoadvance\specter\devices\ledger.py", line 23, in enumerate File "cryptoadvance\specter\devices\hwi\ledger.py", line 491, in enumerate File "cryptoadvance\specter\devices\hwi\ledger.py", line 116, in init File "hwilib\devices\btchip\btchip.py", line 81, in init File "hwilib\devices\btchip\btchip.py", line 393, in getFirmwareVersion File "hwilib\devices\btchip\btchipComm.py", line 90, in exchange File "hwilib\devices\btchip\btchipComm.py", line 138, in waitFirstResponse KeyboardInterrupt [9800] Failed to execute script specterd

olofedlund commented 3 years ago

v0.11.0-pre3 is the same:

PS C:\Users\olofe\Documents> .\specterd.exe Initializing HWI... Traceback (most recent call last): File "specterd.py", line 2, in File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "c:\program files\python\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module File "cryptoadvance\specter\cli.py", line 10, in File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "c:\program files\python\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module File "cryptoadvance\specter\server.py", line 12, in File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "c:\program files\python\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module File "cryptoadvance\specter\hwi_server.py", line 12, in File "cryptoadvance\specter\hwi_rpc.py", line 51, in init File "cryptoadvance\specter\helpers.py", line 42, in wrapper_fn File "cryptoadvance\specter\hwi_rpc.py", line 65, in enumerate File "cryptoadvance\specter\devices\ledger.py", line 23, in enumerate File "cryptoadvance\specter\devices\hwi\ledger.py", line 491, in enumerate File "cryptoadvance\specter\devices\hwi\ledger.py", line 116, in init File "hwilib\devices\btchip\btchip.py", line 81, in init File "hwilib\devices\btchip\btchip.py", line 393, in getFirmwareVersion File "hwilib\devices\btchip\btchipComm.py", line 90, in exchange File "hwilib\devices\btchip\btchipComm.py", line 138, in waitFirstResponse KeyboardInterrupt [3736] Failed to execute script specterd

ben-kaufman commented 3 years ago

Is the Ledger connected to the computer while you're doing this? If yes try to first disconnect it please and retry.

olofedlund commented 3 years ago

Boom, that fixed it. Thank you.

Something needs to be fixed though.

ben-kaufman commented 3 years ago

Yes, so I'll keep the issue open. Can you just please share the Ledger firmware and BTC app version? (and if it's nano s or x?)

olofedlund commented 3 years ago

bitcoind 0.20.1,

Ledger Nano S, Secure Element version 1.6.1, Microcontroller 1.12, Bootloader 0.11, Ledger Nano S Bitcoin firmware 1.5.1

Some other information you need?

Thank you so much for your help.

ben-kaufman commented 3 years ago

Thanks, that should help solve it, will work on that, thanks! (Updating the title of the issue accordingly)

dtrammell commented 3 years ago

I had this same issue with Ledger Nano X. Launching Specter Desktop while the Ledger is plugged in causes Specter Desktop to hang on the startup pacman screen. Disconnecting the Ledger and restarting Specter Desktop solved the problem. Ledger Firmware Secure Element 1.2.4-1 / Microcontroller 2.8

real-or-random commented 3 years ago

Same for bitbox02, which then asks for the device password/PIN when Specter Desktop is starting up. Specter Desktop will continue after entering the password but there's no need to unlock the device at this stage.

k9ert commented 2 years ago

Not easy to address and we've tried to fix this in #1748 but not yet fixed. This could be fixed in the electron-app, though. See my last comment there.