question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: POS LNURL fails on System.InvalidOperationException

See original GitHub issue

What is your BTCPay version?

BTCPay Server v1.10.3+983b8c1f5

How did you deploy BTCPay Server?

Official Docker stack

What happened?

Calling LNURL fails with 500 code on a client and System.InvalidOperationException: Nullable object must have a value. in a Btcpay logs.

How did you encounter this bug?

  1. Having POS app with static QR codes
  2. Scanned QR code by a walet or called LNURL by Curl
  3. Client reports 500 status code with no message

Relevant log output

fail: Microsoft.AspNetCore.Server.Kestrel: Connection id "0HMS5B9NJNJOC", Request id "0HMS5B9NJNJOC:00000009": An unhandled exception was thrown by the application.
System.InvalidOperationException: Nullable object must have a value.
   at System.Nullable`1.get_Value()
   at BTCPayServer.UILNURLController.GetLNURLForApp(String cryptoCode, String appId, String itemCode) in /source/BTCPayServer/Controllers/UILNURLController.cs:line 297
   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.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed 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.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at BTCPayServer.Hosting.BTCPayMiddleware.Invoke(HttpContext httpContext) in /source/BTCPayServer/Hosting/BTCpayMiddleware.cs:line 98
   at BTCPayServer.Hosting.GreenfieldMiddleware.Invoke(HttpContext httpContext) in /source/BTCPayServer/Hosting/GreenfieldMiddleware.cs:line 50
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at BTCPayServer.Hosting.HeadersOverrideMiddleware.Invoke(HttpContext httpContext) in /source/BTCPayServer/Hosting/HeadersOverrideMiddleware.cs:line 30
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

What browser do you use?

Curl, Phoenix, Breez

Additional information

I checked LND logs, but nothing was printed at the time of request.

Tried also internal node and LNbank.

LNURL codes stopped working without any admin action at Thu, 13 Jul 2023 at the morning with some older version, today I tried if update will fix it.

Are you sure this is a bug report?

  • I confirm this is a bug report

Issue Analytics

  • State:closed
  • Created 2 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Kukkscommented, Jul 17, 2023
0reactions
Mirafshinascommented, Aug 3, 2023

My Public Address to Receive BTC bc1q7jjhyzr2pmxmvujh9rf4dc5khhcsh6532amkq2

Pay me via Trust Wallet: https://link.trustwallet.com/send?coin=0&address=bc1q7jjhyzr2pmxmvujh9rf4dc5khhcsh6532amkq2

در تاریخ جمعه ۴ اوت ۲۰۲۳،‏ ۰۰:۱۵ Honza Pobořil @.***> نوشت:

In meantime I migrated node (new lnd instance) and there it works.

3. 8. 2023 19:55:05, Pavlenex @.***> napsal:

@iBobik https://github.com/iBobik Can you give it a try again?

— Reply to this email directly, view it on GitHub < https://github.com/btcpayserver/btcpayserver/issues/5178#issuecomment-1664397819>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAEV6WB4PYTHZNW2JY3NNMDXTPQXTANCNFSM6AAAAAA2LNNKGM>

. You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/btcpayserver/btcpayserver/issues/5178#issuecomment-1664625328, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYNSGHD2FVDTXVYC6AYL5ADXTQEUZANCNFSM6AAAAAA2LNNKGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why would a payment using LNURL that has always ...
I'm attempting to send a payment using a LNURL (I have it saved locally and change the payment amount while in the originating...
Read more >
Untitled
Digimon world re digitize evolution item, General error response 403 airmail, ... 6 camera surveillance system, Asia pacific map black and white, ...
Read more >
Continue: Error Cleartext Not Permitted Android Studio | PDF
Associative fields store duplicate values under one key automated ticketing system used by passengers at the railway station An error occurred ...
Read more >
Error cleartext not permitted android studio
Associative fields store duplicate values under one key automated ticketing system used by passengers at the railway station An error occurred ...
Read more >
sitemap-questions-245.xml
... 2017-05-05 https://stackoverflow.com/questions/1234993/qt-cross-platform-issue-compiles-fine-on-windows-linker-error-on-linux 2017-05-07 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found