btcpayserver-plugins icon indicating copy to clipboard operation
btcpayserver-plugins copied to clipboard

[bug] tickettailor - some tickets are not being issued

Open albjeremias opened this issue 2 years ago • 12 comments

tickettailor was working ok. some tickets are not being issued...

The user gets stuck with this message: image

On the server we can observe this error: image

Also when going around in the btcpayserver ui, found out this error on the webhooks tab image

albjeremias avatar Aug 01 '22 09:08 albjeremias

it seems its not all the tickets.. but only some.. they appear as settled.. but then it won't ever issue the ticket. if there is more info i can provide feel free to request!

albjeremias avatar Aug 01 '22 09:08 albjeremias

Can you go to server logs and share any errors?

Kukks avatar Aug 01 '22 14:08 Kukks

I just tried to do a quick fix, pushed an update to the plugin. Can you try it out?

Kukks avatar Aug 01 '22 14:08 Kukks

I just tried to do a quick fix, pushed an update to the plugin. Can you try it out?

Hi, I'm the admin on the server, I'll try it out and let you know asap, tks.

decentralizedb avatar Aug 01 '22 15:08 decentralizedb

I updated the plugin to versión Ticktetailor v1.0.2.0. I stopped and started the BTCPayserver and I tried to redeliver the ticket that fails but seems like don't connect to BTCPayserver, in server logs, I didn't see anything after starting the server: ---------------------Server Log------------------------------------------- 2022-08-01 17:19:29.570 +02:00 [INF] Root Path: / 2022-08-01 17:19:30.448 +02:00 [INF] SSH settings detected, testing connection to [email protected] on port 22 ... 2022-08-01 17:19:30.490 +02:00 [INF] Starting listening NBXplorer (BTC) 2022-08-01 17:19:30.549 +02:00 [INF] Start watching invoices 2022-08-01 17:19:30.655 +02:00 [INF] Starting payment request expiration watcher 2022-08-01 17:19:30.804 +02:00 [INF] BTC: Checking if any pending invoice got paid while offline... 2022-08-01 17:19:30.917 +02:00 [INF] SSH connection succeeded 2022-08-01 17:19:30.952 +02:00 [INF] Starting 2022-08-01 17:19:30.952 +02:00 [INF] 0 pending payment requests being checked since last run 2022-08-01 17:19:31.012 +02:00 [INF] BTC: 0 payments happened while offline 2022-08-01 17:19:31.012 +02:00 [INF] Connected to WebSocket of NBXplorer (BTC) ------------------End Server Log ---------------------------------------------

On the client side I receive a message that says: Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request

Reason: Error reading from remote server Apache/2.4.52 (Ubuntu) Server at pagosinreglas.ddns.net Port 443 image

After that I tried to test the webhook and received a timeout error: InvoiceCreated event could not be delivered. Error message received: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.

image

Now I can't deliver any tickets, should I roll back to the previous version?

decentralizedb avatar Aug 01 '22 15:08 decentralizedb

Hi, can you try updating again?

Kukks avatar Aug 03 '22 07:08 Kukks

Hi, I tested the new version, and the webhook test and forwarding worked on one of the failed invoices. However, the ticket is still not generated. Any idea? Or because already marked as an error, a refund must be made? Or ticket must be issued manually within the Tickettailor system? In the image more details image image

decentralizedb avatar Aug 03 '22 09:08 decentralizedb

On BTCPayserver logs I can see this error message: -------------------------------------------------------------------- BTCPayserver log ----------------------------------------------------------- 2022-08-03 12:19:59.754 +02:00 [ERR] Failed to issue ticket BTCPayServer.Client.GreenfieldValidationException: Status: Status can only be marked to invalid or settled within certain conditions.

