[ORDERS] Adding multiple lines in parallel fails on some shops

We’ve started to see a high amount of errors without a clear explanation (i.e. GraphQL operational errors: Internal error. Looks like something went wrong on our end) when our app tries to add multiple lines to an order.

This doesn’t happen on every store, just a few, and it doesn’t seem related to the amount of lines we’re trying to add since the ones that fail have around 5 lines and with a test we performed, we were able to add 15 without issues.

The mutations we are using are

To create the draft order:

  mutation beginEdit($orderId: ID!) {
    orderEditBegin(id: $orderId) {
      calculatedOrder {
        id
        totalOutstandingSet {
          shopMoney {
            amount
          }
        }
      }
      userErrors {
        field
        message
      }
    }
  }

And to add the line items

  mutation addVariantToOrder(
    $calculatedOrderId: ID!
    $variantId: ID!
    $quantity: Int!
  ) {
    orderEditAddVariant(
      id: $calculatedOrderId
      variantId: $variantId
      quantity: $quantity
      allowDuplicates: true
    ) {
      calculatedOrder {
        id
        addedLineItems(first: 5, reverse: true) {
          edges {
            node {
              id
              quantity
            }
          }
        }
      }
      userErrors {
        field
        message
      }
    }
  }

If it helps, the API version we are using is 2024-07. Here are some example request ids:

  • fde2e9c7-7251-4447-a081-5369d421e19a-1739968572
  • 88b34da7-a53a-41cd-8ecc-e6b44f90b27f-1739968108
  • 28fb8e95-f61b-4325-ad45-af4a4c03af46-1739961505
  • 3c7272c2-1aa4-48a6-936e-f1c935a6b730-1739945022
  • d5cc9b32-9b3a-4153-8efe-dcd9a7d4a74b-1739930444

EDIT: We checked one of the affected stores and for the looks of it, it started failing consistently (for them) yesterday around 12 UTC

1 Like

Hi AgCig,

Are you seeing this on just one store or multiple stores? I am seeing an error related to LineItemChangesetNotFoundError on the requestId you’ve provided but there doesn’t seem to be other reports of this issue so I’m thinking it’s possibly specific either to this store or the app?

It had happened on 3 stores at the time of posting but I’ve seen one new this morning. It definitely doesn’t happen on every store which is strange.

I don’t see how this could be specific to the app since it’s not failing on most stores, and when running the same process synchronously it does work. Also. it started failing without us doing any changes around that portion of the code

Are the mutations that are failing recently also adding low numbers of line items (eg: five)? Have connected with other teams here too, to help identify what may be happening.

That is correct. At some point we thought it could be related to the amount of lines, but on a store that isn’t failing, we were able to add 15 lines simultaneously. I can provide more failed transactions if your team needs fresh ones too

Hi again,

Still trying to determine what is causing this. If you have another error code/ headerID where there’s a low number of line items that would be helpful.

Sure thing:

  • 6bf3a972-ccf5-46b8-a6ff-945c64cb74f8-1740389050 (4 items)
  • 15632fe3-3559-4f09-b1be-0d2e4dade41a-1740365556 (5 items)
  • ba9474b8-3fb8-4d7f-9716-68ffb975484c-1740364925 (4 items)

Hey - no update as of yet on this, still digging into it on our side. Are you still seeing this issue?

Thanks @Liam-Shopify I can confirm that the problem is still occurring consistently.

Hey folks - our team is investigating this further. Will update when I have more to share.

Thanks. Let us know if you need more request id examples. We’ve started to see this happening on more stores now. Ones that weren’t failing before

If you could share another recent ID that would help - I’ll connect with the team on this again today.

Sure thing:

  • 08f8cfe5-ecc2-49ae-a57d-37cdf9853a90-1741183241
  • d121298d-3b9b-43d2-899f-0e10c4fbcd1d-1741179947
  • 1f7ca4cd-5431-4c46-b258-730deb0e32c2-1741179643
  • 40cb0e52-1c55-454d-98da-41015123a1d8-1741176049
  • 34c34313-a09d-43e0-ab3e-966145b239b6-1741168853

I haven’t checked how many items these ones have, I only know those were failed attempts. They also seem to be affecting more shops now

knock on wood… we haven’t seen this issue since March 6th. Has anything changed?

Hey folks,

There were some recent updates shipped in relation to order management, so hopefully this was addressed. Let me know if you see this reoccurring.

1 Like

Yea we (Agus and I work together) have not seen the issue since it stopped 4 or 5d ago.

Thanks so much @Liam-Shopify

1 Like