Author Topic: Restoring wallet backup throws assert exception  (Read 1665 times)

0 Members and 1 Guest are viewing this topic.

Offline nomoreheroes7

  • Hero Member
  • *****
  • Posts: 756
  • King of all the land
    • View Profile
  • BitShares: nomoreheroes7
Restoring wallet backup throws assert exception
« on: February 08, 2015, 05:17:20 pm »
I'm trying to restore a backup copy of my wallet made on 0.6.0 on one computer to another computer with a fresh install of 0.6.0, and I get the following exception:



Any tips?

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12896
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Restoring wallet backup throws assert exception
« Reply #1 on: February 08, 2015, 06:20:07 pm »
Nothing is lost .. it seems the client has some issues importing the JSON format ..
make sure you have a backup and remember the password .. devs will fix this eventually ...

In the meantime let's figure out if something is wrong with your backup. Would you please open your backup (json file) in a notepad and take a look at the very last lines?
It has happend in earlier version that a comma "," was missing so that the JSON format was invalid .. would you verify that every line that is not followed by a "}" ends with a "," .. if it is the case with your backup .. the missing comma is supposed to be at the end of the file
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline nomoreheroes7

  • Hero Member
  • *****
  • Posts: 756
  • King of all the land
    • View Profile
  • BitShares: nomoreheroes7
Re: Restoring wallet backup throws assert exception
« Reply #2 on: February 08, 2015, 07:09:58 pm »
I'm not too good with the coding language type stuff, but from the looks of it there are quite a few lines that don't end with a ",". For example, the last 7 lines look like this:

    "encrypted_private_key": "",
    "valid_from_signature": false,
    "memo": null,
    "gen_seq_number": 0
  }
}
]

In which case the last 4 lines do not have commas. Does that look right? I appreciate the help.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12896
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Restoring wallet backup throws assert exception
« Reply #3 on: February 08, 2015, 07:44:55 pm »
looks ok too me ..

paging @vikram
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline vikram

Re: Restoring wallet backup throws assert exception
« Reply #4 on: February 08, 2015, 09:47:31 pm »
I will take a look: https://github.com/BitShares/bitshares/issues/1363

We will likely put out 0.6.1 sometime this week with this + other minor fixes.

Offline CryptoPrometheus

  • Sr. Member
  • ****
  • Posts: 324
    • View Profile
Re: Restoring wallet backup throws assert exception
« Reply #5 on: February 09, 2015, 01:59:32 am »
I had a similar issue when trying to restore a wallet from a json in the 6.0 gui:

Failed to restore wallet backup. Your original wallet has been restored. Error: invalid password (20001) Invalid Password!

The password I used was correct, I have never changed it.....

Are there instructions somewhere for restoring a wallet from a json backup using the console?
« Last Edit: February 09, 2015, 02:02:30 am by crypto_prometheus »
"Power and law are not synonymous. In fact, they are often in opposition and irreconcilable."
- Cicero

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12896
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Re: Restoring wallet backup throws assert exception
« Reply #6 on: February 09, 2015, 07:50:46 am »
I had a similar issue when trying to restore a wallet from a json in the 6.0 gui:

Failed to restore wallet backup. Your original wallet has been restored. Error: invalid password (20001) Invalid Password!

The password I used was correct, I have never changed it.....

Are there instructions somewhere for restoring a wallet from a json backup using the console?

Code: [Select]
help wallet_backup_restore
Usage:
wallet_backup_restore <json_filename> <wallet_name> <imported_wallet_passphrase>                      Creates a new wallet from an exported JSON file
Creates a new wallet from an exported JSON file

Parameters:
  json_filename (filename, required): the full path and filename of JSON wallet to import
  wallet_name (wallet_name, required): name of the wallet to create
  imported_wallet_passphrase (passphrase, required): passphrase of the imported wallet

Returns:
  void

aliases: wallet_create_from_json
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline CryptoPrometheus

  • Sr. Member
  • ****
  • Posts: 324
    • View Profile
Re: Restoring wallet backup throws assert exception
« Reply #7 on: February 09, 2015, 08:59:10 pm »
I had a similar issue when trying to restore a wallet from a json in the 6.0 gui:

Failed to restore wallet backup. Your original wallet has been restored. Error: invalid password (20001) Invalid Password!

The password I used was correct, I have never changed it.....

Are there instructions somewhere for restoring a wallet from a json backup using the console?

Code: [Select]
help wallet_backup_restore
Usage:
wallet_backup_restore <json_filename> <wallet_name> <imported_wallet_passphrase>                      Creates a new wallet from an exported JSON file
Creates a new wallet from an exported JSON file

Parameters:
  json_filename (filename, required): the full path and filename of JSON wallet to import
  wallet_name (wallet_name, required): name of the wallet to create
  imported_wallet_passphrase (passphrase, required): passphrase of the imported wallet

