cryptoadvance / specter-desktop

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

Power outage resulted in server error on restart (blank config.json, steps taken to recover) #917

Open kdmukai opened 3 years ago

kdmukai commented 3 years ago

My setup: Running specter-desktop on a Raspi4 via supervisord for auto restarts. Using the "Multiple Users" feature to keep different wallets more separated so I don't accidentally mix funds.

Power went out last night. Accessing today via browser just returns a server error.

The ~/.specter/config.json is blank. So is the .bkp. I delete both and restart specter-desktop.

A new, usable config.json is generated but watching the logs it's saying it can't load any of my wallets: Couldn't load wallet xxxxx into core.Silently ignored! RPC error: Request error: Wallet specterac151d0eb190f435/xxxxx not found.

Ah, that specter UID is brand new, courtesy of the new config.json. So I find my previous UID by looking at the my bitcoin node's wallet dir (~/.bitcoin/wallet). The specter wallets are "specter***" where that's the UID appended. I edit the specter config.json and change the UID back to what it had been. Restart specter-desktop.

Good, specter logs no longer complain and bitcoin node logs show that the wallets are loaded.

But I need to reinitialize the "Multiple Users" setting to restore access. Once I do so specter immediately picks up my user accounts. And I'm now I'm good.

Documenting all this here since there were some non-obvious steps.

Remaining work:

ghost commented 3 years ago

+1 - Just went through a similar experience on Specter 1.0.0 via getumbrel.com.

Lost power last night, and received a 500 Server Error this morning when attempting to access Specter.

Upon debugging, this error looks due to Specter attempting to load config.json even though it's contents had managed to have been wiped. The backup file was also empty. I deleted the files and let Specter recreate it on startup. Afterwards, I could see the Specter dashboard. My devices but the only wallet was gone. I had to create a new wallet from the JSON file located in the backup.zip I saved. After scanning the blockchain, things appeared to be working.