at BTCPayServer.Controllers.Greenfield.LocalBTCPayServerClient.HandleActionResult(IActionResult result) in /home/decentralizedb/btcpayserver/BTCPayServer/Controllers/GreenField/LocalBTCPayServerClient.cs:line 479 at BTCPayServer.Controllers.Greenfield.LocalBTCPayServerClient.GetFromActionResult[T](IActionResult result) in /home/decentralizedb/btcpayserver/BTCPayServer/Controllers/GreenField/LocalBTCPayServerClient.cs:line 466 at BTCPayServer.Controllers.Greenfield.LocalBTCPayServerClient.MarkInvoiceStatus(String storeId, String invoiceId, MarkInvoiceStatusRequest request, CancellationToken token) in /home/decentralizedb/btcpayserver/BTCPayServer/Controllers/GreenField/LocalBTCPayServerClient.cs:line 863 at BTCPayServer.Plugins.TicketTailor.TicketTailorService.ProcessEvents(CancellationToken cancellationToken) in C:\Git\btcpayserver\Plugins\BTCPayServer.Plugins.TicketTailor\TicketTailorService.cs:line 200 2022-08-03 12:20:05.861 +02:00 [ERR] Failed to issue ticket BTCPayServer.Client.GreenfieldValidationException: Status: Status can only be marked to invalid or settled within certain conditions.

at BTCPayServer.Controllers.Greenfield.LocalBTCPayServerClient.HandleActionResult(IActionResult result) in /home/decentralizedb/btcpayserver/BTCPayServer/Controllers/GreenField/LocalBTCPayServerClient.cs:line 479 at BTCPayServer.Controllers.Greenfield.LocalBTCPayServerClient.GetFromActionResult[T](IActionResult result) in /home/decentralizedb/btcpayserver/BTCPayServer/Controllers/GreenField/LocalBTCPayServerClient.cs:line 466 at BTCPayServer.Controllers.Greenfield.LocalBTCPayServerClient.MarkInvoiceStatus(String storeId, String invoiceId, MarkInvoiceStatusRequest request, CancellationToken token) in /home/decentralizedb/btcpayserver/BTCPayServer/Controllers/GreenField/LocalBTCPayServerClient.cs:line 863 at BTCPayServer.Plugins.TicketTailor.TicketTailorService.ProcessEvents(CancellationToken cancellationToken) in C:\Git\btcpayserver\Plugins\BTCPayServer.Plugins.TicketTailor\TicketTailorService.cs:line 200 -------------------------------------------------------------------- end BTCPayserver log -----------------------------------------------------------

decentralizedb avatar Aug 03 '22 10:08 decentralizedb

Due to that, the ticket remains with an error status in the Tickettailor system is not possible to issue it automatically from BTCPayserver. The ticket should be issued manually.

The message that is displayed now in the invoice error is: Error Ticket could not be created. You should refund customer. {"status":400, "error_code": "VALIDATION_ERROR", "message": "One or more fields failed validation", "errors":[{"field": "name", "messages":["Please enter a full name"]}]}]} image

The issue could be closed.

decentralizedb avatar Aug 03 '22 12:08 decentralizedb

Due to that, the ticket remains with an error status in the Tickettailor system is not possible to issue it automatically from BTCPayserver. The ticket should be issued manually.

The message that is displayed now in the invoice error is: Error Ticket could not be created. You should refund customer. {"status":400, "error_code": "VALIDATION_ERROR", "message": "One or more fields failed validation", "errors":[{"field": "name", "messages":["Please enter a full name"]}]}]} image

The issue could be closed.

Sorry, I missed this notification. Is there a name on the invoice buyer information? If there isn't, then the user tried to bypass the name entry which makes the ticket issuance invalid.

Kukks avatar Aug 18 '22 06:08 Kukks

Due to that, the ticket remains with an error status in the Tickettailor system is not possible to issue it automatically from BTCPayserver. The ticket should be issued manually. The message that is displayed now in the invoice error is: Error Ticket could not be created. You should refund customer. {"status":400, "error_code": "VALIDATION_ERROR", "message": "One or more fields failed validation", "errors":[{"field": "name", "messages":["Please enter a full name"]}]}]} image The issue could be closed.

Sorry, I missed this notification. Is there a name on the invoice buyer information? If there isn't, then the user tried to bypass the name entry which makes the ticket issuance invalid.

In the plugin, the fields force you to enter the information. However, I can see first-name filled correctly, but Last-name probably was filled with only three spaces. In the images, you can see what happened, as you can put three spaces and as is saved without it at checkout.

Could spaces be causing the problem?

image

image

decentralizedb avatar Aug 18 '22 08:08 decentralizedb

Yes, that's definitely the issue here. We only have some client-side validation currently.

Kukks avatar Sep 27 '22 11:09 Kukks