Bitcoin Forum
April 07, 2020, 03:46:01 PM *
News: Latest Bitcoin Core release: 0.19.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: 'utf8' decode error by opening the wallet?!  (Read 134 times)
3L!te
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
January 08, 2020, 07: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?

1586274361
Hero Member
*
Offline Offline

Posts: 1586274361

View Profile Personal Message (Offline)

Ignore
1586274361
Reply with quote  #2

1586274361
Report to moderator
1586274361
Hero Member
*
Offline Offline

Posts: 1586274361

View Profile Personal Message (Offline)

Ignore
1586274361
Reply with quote  #2

1586274361
Report to moderator
Best Rates For Exchanging Cryptocurrency Buy Crypto With Credit Card Smooth Exchange Multiple E-Payment Systems Check Now Check Now
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1586274361
Hero Member
*
Offline Offline

Posts: 1586274361

View Profile Personal Message (Offline)

Ignore
1586274361
Reply with quote  #2

1586274361
Report to moderator
1586274361
Hero Member
*
Offline Offline

Posts: 1586274361

View Profile Personal Message (Offline)

Ignore
1586274361
Reply with quote  #2

1586274361
Report to moderator
HCP
Legendary
*
Offline Offline

Activity: 1288
Merit: 2319

<insert witty quote here>


View Profile
January 08, 2020, 07: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?

ETFbitcoin
Legendary
*
Offline Offline

Activity: 1960
Merit: 2313

Use SegWit and enjoy lower fees.


View Profile WWW
January 08, 2020, 07:50:23 PM
 #3

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.

Abdussamad
Legendary
*
Offline Offline

Activity: 2422
Merit: 1264



View Profile
January 08, 2020, 10:34:29 PM
 #4

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.
BitMaxz
Legendary
*
Offline Offline

Activity: 1750
Merit: 1402


We're lockdown due to Covid19


View Profile WWW
January 08, 2020, 10:42:42 PM
 #5

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.

Pmalek
Legendary
*
Offline Offline

Activity: 1260
Merit: 1299



View Profile
January 09, 2020, 02:02:41 PM
 #6

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://bitcointalk.org/index.php?topic=2544522.0

3L!te
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
January 10, 2020, 10:38:41 PM
 #7

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?
TryNinja
Legendary
*
Offline Offline

Activity: 1330
Merit: 1923



View Profile
January 10, 2020, 10:48:44 PM
 #8

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.

BitMaxz
Legendary
*
Offline Offline

Activity: 1750
Merit: 1402


We're lockdown due to Covid19


View Profile WWW
January 10, 2020, 11:37:23 PM
 #9

~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/

TryNinja
Legendary
*
Offline Offline

Activity: 1330
Merit: 1923



View Profile
January 10, 2020, 11:41:16 PM
 #10

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.

HCP
Legendary
*
Offline Offline

Activity: 1288
Merit: 2319

<insert witty quote here>


View Profile
January 11, 2020, 04:00:12 AM
 #11

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:

khaled0111
Hero Member
*****
Offline Offline

Activity: 1022
Merit: 863



View Profile
January 11, 2020, 04:48:42 PM
Last edit: January 11, 2020, 07:40:47 PM by khaled0111
 #12

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.

███████████████████████████
█████████▀▄▄▄▄▄██▀▀████████
█████▀▄█▀▀▄▄▄▄▄▄▄▀▀▄▄▀█████
████ █▀▄███████████▄▀██████
███▄█ ███████▀ ██████ █ ███
██▀█ ███  ▀▀█  ▀██████ █ ██
██ █ ████▄▄      ▀▀▀██ █ ██
██ █ █████▌        ▄██ ████
███▄█ █████▄▄   ▄▄███ █▀███

████▀█▄▀█████▌  ▀██▀▄█ ████

█████▄▀▀▄▄▀▀▀▀   ▄▄█▀▄█████
████████▄██▀▀▀▀▀▀██████████

███████████████████████████
IIII★ ‎
‎ ★
.
█▀▀ █▀█ █▀█  ▄  ▄▀▀ █   ▄▀█ ▀█▀ ▄▀▀  ▄███▄
▀▀█ █ █ █ █ ▀█▀ ▀▀█ █   █ █  █  ▀▀█  ▀███▀
▄▄█ █▄█ █▄█     ▄▄▀ ▀▄▄ █▄▀  █  ▄▄▀   
                                       █

████████████████████████████████████
███▀▀▀▀▀▀██████▀▀▀▀▀▀██████▀▀▀▀▀▀███
█▀▄██▀███▄▀██▀▄██▀███▄▀██▀▄██▀███▄▀████▄
█ █ ▀ ▀███ ██ █ ▀ ▀███ ██ █ ▀ ▀███ █████
█ ██    ▄█ ██ ██    ▄█ ██ ██    ▄█ █████
█▄▀██  ▀█▀▄██▄▀██  ▀█▀▄██▄▀██  ▀█▀▄████▀
███▄▄▄▄▄▄██████▄▄▄▄▄▄██████▄▄▄▄▄▄███
████████████████████████████████████

‎ ★
UP
TO
15%...CASH BACK
EVERY SPIN
IIII..PLAY NOW..
pooya87
Legendary
*
Offline Offline

Activity: 1960
Merit: 2558


Remember tonight for it's the beginning of forever


View Profile
January 12, 2020, 04:51:51 AM
 #13

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.

HCP
Legendary
*
Offline Offline

Activity: 1288
Merit: 2319

<insert witty quote here>


View Profile
January 12, 2020, 08:39:15 AM
 #14

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

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!