Returns:
  void

aliases: wallet_create_from_json

Thank you
"Power and law are not synonymous. In fact, they are often in opposition and irreconcilable."
- Cicero

Offline emailtooaj

Re: Restoring wallet backup throws assert exception
« Reply #8 on: February 10, 2015, 02:40:25 am »
Did that help you crypto_p?
Mine is throwing this error also.
Sound Editor of Beyondbitcoin Hangouts. Listen to latest here - https://beyondbitcoin.org support the Hangouts! BTS Tri-Fold Brochure https://bitsharestalk.org/index.php/topic,15169.0.html
Tip BROWNIE.PTS to EMAILTOOAJ

Offline CryptoPrometheus

  • Sr. Member
  • ****
  • Posts: 324
    • View Profile
Re: Restoring wallet backup throws assert exception
« Reply #9 on: February 10, 2015, 03:02:48 am »
Did that help you crypto_p?
Mine is throwing this error also.

No, I tried to restore with the JSON from the console, but I kept getting "invalid name for a wallet" error. I assume the <wallet_name> field should be populated with your bts account name, right? I tried a bunch of things, but kept getting the same error.

I just ended up importing the master key and rescanning the blockchain, since the wallet never had any market transactions.
"Power and law are not synonymous. In fact, they are often in opposition and irreconcilable."
- Cicero

Offline emailtooaj

Re: Restoring wallet backup throws assert exception
« Reply #10 on: February 10, 2015, 03:05:14 am »
Ok, thank you for quick reply. Guess I'll have to sit tight a bit longer for a fix?!!!


Sent from my iPhone using Tapatalk
Sound Editor of Beyondbitcoin Hangouts. Listen to latest here - https://beyondbitcoin.org support the Hangouts! BTS Tri-Fold Brochure https://bitsharestalk.org/index.php/topic,15169.0.html
Tip BROWNIE.PTS to EMAILTOOAJ

Offline vikram

Re: Restoring wallet backup throws assert exception
« Reply #11 on: February 10, 2015, 03:28:06 am »
I'm trying to restore a backup copy of my wallet made on 0.6.0 on one computer to another computer with a fresh install of 0.6.0, and I get the following exception:



Any tips?

Please confirm whether this issue has been fixed in 0.6.1: https://github.com/BitShares/bitshares/releases/tag/bts%2F0.6.1

Offline Methodise

Re: Restoring wallet backup throws assert exception
« Reply #12 on: February 18, 2015, 01:42:28 am »
I'm trying to restore a backup copy of my wallet made on 0.6.0 on one computer to another computer with a fresh install of 0.6.0, and I get the following exception:



Any tips?

Please confirm whether this issue has been fixed in 0.6.1: https://github.com/BitShares/bitshares/releases/tag/bts%2F0.6.1

This is still a problem.
BTS: methodise

Offline nomoreheroes7

  • Hero Member
  • *****
  • Posts: 756
  • King of all the land
    • View Profile
  • BitShares: nomoreheroes7
Re: Restoring wallet backup throws assert exception
« Reply #13 on: February 18, 2015, 07:35:54 pm »
I'm trying to restore a backup copy of my wallet made on 0.6.0 on one computer to another computer with a fresh install of 0.6.0, and I get the following exception:



Any tips?

Please confirm whether this issue has been fixed in 0.6.1: https://github.com/BitShares/bitshares/releases/tag/bts%2F0.6.1

This is still a problem.

Actually, this problem was fixed for me in 0.6.1. My backup came in just fine.

Offline Empirical1.2

  • Hero Member
  • *****
  • Posts: 1366
    • View Profile
Re: Restoring wallet backup throws assert exception
« Reply #14 on: March 02, 2015, 05:36:49 pm »
I had a similar issue when trying to restore a wallet from a json in the 6.0 gui:

Failed to restore wallet backup. Your original wallet has been restored. Error: invalid password (20001) Invalid Password!

The password I used was correct, I have never changed it.....

Are there instructions somewhere for restoring a wallet from a json backup using the console?

Anyone else still having this problem?

I can only access a recently saved wallet, all my other back-ups return this error (even though the passwords are correct) so I'm unable to access the majority of my BTS.
If you want to take the island burn the boats

Offline vikram

Re: Restoring wallet backup throws assert exception
« Reply #15 on: March 02, 2015, 07:09:34 pm »
I had a similar issue when trying to restore a wallet from a json in the 6.0 gui:

Failed to restore wallet backup. Your original wallet has been restored. Error: invalid password (20001) Invalid Password!

The password I used was correct, I have never changed it.....

Are there instructions somewhere for restoring a wallet from a json backup using the console?

Anyone else still having this problem?

I can only access a recently saved wallet, all my other back-ups return this error (even though the passwords are correct) so I'm unable to access the majority of my BTS.

I have been trying to track this down but still cannot reproduce or find anything that might have changed in the code involving backup import.

The workaround for now is to temporarily use 0.5.3 to import the backup, then upgrade to 0.6.x.

Offline Empirical1.2

  • Hero Member
  • *****
  • Posts: 1366
    • View Profile
Re: Restoring wallet backup throws assert exception
« Reply #16 on: March 02, 2015, 09:06:49 pm »
I had a similar issue when trying to restore a wallet from a json in the 6.0 gui:

Failed to restore wallet backup. Your original wallet has been restored. Error: invalid password (20001) Invalid Password!

The password I used was correct, I have never changed it.....

Are there instructions somewhere for restoring a wallet from a json backup using the console?

Anyone else still having this problem?

I can only access a recently saved wallet, all my other back-ups return this error (even though the passwords are correct) so I'm unable to access the majority of my BTS.

I have been trying to track this down but still cannot reproduce or find anything that might have changed in the code involving backup import.

The workaround for now is to temporarily use 0.5.3 to import the backup, then upgrade to 0.6.x.

That worked. Thanks for the quick response.
If you want to take the island burn the boats

Offline ElMato

  • Sr. Member
  • ****
  • Posts: 288
    • View Profile
Re: Restoring wallet backup throws assert exception
« Reply #17 on: March 03, 2015, 10:01:04 am »
I had a similar issue when trying to restore a wallet from a json in the 6.0 gui:

Failed to restore wallet backup. Your original wallet has been restored. Error: invalid password (20001) Invalid Password!

The password I used was correct, I have never changed it.....

Are there instructions somewhere for restoring a wallet from a json backup using the console?

Anyone else still having this problem?

I can only access a recently saved wallet, all my other back-ups return this error (even though the passwords are correct) so I'm unable to access the majority of my BTS.

I'm experiencing the exact same problem when i try to restore an old backup.


Code: [Select]
(wallet closed) >>> wallet_backup_restore
json_filename: my_old_wallet.json
wallet_name: my_old_wallet
imported_wallet_passphrase:
Upgrading wallet...
Backing up wallet...
Wallet automatically backed up to: [edited]...version_upgrade.json
Please unlock your wallet to complete the upgrade...
wallet_name: [edited]20001 invalid_password: invalid password
Invalid password!
    {}
    th_a  wallet.cpp:1263 unlock

    {"timeout_seconds":3600}
    th_a  wallet.cpp:1285 unlock

    {"filename":"[edited]","wallet_name":"[edited]"}
    th_a  wallet.cpp:1158 create_from_json

    {}
    th_a  common_api_client.cpp:3195 wallet_backup_restore

    {"command":"wallet_backup_restore"}
    th_a  cli.cpp:626 execute_command






Offline ElMato

  • Sr. Member
  • ****
  • Posts: 288
    • View Profile
Re: Restoring wallet backup throws assert exception
« Reply #18 on: March 05, 2015, 05:05:55 pm »
Bump,

I still have some funds unavailable.

I tried the 0.5.2 workaround (restore was ok),  but one of my accounts in the wallet has some missing CNY (~90%).
I also tried regenerating keys and rescaning the blockchain without success.

-- edit
1) restore old backup (2014-10-28) using v0.5.3 => OK.
2) create new backup with v0.5.3 of the recently restored wallet => OK
3) restore new backup with v0.6.2 => "Invalid Password!" error
« Last Edit: March 05, 2015, 05:23:08 pm by ElMato »

Offline vikram

Re: Restoring wallet backup throws assert exception
« Reply #19 on: March 05, 2015, 05:50:50 pm »
Bump,

I still have some funds unavailable.

I tried the 0.5.2 workaround (restore was ok),  but one of my accounts in the wallet has some missing CNY (~90%).
I also tried regenerating keys and rescaning the blockchain without success.

-- edit
1) restore old backup (2014-10-28) using v0.5.3 => OK.
2) create new backup with v0.5.3 of the recently restored wallet => OK
3) restore new backup with v0.6.2 => "Invalid Password!" error

After you import the backup into 0.5.3, just upgrade directly to 0.6.2 without making a new backup. Then wait until fully synced and try regenerate + rescan.

Offline ElMato

  • Sr. Member
  • ****
  • Posts: 288
    • View Profile
Re: Restoring wallet backup throws assert exception
« Reply #20 on: March 15, 2015, 07:53:20 am »
Thanks for you help @vikram.

Just wanted to let you know this.

The 0.5.2 workaround worked fine, but CNY funds were still missing. (about 90% of the balance)

Just 1 minute ago i was buying USD with BTS using this "problematic" account.
After i submitted the ask and typed "balance" to see the new USD ...  magically all the CNY appeared (apart from the recently purchased USD).

strange ... but all funds are ok. :)