Shopify POS Cart Removing Lineitem Properties Automatically!

Did anyone face the unexpected lineitem properties disappearing from the POS cart after adding the properties through the cart API from our app?
Note: This is happening to some specific stores.

Using node v20.3.1, shopify cli 3.45.1

Here is a sample code of how we are adding the properties to custom line item:

var lineItemPayload = {
   price: 20,
   quantity: 1,
   title: 'Bab Low - Blue Jay',
   properties: [{ name: 'test', value: 'random properties' }]
}

var unsubscriber = cart.subscribe(Cart.Action.UPDATE, function (payload) {
   console.log('[Client] addLineItem', payload);
   unsubscriber();
});
cart.dispatch(Cart.Action.ADD_LINE_ITEM, {
   data: lineItemPayload
});

Hi SADIK112,

This seems like this issue might be related to the specific stores rather than your code. The code you provided seems correct and should work as expected.

Here are a few things can check to troubleshoot this issue:

  1. Store Settings: Check if there are any unique settings or configurations in the stores where this issue is occurring.

  2. App Permissions: Make sure your app has the necessary permissions to modify the cart and line item properties.

  3. Conflicting Apps: Check if there are any other apps installed in those stores that could be interfering with your app’s functionality. For example, if another app also modifies the cart or line item properties, it might be overriding the changes made by your app.

  4. App Bridge Version: Ensure that you are using a compatible version of Shopify’s App Bridge.

I’d recommend troubleshooting the above points, but if the issue persists, you could reach out to Shopify’s developer support directly for further assistance.

hey there thanks for the reply. we checked the suggested points:

  1. can you elaborate this one a bit. what can we check
  2. the app has necessary permission to modify the cart
  3. we removed all other apps from the store and tried still no luck
  4. currently we are using “@shopify/app-bridge”: “^3.1.0” which is a compatible version