cryptoadvance / specter-desktop

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

Wallet loading into core fails #1770

Open minioff opened 2 years ago

minioff commented 2 years ago

Specter Desktop is not showing transactions. In the log I can see a potential problem:

2022-06-19T18:21:30.858Z [info] : stderr-SPECTERD: INFO in wallet_manager: Loading test to Bitcoin Core

2022-06-19T18:21:30.898Z [info] : stderr-SPECTERD: WARNING in wallet_manager: Couldn't load wallet test into core. Silently ignored! RPC error: Request error: Wallet file verification failed. Failed to load database path '/mnt/remote/bitcoind/specterc4032b6b796f6588\test'. Path does not exist.

Using Specter v1.10.2. Specter server runs locally on a Windows machine. Bitcoind v22 (latest) is on remote Linux server.

ls in ./bitcoin shows:

drwx------  2 btc2 btc2     4096 Jun 19 15:27 'specterc4032b6b796f6588\test'
-rw-------  1 btc2 btc2    16384 Jun 19 13:48  wallet.dat

The path looks suspicious (mix of linux and windows paths?).

k9ert commented 2 years ago

What kind of wallet is that? Doesn't seem to be a hotwallet but want to be sure?! So this is a specific hww ? And is it restored or created anew? And do you use the windows app or a windows pip installation?

minioff commented 2 years ago

What kind of wallet is that? Doesn't seem to be a hotwallet but want to be sure?! So this is a specific hww ? And is it restored or created anew?

its 2-of-3 multisig, 3x electrum compatible Zpub keys. The addresses that are generated are correct and the same as on electrum, so that checks out.

And do you use the windows app or a windows pip installation?

Its a windows app/exe.

moneymanolis commented 2 years ago

ls in ./bitcoin shows:

drwx------  2 btc2 btc2     4096 Jun 19 15:27 'specterc4032b6b796f6588\test'
-rw-------  1 btc2 btc2    16384 Jun 19 13:48  wallet.dat

The path looks suspicious (mix of linux and windows paths?).

There is definitely sth. wrong here. This \test shouldn't be there after specterc4032b6b796f6588. I suppose sth. got mixed up due to Windows.

k9ert commented 2 years ago

IMHO this is the result of all installations where specter is running on windows and core is running on linux. The result is probably that the wallet is fully functioning but it is listed as a failed wallet. It's astonishing why we didn't got that bug-report earlier. It's one of those "How could that ever worked" moments.

The PROPER fix won't be easy either. Itprobably doesn't hurt only fixing the error-messages. Turning the backslash into a slash (and therefore really use a subdirectory) will need a migration of all the wallets which has been created like that. But before that, we need more tests: How does it behave exactly in that setup?

moneymanolis commented 2 years ago

As a side note, an interesting fact I came across today: If you delete / (have a wrong path to?) a Bitcoin Core wallet it still remains as loaded wallet and also works fine with Specter. Only when you restart bitcoind will you have trouble. Perhaps one of the reasons for the "How could that ever worked".