Author

Topic: 'utf8' decode error by opening the wallet?! (Read 257 times)

HCP
legendary
Activity: 2086
Merit: 4363
January 12, 2020, 03:39:15 AM
#13
Did you see the screenshot he posted? I'd wager that it is more than "a small couple of bytes". The entire file looks totally corrupted. Even fully encrypted Electrum wallet files still contain standard ASCII "printable" text characters. The OP's file just looks like binary data being rendered in a text editor. Similar to what you would see if you were to open a .dll or an .exe file in Notepad. Undecided
legendary
Activity: 3472
Merit: 10611
I was able to reproduce the error by opening a wallet file with notepad and save it after editing the encoding format from "UTF-8" to "Unicode big endian"/"UTF-16".

i don't think that is not reproducing the issue that OP has.
what you did was practically changing the contents of the wallet file that makes it impossible for Electrum to read its content anymore because it is in an entirely different encoding.
the problem OP is facing is probably in a small couple of bytes inside the wallet content and when the reader reaches that part it fails to continue.
legendary
Activity: 2744
Merit: 3097
Top Crypto Casino
It looks like an encoding problem.
No idea what caused the problem in first place, my best guess is that the file got corrupted during the recovery process.

I was able to reproduce the error by opening a wallet file with notepad and save it after editing the encoding format from "UTF-8" to "Unicode big endian"/"UTF-16".
Here is what i get when I open the wallet file with Electrum:



and here is how the file looks like when trying to open it on WordPad:



However it works fine on notepad. Therefore, Isuggest that OP tries to open the file with other text editors and see if that solves his problem.

If it doesn't, then he may also try opening it using an Hex editor. I used https://hexed.it/ to explain how it works. (However, OP should use a reliable software run locally to avoid exposing his private keys.)
Upload the wallet file and use the search feature to search for the word "seed". You'll get something like this:



Then you will be able to restore your wallet from seed. Hope this works for you.

edit: if the wallet is encrypted then the above will be worthless without the password to decrypt it.
HCP
legendary
Activity: 2086
Merit: 4363
Yes, here is the screenshot of the wallet file opened in a text editor, it looks really weird:
www1.xup.in/exec/ximg.php?fid=20463319
The wallet file is from October 2018, maybe I should use exactly the same version of Electrum at this time?
Yeah... it does look wierd. I'm fairly sure that isn't an Electrum encrypted wallet, or it is a very badly corrupted one. There are a number of non-ASCII looking characters in the screenshot you have provided (likely a text representation of binary data):




Whereas an Electrum encrypted wallet looks like this:






