electrum icon indicating copy to clipboard operation
electrum copied to clipboard

2.7.12 disappearing wallets

Open mocacinno opened this issue 10 years ago • 10 comments

I'm running electrum 2.7.12 on windows 7 pro From time to time, wallets containing imported private keys seems to get deleted without notice. These wallets are still shown when chosing "file -> recently opened ->" from the menu, but when chosing such a wallet, the "create a new wallet"-wizard is started instead of opening the wallet itself.

When browsing to C:\Users[my username]\AppData\Roaming\Electrum\wallets, the physical wallet file is also gone.

I have no idear on how to reproduce the error, since it only seems to happen occasionally (happened 3 or 4 times untill now)

mocacinno avatar Dec 06 '16 08:12 mocacinno

I can only suggest to use a more recent version of Windows.

ecdsa avatar Dec 06 '16 12:12 ecdsa

It's a company issued pc i'm afraid... So i cannot switch to windows 10 as for now. Running Linux at home, no problems there :)

mocacinno avatar Dec 07 '16 06:12 mocacinno

Same issue, just that it happened to me every single time.

This issue was being discussed here: https://bitcointalk.org/index.php?topic=1686101

ranochigo avatar Dec 07 '16 13:12 ranochigo

@ranochigo you mean it is reproducible? is that only with windows 7?

ecdsa avatar Dec 07 '16 16:12 ecdsa

@ecdsa It is. Happens everytime since I created the wallet. I'll test it with Windows 8 later on a VM and let you know.

ranochigo avatar Dec 08 '16 02:12 ranochigo

Not sure if this is related, but once I "lost" my wallet using 2.7.12 on Windows 10. I found that the wallet file was still there, but had been renamed to [original name].[random number]. I recovered it by renaming it back to the proper name.

I suspect something happened between the step of writing to a tempfile and swapping that tempfile to replace the old wallet. The logic is near storage.py line 159. This could also be improved by retaining the previous version (renamed to .bak) rather than deleting.

shsmith avatar Dec 08 '16 02:12 shsmith

POSIX file systems are able to perform atomic rename. for non-POSIX systems, the logic is to delete the destination file and then to rename the temporary file.

If we add a .bak, we will end up with two files, the .tmp and the (deprecated) .bak.

ecdsa avatar Dec 08 '16 09:12 ecdsa

My problem was solved here: https://bitcointalk.org/index.php?topic=1686101.msg17121127#msg17121127.

Seems like the space in between the word was causing this problem.

ranochigo avatar Dec 09 '16 03:12 ranochigo

Apparently the issue was caused by using control characters (e.g. \t) in the filename. This should be solved by preventing backslashes in wallet file names.

bauerj avatar Jan 15 '18 12:01 bauerj

I think this was fixed. Probably in https://github.com/spesmilo/electrum/commit/a05dab2c4dcf0ce2f69e9a4258bd3c88c818a91d

SomberNight avatar Oct 12 '24 04:10 SomberNight