[Bug]: brand new btcpayserver can't generate new btc receive address
See original GitHub issueWhat is your BTCPay version?
v1.6.12.0 (Altcoins)
How did you deploy BTCPay Server?
docker build
What happened?
Create a new store, create a btc wallet, check import private key to rpc Then, creating a new bitcoin address fails
How did you encounter this bug?
Add bitcoin wallet, select segwit, check import private key to rpc generate new receive address
Relevant log output
fail: Microsoft.AspNetCore.Server.Kestrel: Connection id "0HMLCA8B39H2P", Request id "0HMLCA8B39H2P:0000002D": An unhandled exception was thrown by the application.
NBitcoin.RPC.RPCException: This type of wallet does not support this command
at NBitcoin.RPC.RPCResponse.ThrowIfError()
at NBitcoin.RPC.RPCClient.SendCommandAsync(RPCRequest request, CancellationToken cancellationToken)
at NBitcoin.RPC.RPCClient.ImportPrivKeyAsync(BitcoinSecret secret, String label, Boolean rescan)
at NBXplorer.Backends.Postgres.PostgresRepository.ImportAddressToRPC(BitcoinExtKey accountKey, BitcoinAddress address, KeyPath keyPath) in /source/NBXplorer/Backends/Postgres/PostgresRepository.cs:line 886
at NBXplorer.Backends.Postgres.PostgresRepository.ImportAddressToRPC(DbConnectionHelper connection, TrackedSource trackedSource, BitcoinAddress address, KeyPath keyPath) in /source/NBXplorer/Backends/Postgres/PostgresRepository.cs:line 880
at NBXplorer.Backends.Postgres.PostgresRepository.GetUnused(DerivationStrategyBase strategy, DerivationFeature derivationFeature, Int32 n, Boolean reserve) in /source/NBXplorer/Backends/Postgres/PostgresRepository.cs:line 807
at NBXplorer.Backends.Postgres.PostgresRepository.GetUnused(DerivationStrategyBase strategy, DerivationFeature derivationFeature, Int32 n, Boolean reserve) in /source/NBXplorer/Backends/Postgres/PostgresRepository.cs:line 808
at NBXplorer.Controllers.MainController.GetUnusedAddress(String cryptoCode, DerivationStrategyBase strategy, DerivationFeature feature, Int32 skip, Boolean reserve) in /source/NBXplorer/Controllers/MainController.cs:line 142
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
What browser do you use?
No response
Additional information
No response
Are you sure this is a bug report?
- I confirm this is a bug report
Issue Analytics
- State:
- Created a year ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Frequently Asked Questions and Common Issues
This document contains a Table of contents to all FAQ and common issues. ... How does BTCPay create a new address for each...
Read more >getting HTTP error 500 when pressing Generate BTC ...
Describe the bug I'm getting HTTP error 500 in BTCPayServer, when pressing Generate BTC Address button on Wallets / Receive page.
Read more >btcpayserver/Changelog.md at master
Fix: Shop's new receipt and cart not displaying items correctly and missing ... Can customize invoice's metadata for payments received through LN Address....
Read more >BTCPay Server Workshop w/Pavlenex & Wouter Samaey
Bas Peters & Wouter Samaey take us through a demo to use the BTCPay Server at Bitcoin Amsterdam #day2 #bitcoinamsterdam #workshopstage ...
Read more >Btc Wallet Out Of Sync
Whenever a new Bitcoin node comes online, it must first sync with the rest of the ... I cannot login into the Wallet...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@anycolo just so you know: when you create a wallet you don’t have to import addresses to RPC.
https://github.com/btcpayserver/btcpayserver/issues/4269#issuecomment-1313363342
Sorry for the inconvenience 😦