-
Notifications
You must be signed in to change notification settings - Fork 41
Some invoices return a Unexpected return code: 500 #23
Comments
I just checked my woocommerce "fatal-errors.log" file and found the following error on each attempt:
|
When did it start appearing? which plugin version? |
I'm currently on Version 3.0.3. This has been going for a few weeks. I think it might be the same issue as before, which hangfire was getting held up but not that hangfire is no longer existing it simply shows this in the logs. I will upgrade to 3.0.6 to see if this helps, but I suspect its been like this for a while. |
@Kukks any memory about this? |
No clue what could be wrong here |
I can confirm that I'm seeing this error sometimes on expired invoices as well. It's been going on for ages, I just have no idea how to troubleshoot it.
I'm unable to connect the events happening with any error WooCommerce/WordPress or server side logs. |
Can any of you experiencing the issue see if there is a fatal errors log
file in woocommerce and if there is anything corresponding to the ipn error
time in btcpay
…On Mon, Feb 18, 2019, 09:32 Esky33 ***@***.*** wrote:
[image: screenshot 2019-02-18 at 08 28 56]
<https://user-images.githubusercontent.com/30862925/52937553-530c5800-3357-11e9-9639-6c721ca8c394.png>
I'm running the latest version, 3.0.6, I`m not seeing any problems, with
any expired invoices, just so you know!!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABu-_iKAFZk3X4eL4S55f38OC7pN_Fwtks5vOmUxgaJpZM4a81y7>
.
|
@Kukks I think I remember this issue. I think I fixed it in the old version, you may have thrown the fix away when migrated. Basically it is a race condition if somebody click twice on the checkout button too fast. |
@astupidmoose can you check that for your order, BTCPay created 2 different BTCPay invoices? |
@astupidmoose can you also confirm that the customer does not have any issue and you did not had to manually fix anything? |
No, for this example, 72724 is only generated once in BTCPay.
Customers never pay these invoices when this happens. I am thinking they are presented an Error that BTCPAY is not working and abandon the cart. Unfortunately, this is happening to customers who do not inform us of an issue and simply leave. |
OK this could be wrong.... I found an invoice where the error happened on creation, however was paid by the customer and then fixed itself. On creation, the fatal-errors log shows: 2019-02-15T19:15:00+00:00 CRITICAL Uncaught Exception: Received IPN for order 72954 with BTCPay invoice id72954 while expected BTCPay invoice is in /var/www/html/wp-content/plugins/btcpay-for-woocommerce/class-wc-gateway-btcpay.php:1001 BTCPay logs show as: `
` |
Still having the same issue. I'm running 3.0.6 now. For some reason, woocommerce and btcpay stop talking to each other. BTCPay just starts throwing up Error 500 on every invoice creation request.
The only way to fix this is completely restarting btcpay which allows it to start generating invoices again. That leads me to beleive its a BTCPay issue more then a plugin one. |
I know the issue. |
@Kukks |
@cryptofuture are you running on an SSD? The solution for me ended up switching to an SSD setup as I was running on sata before. The issue was that the invoice was taking too long to create for woocommerce with sata |
On SSD RAID10 |
@cryptofuture it does that for every invoice or only once in a while? |
For an every invoice. Error in the log says:
But from what i think there is an issue with As i said if I try to log But what I could say 100% is that btcpayserver sending data on |
@cryptofuture can you see, in the order metadata if you have BTCPay_id or BTCPay_rate or something like this? |
do you have a |
When you go inside btcpay's invoice details do you see an order id? |
Yes, it also has hyperlink to the woocommerce order-received (redirectUrl) on it in the interface |
@cryptofuture see |
Yes, I have it |
Damn, I don't know how this can happen... This is where we get the orderId after querying the API. |
For example, you can try to print
|
Trying now.
|
No orderId... can you go to |
If I tried to pair with proxified version of btcpayserver and it would stop even earlier on invoice generation here:
So yes, for some reason when I use btcpayserver directly I could generate invoice, but couldn't get it. How I could log all request data its sending to get invoice? So I could try to curl it directly on machine that is running btcpayserver. |
@cryptofuture I think I know what is going on in your case. |
Request to the This is what I see in the tcpdump (I wonder where
But even if in btcpayserver machine, if I do something like
It ends with |
@cryptofuture this is interesting fact. Let me check. |
same thing with the createInvoice? no signature? |
Checking now, I launched tcpdump little bit late
Based on this code it must have |
In your logs
the api_token is just a string right, not JSON ? |
the api_token is just a string right, not JSON ?
Its a long string that is looks like its base64 in the log. Ends with |
Ok now I am wondering why all of this ever worked for anybody... one sec |
@cryptofuture do you see something like this in the logs "[Info] API Token decrypted successfully." |
I just checked actually this should work.... the When a new invoice need to be created, it is deserialized/decrypted. |
So |
have you BTCpay |
git rev-parse HEAD shows 3cce7b8b35705b2ed424964f03d3dd463f488f42 I checked the post the invoices and it contains
Hmm, I use
|
So that's why! Update to the latest stable (the In last versions, I removed the concept of facade. Now user facade input is ignored, and the API always returns merchant. |
I'll but how this would help to sign |
Because when you pair your store, you need to select I think in both case you need to repair and select |
OK would try. Could confirm facade is |
New versions just removed the Facade option so people can't screw up. |
Same thing with |
Works now after btcpayserver update, and another re-pairing also in webserver logs reply on
And
But in woocommerce Orders lists it still marked as So if select |
@cryptofuture the default parameter should be good, but in the settings of the plugin you can map |
We're having a similar issue currently. I've detached our self hosted BTCPay server and connected it to BTCPayJungle and we're looking at this: Woo logs state:
Removed and re-added the plug in / paired and added this snippet from the FAQ since it suggests it is the error: This is happening on every invoice now. |
@Kukks any idea? |
@DNSTARS are you using a custom numbering system in woocommerce? |
Sorry to waste your time, I've gone backwards through all the logs and it seems our X-Frame-Options in WP was changed, given the earlier comments I'll see what is going on there. I think this one is probably a silly issue my side. We went from X-Frame-Options DENY to Header always set X-Frame-Options ALLOW and possibly a few other bits at the exact time this all started. Made a new WP and threw woo/plug in and BTCPayjungle toether and it works fine - sorry lads. |
@DNSTARS I'm getting the same issue as you've described. My 'payment pending' isn't turning to 'processing' because of this IPN issue. What did you do to fix? |
I didn't fix it per se, I just tried BTCPay on a fresh install of WP/Woo and it works, one thing I did notice was that we're on PHP7.0X on debian where it's not working and the test version where it is working is PHP7.2 on ubuntu, that may or may not be significant. Incidentally our X-Frame options had been set to just "ALLOW" which apparently isn't a valid argument, deleting it out is the expected answer to "Allow", having done that though our issue remained. Update: 12/06 WooCommerce Admin A new JavaScript-driven interface for managing your store. The plugin includes new and improved reports, and a dashboard to monitor all the important key metrics of your site. Version 0.12.0 This was the culprit - turn it off and see what errors you get your side @k3tan172 , turning this on and off directly matches the IPN 500 errors on BTCPay. The funny thing is I'd turned it back on previously since it had no effect on the issue whilst I was fixing other stuff. Live and learn. |
I can confirm this was 100% the culprit. Deactivate the Woocommerce Admin plugin and it works like a charm. |
For context: I host BTCPay and Woocommerce on different machines, on different networks.
Sometimes, BTCPay generates an invoice for the customer, however it gets hit with:
BTCPay continues to generate this error every 10 minutes until the invoice expires. BTCPay is never able to assign metadata to the woocommerce invoice. Once expired, the status is set to expired and generates another error 500:
This cycles 3 times every 10 minutes for 1 hour.
I know that error 500 indicates a server error, but it seems completely random at the moment and only happens to some invoices.
The text was updated successfully, but these errors were encountered: