[Bug]: Unable to view onchain wallet after update
See original GitHub issueWhat is your BTCPay version?
1.7.4
How did you deploy BTCPay Server?
manual
What happened?
I am unable to look at my on chain wallets. This seems to be a known bug (issue closed). I only discovered the problem recently.
I attempted this solution but it didn’t work: https://github.com/btcpayserver/btcpayserver/issues/4403#issuecomment-1347606557
How did you encounter this bug?
Clicked on wallets > Bitcoin
I receive a blank screen
Relevant log output
Jan 20 19:56:35 btcpay run.sh[1494]: Exception data:
Jan 20 19:56:35 btcpay run.sh[1494]: Severity: ERROR
Jan 20 19:56:35 btcpay run.sh[1494]: SqlState: 42703
Jan 20 19:56:35 btcpay run.sh[1494]: MessageText: column "AType" does not exist
Jan 20 19:56:35 btcpay run.sh[1494]: Hint: Perhaps you meant to reference the column "wos.Type".
Jan 20 19:56:35 btcpay run.sh[1494]: Position: 278
Jan 20 19:56:35 btcpay run.sh[1494]: File: parse_relation.c
Jan 20 19:56:35 btcpay run.sh[1494]: Line: 3633
Jan 20 19:56:35 btcpay run.sh[1494]: Routine: errorMissingColumn
What browser do you use?
Firefox 108.0.2
Additional information
When I attempt to apply the DB fix posted posted by @NicolasDorier in the linked issue I receive this postgresql error: [postgres@btcpay ~]$ psql -U btcpay -d btcpay psql (14.6) Type “help” for help.
btcpay=> UPDATE nbxv1_metadata SET data=‘“Descriptors”’ WHERE key=‘ImportAddressToRPC’ AND data != ‘“False”’; ERROR: relation “nbxv1_metadata” does not exist LINE 1: UPDATE nbxv1_metadata SET data=‘“Descriptors”’ WHERE key='I…
Are you sure this is a bug report?
- I confirm this is a bug report
Issue Analytics
- State:
- Created 8 months ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
I ended up dropping the btcpay and nbxplorer databases and setting up my BTCpay server fresh like a new install. It was very fast to set it up and the on-chain wallet now works correctly.
I would recommend updating the documentation for the extended manual setup to use tagged versions of btcpay and nbxplorer: https://docs.btcpayserver.org/Deployment/ManualDeploymentExtended/
Currently the install and update commands will just pull from master: cd ~; pushd ~/src/NBXplorer; git pull; ./build.sh; popd; cd ~; pushd ~/src/btcpayserver; git pull; ./build.sh; popd;
@NicolasDorier mentioned that using master is not a good idea and in my case resulted in a broken on-chain wallet.
This ticket can be closed as my issue has been resolved. I just wanted a responsible party to see my suggestion about updating the documentation so this doesn’t happen to someone else in the future.
Thank you for getting back to me.
I believe I have only ever used tagged releases. I used the Extended Manual guide to build my server. I have only ever used these commands to perform upgrades to nbxplorer and btcpay server as per the guide instructions:
cd ~; pushd ~/src/NBXplorer; git pull; ./build.sh; popd; cd ~; pushd ~/src/btcpayserver; git pull; ./build.sh; popd;
I assume those only use tagged releases?
Other thing to note that is maybe relevant and I forgot to mention. I’ve been running this server for several years and originally Nbxplorer was using the DBTrie DB and maybe 6 months or so ago I moved it to Postgres per recommendations on github. I am pretty sure the on chain wallet worked following that change. The little graph on the Dashboard that relies on Nbxplorer running Postgres is still working.
I usually upgrade when there is a new release but not every time. I might have jumped one of the 1.7.X releases. Not sure if they are cumulative (probably) or if perhaps there was a DB change in one of them that I missed by skipping a release.
If it’s too much trouble I can dump these on chain wallets and start fresh. Not sure if there is a guide to doing so, I assume I have to delete the data in a table such as “nbxv1_metadata”?