Shopify POS - intermittent "Not found" error in POS cart for newly-created items using addLineItem

In recent weeks (including today) we have received elevated reports of certain merchants experiencing this when using our app. Our app creates a new Shopify product which we then use addLineItem() to add to the POS cart.

They say that the behavior is most frequent during busy times, which leads me to believe there’s some kind of server load / latency issue happening between Shopify POS and Shopify’s own servers during high throughput periods.

Update: We switched the call from addLineItem to bulkCartUpdate and for this store they’re unfortunately experiencing this issue even after this change (which in the past has helped with this kind of issue).

They have also reported that there have been intermittent issues with checkout in general, which leads me to believe there is a broader POS Data Synchronization issue affecting their shop.

I’m happy to DM the merchant name.

I believe this issue reported by the POS Cafe team @adamwooding and @Gunes is likely related: Critical Performance Degradation: Cart Transform Latency (8s+) on POS during Peak Hours for High-Volume Merchants - #8 by adamwooding

Hey @derrick - thanks for flagging this, happy to look into. Sending you a DM.

@Alan_G for the past couple of hours we have started receiving multiple new reports of this from different merchants who’d never previously reported it before, in some cases it’s happening on 100% of checkouts so they are blocked from checking out when using our app. We cannot reproduce on our own device.

Below is an example from a customer, sanagans-kensington along with timestamps shared by Shopify support. We checked our own logs and this line item had nothing out of the ordinary from our side with successful product / variant creation as well as publication from Shopify’s API.

Exact error chain (12:47:11-12:47:20)

Time
Event

12:47:11
Extension adds "Lamb Leg Steaks 0.61 lb @ $23.99/lb" (variantId 48264183742689) via barcode scan

12:47:11
Barcode 201119439891 scanned → app searches for SKU 01119 → fetches product variants

12:47:14
Extension calls cart.addLineItem(48264184791265) - second weighed item, $39.89

12:47:16
Extension itself fails: "Failed to find line item with variant ID: 48264184791265"

12:47:20
User navigates to checkout → PrepareCheckoutErrorView shows NegotiationError = "Couldn't load checkout"

12:49:00
Explicit server confirmation: InvalidVariantId: Product variant not found. for lineItemIndex=1

Thanks @derrick, I appreciate you flagging this. If you’re open to sharing a list of the affected merchants, and the general timeframe when this popped up, I can take a further look into this on our end for sure.

Just clarifying that due to the way POS works as we chatted about in the DM, it is expected this can sometimes happen, but if you’re seeing a high frequency of these like you mentioned there it’s definitely something I’m happy to look into for you. Feel free to DM me that info, or ping me here.