Do you remember which Electrum version you use before? If it is below Electrum 2.7 version the old wallet file will not work in the latest version base on my experience you may need to use the old version first(You can use portable version if you don't want to replace your latest version) and get the seed phrase since it's encrypted it will ask for the password.
For the record, Full wallet file encryption was only added in version 2.8.0

# Release 2.8.0 (March 9, 2017)
  * Wallet file encryption using ECIES: A keypair is derived from the
    wallet password. Once the wallet is decrypted, only the public key
    is retained in memory, in order to save the encrypted file.
Earlier versions only encrypted "sensitive" data within the file (like private keys/seeds etc), but the structure of the file itself was still in "plaintext"... like this 2.7.0 wallet:

legendary
Activity: 2758
Merit: 6830
January 10, 2020, 06:41:16 PM
#9
Do you remember which Electrum version you use before? If it is below Electrum 2.7 version the old wallet it will not work in the latest version base on my experience you may need to use the old version first and get the seed since it's encrypted it will ask for the password.

After you get the seed you can install the latest Electrum version again and start to import your seed phrase.
I think you meant that versions < 2.7 do not connect to the Electrum servers. This has nothing to do with wallet files not working on new versions (which is false), thus having nothing to do with OP’s issue.
legendary
Activity: 3472
Merit: 3217
Playbet.io - Crypto Casino and Sportsbook
January 10, 2020, 06:37:23 PM
#8
~snip~

Do you remember which Electrum version you use before? If it is below Electrum 2.7 version the old wallet file will not work in the latest version base on my experience you may need to use the old version first(You can use portable version if you don't want to replace your latest version) and get the seed phrase since it's encrypted it will ask for the password.

After you get the seed you can install the latest Electrum version again(Just do this if you didn't use the portable version) and start to import your seed phrase.

The old version can be found from here https://download.electrum.org/
legendary
Activity: 2758
Merit: 6830
January 10, 2020, 05:48:44 PM
#7
Yes, here is the screenshot of the wallet file opened in a text editor, it looks really weird:

www1.xup.in/exec/ximg.php?fid=20463319

The wallet file is from October 2018, maybe I should use exactly the same version of Electrum at this time?
I’m pretty sure this means the wallet is encrypted (or in the worst case, corrupted). I guess you don’t have any backup seed written somewhere, right? Without it, your chances of recovering your coins are pretty null.
newbie
Activity: 2
Merit: 0
January 10, 2020, 05:38:41 PM
#6
What version of Electrum do you install?
Are you sure that you download that Electrum from the correct URL? it must be electrum.org

There are many fake Electrum wallet out there and maybe you use the fake one that is why it can't decode the wallet file that generated from original Electrum wallet.

Yes, of course, it is the correct URL and the original Electrum.

run electrum and enter a unique filename in the window that pops up. then go through the process of restoring your wallet file. note electrum only supports bitcoin.

The problem is that Electrum is not able to read the restored wallet-file. There is the error message I quoted in my first post.

Try HCP suggestion first, if your wallet isn't encrypted, all you need to do are finding your private key/master private key and import it to Electrum (by creating new wallet).

If it's encrypted, try find other backup (either wallet file or mnemonic/seed/recovery words) you might have.

The wallet file is crypted (password), I don't have the private key anymore, just the wallet file.

Sounds like the wallet file is corrupted after the restore.

Are you sure that it is an Electrum wallet you have restored? Was it encrypted? If not, have you tried opening it with a text editor to see what the contents look like?

Yes, here is the screenshot of the wallet file opened in a text editor, it looks really weird:

www1.xup.in/exec/ximg.php?fid=20463319

The wallet file is from October 2018, maybe I should use exactly the same version of Electrum at this time?
legendary
Activity: 2730
Merit: 7065
January 09, 2020, 09:02:41 AM
#5
When was the original wallet created? I managed to find an older thread from 2017 where another user had a similar problem with wallets created before 2013. The info posted there seems to suggest that newer versions of Electrum have problems with wallets created on Electrum 2.0 and older versions.
The OP doesn't mention if he managed to fix the issues.

This is the thread:
https://bitcointalksearch.org/topic/restoring-8-old-wallets-from-pre-2013-2544522
legendary
Activity: 3472
Merit: 3217
Playbet.io - Crypto Casino and Sportsbook
January 08, 2020, 05:42:42 PM
#4
What version of Electrum do you install?
Are you sure that you download that Electrum from the correct URL? it must be electrum.org

There are many fake Electrum wallet out there and maybe you use the fake one that is why it can't decode the wallet file that generated from original Electrum wallet.
legendary
Activity: 3710
Merit: 1586
January 08, 2020, 05:34:29 PM
#3
run electrum and enter a unique filename in the window that pops up. then go through the process of restoring your wallet file. note electrum only supports bitcoin.
HCP
legendary
Activity: 2086
Merit: 4363
January 08, 2020, 02:29:25 PM
#2
Sounds like the wallet file is corrupted after the restore.

Are you sure that it is an Electrum wallet you have restored? Was it encrypted? If not, have you tried opening it with a text editor to see what the contents look like?
newbie
Activity: 2
Merit: 0
January 08, 2020, 02:18:02 PM
#1
Hey,

I restored an already deleted wallet with a program because I need access to it again:

When I use Electrum to open the restored wallet, there is an error message:

'utf8' codec can't decode byte 0xff in position 1: invalid start byte

What I can do to open my old wallet? Can anyone help me, please?

Jump to: