Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wallet is not accessible and database Issue after upgrading from v2019-09-09 to v2019-09-29 #2984

Closed
3 tasks done
wspi opened this issue Oct 20, 2021 · 8 comments
Closed
3 tasks done
Labels

Comments

@wspi
Copy link

wspi commented Oct 20, 2021

Just checking...

  • This is a cardano-wallet bug.
  • I am using the latest cardano-wallet release.
  • I am using the correct cardano-node version for that release of cardano-wallet.

Version

v2021-09-29 (git revision: 6626489)

Platform

Linux 4.18.0-147.8.1.el8_1.x86_64 #1 SMP Thu Apr 9 13:49:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Installation method

Binary from GitHub release page

Network configuration

mainnet

Context

I was running cardano-wallet v2021-09-09 (git revision: 011a258) and upgraded to v2021-09-29 (git revision: 6626489) but one of my wallets was not accessible

When trying to get a transaction of a wallet I got this error:
{"code":"wallet_not_responding","message":"That's embarrassing. My associated worker for WALLET_ID is no longer responding. This is not something that is supposed to happen. The worker must have left a trace in the logs of severity 'Error' when it died which might explain the cause. Said differently, this wallet won't be accessible until the server is restarted but there are good chances it'll recover itself upon restart."}

in the logs I've found this:
cardano-wallet.wallet-engine:Error:85]#033[0m [2021-10-20 18:53:08.54 UTC] Worker has exited: Unhandled exception: user error (Couldn't parse field localTxSubmissionTxfrom tablelocal_tx_submission. DecoderErrorDeserialiseFailure "Shelley Tx" (DeserialiseFailure 0 "expected list len or indef"))

I've tried restarting the node and it didn't solve the issue.

after rolling back to the v2021-09-09 (git revision: 011a258) it started to work again

Description

Steps to Reproduce

  1. create more than one shelley wallet using cardano-wallet v2021-09-09 and cardano-node 1.29.0
  2. upgrade cardano-node and cardano-wallet
  3. try to get a tx from the wallets

Expected behavior

get a tx from every wallet that has been created

Actual behavior

one of the wallets is not accessible

@wspi wspi added the Bug label Oct 20, 2021
@HeinrichApfelmus
Copy link
Contributor

The error message from the logs suggests that something is wrong with the local_tx_submission table in the database. It seems very likely that the serialization format for transactions changed between wallet versions and the table was not migrated automatically (that's a bug in the wallet). Fortunately, the local_tx_submission table stores temporary data only — transactions that have been submitted to the node, but did not yet make it to the blockchain.

Likely solutions:

  • You can stop the wallet process, delete the local_tx_submission table, and start the process again.
  • If you don't feel like fiddling with the database yourself, you can stop the wallet process, delete the she${WalletId}.sqlite file entirely (where WalletId is the alphanumeric ID of your wallet), and start the wallet process again. However, in this case, you will have to restore the wallet from the mnemonic / passphrase.

@piotr-iohk
Copy link
Contributor

Thanks for reporting. Created Jira ticket to track the migration issue -> ADP-1224.
It seems that issue is happening only when there are pending transactions on the wallet. Another workaround then would be to make sure all transactions are in ledger before migrating from v2021-09-09 to v2021-09-29.

@wspi
Copy link
Author

wspi commented Oct 21, 2021

We've tried to upgrade again now making sure all recent transactions were in ledger, and it went smooth, thanks for the help

@wspi wspi closed this as completed Oct 21, 2021
@DreamHackchosenone
Copy link

DreamHackchosenone commented Oct 23, 2021

We've tried to upgrade again now making sure all recent transactions were in ledger, and it went smooth, thanks for the help

How did you solve it?delete the local_tx_submission table?

@khelle
Copy link

khelle commented Oct 29, 2021

Can someone describe how can I delete the local_tx_submission from she${WalletId}.sqlite step-by-step?

When I try to open it using sqlite:

sqlite she${WalletId}.sqlite

I get response

Unable to open database "she${WalletId}.sqlite": file is encrypted or is not a database

Of course I did replace the template with the actual file name

@wspi
Copy link
Author

wspi commented Oct 29, 2021

We've tried to upgrade again now making sure all recent transactions were in ledger, and it went smooth, thanks for the help

How did you solve it?delete the local_tx_submission table?

before upgrading, we've listed the recent transactions of every wallet we have and checked if all were "in ledger" that being true, we've stopped cardano-wallet and cardano-node, upgraded both, and started again

@DreamHackchosenone
Copy link

We've tried to upgrade again now making sure all recent transactions were in ledger, and it went smooth, thanks for the help

How did you solve it?delete the local_tx_submission table?

before upgrading, we've listed the recent transactions of every wallet we have and checked if all were "in ledger" that being true, we've stopped cardano-wallet and cardano-node, upgraded both, and started again

Thanks, i recover wallet from mnemonic

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants
@wspi @HeinrichApfelmus @khelle @DreamHackchosenone @piotr-iohk and others