Magento2: Orders being deleted from database, both sales_order and sale_quote tables

Created on 14 Feb 2020  Â·  13Comments  Â·  Source: magento/magento2

Preconditions (*)


I am currently using Magento 2.3.3 however this has been reported as well (Issue #23463) on previous Magento versions.
This error has occurred across all browsers and when using various different payment processors, some Magento built-in one such as authorize.net and some extensions such as cardknox

Steps to reproduce (*)

  1. Customer successfully places an order
  2. Credit Card processor processes the order and charges the card.
  3. Credit Card processor send bag an 'Approved' response to Magento

Expected result (*)

  1. Order is added to admin sales order grid
  2. Order can be found in database

Actual result (*)

  1. Order is not found in admin grid, however the order id is skipped
  2. Order is nowhere to be found in database, not sales_order table and not sales_quote table
ready for confirmation Reported on 2.3.3 S1

Most helpful comment

I have finally been able to narrow down and reproduce the issue -
although I have not yet found a solution.
The frontend error that appears is 'invalid state change requested'
This however is not stopping the payment from being captured - only the
recording is being stopped.

On Thu, Jun 4, 2020 at 1:36 PM Terence Palmer notifications@github.com
wrote:

We are having the same issue with Authorize.net, also seemingly random.
Payment is being processed, but no order appears in the database. The order
number is reserved, however, so the next order number is incremented.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://mailtrack.io/trace/link/7d70cedbdc5a43d6ae653551ad6b3eb8c6567d88?url=https%3A%2F%2Fgithub.com%2Fmagento%2Fmagento2%2Fissues%2F26880%23issuecomment-639000502&userId=4761662&signature=93fb511e6593ad20,
or unsubscribe
https://mailtrack.io/trace/link/b09a48abb16160866cbb9a13de20a02fc47a996d?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOR23HHWXVKKPOWAJAE4ORTRU7LQNANCNFSM4KVKZWJA&userId=4761662&signature=44db3876255092bd
.

All 13 comments

Hi @rigroweb. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

@rigroweb do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

To ensure that I can reproduce please:
@magento give me 2.4-develop instance

Hi @rigroweb. Thank you for your request. I'm working on Magento 2.4-develop instance for you

Hi @rigroweb, here is your Magento instance.
Admin access: https://i-26880-2-4-develop.instances.magento-community.engineering/admin_d078
Login: a0795db4 Password: 809288f62f5b
Instance will be terminated in up to 3 hours.

The site is giving me security warnings as the ssl expired already.
As I want to process payment transactions can you please send me a secure version?

@rigroweb now should be fixed, please try again

We are also experiencing this; and I can add that it has occurred for us even with bank transfer payment - where there's no third party payment processing. So the issue seems unrelated to payment provider.

@rigroweb @stkristobal unfortunately in order to fix the issue we need to identify it, so we need more details. Following info could help us reproduce the issue:

  • exact steps to reproduce (if you have)
  • error or exception logs
  • any other info, for instance what exact payment method was used, how it was configured, etc.
  • how did you understand that data was removed from quote & order info? did you saw that it was already saved to the DB? What happened between time when you saw that it was saved and when you found that data was deleted? Do you have any integrations / extensions that could potentially cause this issue?

Please remove your personal info/credentials/internal info/etc. before adding info.

First idea that comes to my mind - some exception happened, usually it happens during payment processing, than it wasn't processed correctly and that exception caused transaction rollback. As result - order data was not saved to DB.

@ihor-sviziev I wish I could. For us it's been random, but has occured 5 times in the past two months - covering 2.3.3 and 2.3.4. Both using Klarna and Wiretransfer.

  • We get copies of the order confirmation, so I know this is sent (customer also gets it).
  • It's also in the reservations table in Klarna, with the order number
  • The order number is not listed in the database or the backend.
  • No error message is logged anywhere.

Consequently it's REALLY hard to reproduce.
I'm just speaking from our experiences now.

I have had the exact same experience using both authorize.net and cardknox
as the payment processor.

  • We get copies of the order confirmation, so I know this is sent
    (customer also gets it).
  • It's also in the payments table in Authorize.net or Cardknox, with the
    order number, and the payment is authorized and collected.
  • The order number is not listed in the database or the backend.
  • No error message is logged anywhere.
  • The customer cannot see this order in their frontend 'orders' section

I do not know that I can reproduce the error, I can simply wait for it to
happen again.

On Wed, Feb 19, 2020 at 1:31 PM stkristobal notifications@github.com
wrote:

@ihor-sviziev
https://mailtrack.io/trace/link/c86697dcbd85fb3e15ef3562dca707f5cd97541b?url=https%3A%2F%2Fgithub.com%2Fihor-sviziev&userId=4761662&signature=8506b412395da99a
I wish I could. For us it's been random, but has occured 5 times in the
past two months - covering 2.3.3 and 2.3.4. Both using Klarna and
Wiretransfer.

  • We get copies of the order confirmation, so I know this is sent
    (customer also gets it).
  • It's also in the reservations table in Klarna, with the order number
  • The order number is not listed in the database or the backend.
  • No error message is logged anywhere.

Consequently it's REALLY hard to reproduce.
I'm just speaking from our experiences now.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://mailtrack.io/trace/link/736ff32aec8a8986c358603ac6dc9d9f832ad2d7?url=https%3A%2F%2Fgithub.com%2Fmagento%2Fmagento2%2Fissues%2F26880%3Femail_source%3Dnotifications%26email_token%3DAOR23HGXS6AX26EH7CPRHFLRDV3HFA5CNFSM4KVKZWJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMI57JA%23issuecomment-588373924&userId=4761662&signature=e7a241c2b2823954,
or unsubscribe
https://mailtrack.io/trace/link/3df81757ca6780de36208c122c917e884e371449?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOR23HBLO3OJC7W5KQ4MRMLRDV3HFANCNFSM4KVKZWJA&userId=4761662&signature=c2de4d6dc6bc58b4
.

We are having the same issue with Authorize.net, also seemingly random. Payment is being processed, but no order appears in the database. The order number is reserved, however, so the next order number is incremented.

I have finally been able to narrow down and reproduce the issue -
although I have not yet found a solution.
The frontend error that appears is 'invalid state change requested'
This however is not stopping the payment from being captured - only the
recording is being stopped.

On Thu, Jun 4, 2020 at 1:36 PM Terence Palmer notifications@github.com
wrote:

We are having the same issue with Authorize.net, also seemingly random.
Payment is being processed, but no order appears in the database. The order
number is reserved, however, so the next order number is incremented.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://mailtrack.io/trace/link/7d70cedbdc5a43d6ae653551ad6b3eb8c6567d88?url=https%3A%2F%2Fgithub.com%2Fmagento%2Fmagento2%2Fissues%2F26880%23issuecomment-639000502&userId=4761662&signature=93fb511e6593ad20,
or unsubscribe
https://mailtrack.io/trace/link/b09a48abb16160866cbb9a13de20a02fc47a996d?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOR23HHWXVKKPOWAJAE4ORTRU7LQNANCNFSM4KVKZWJA&userId=4761662&signature=44db3876255092bd
.

Hey @rigroweb,
Are you have any progress with this issue?
I have a similar problem with Klarna payment.
The customer receives an email about the success order, and the transaction is created on Klarna side (I can see this one in Klarna merchant account), but the order is absent in Magento.

Was this page helpful?
0 / 5 - 0 ratings