Something went wrong. Please check your cart or try again.

Topic summary

Issue: A Shopify POS UI extension shows the error banner “Something went wrong. Please check your cart or try again.” whenever the extension subscribes to cart changes.

Context:

  • Building with Shopify POS UI Extensions (2024-10), using React hooks: useApi and useCartSubscription.
  • useCartSubscription is intended (per docs) to handle the single-subscription-per-cart limitation of api.cart.
  • Minimal example provided: when the cart subscription is active, the POS app surfaces the error; removing the subscription eliminates it.

Observed behavior:

  • Error appears immediately upon subscribing to the cart.
  • After the extension modifies the cart, viewing the cart in the Shopify POS app also triggers the same error banner.

Ask/Status:

  • Seeking guidance on how to prevent the error when using useCartSubscription.
  • No resolution yet; root cause not identified in the thread.
Summarized with AI on December 15. AI used: gpt-5.

I am building a Shopify POS UI extension and I am updating the cart, and also reacting to cart updates. I am using the useCartSubscription hook, which by following the documentation should handle the 1 subscription per cart limitation of the api.cart hook.

import { useApi, useCartSubscription } from "@shopify/ui-extensions-react/point-of-sale";
export default function MyModal() {
  const api = useApi<"pos.home.modal.render">();
  const cart = useCartSubscription();

  // Do stuff

  return (/*stuff*/);
}

If I remove the cart subscription part, the error does not appear. But once I make a cart subscription, the extension gets that error banner.

Also, if I change the cart in my extension, then check the cart in the Shopify POS App, the same error banner appears.

What can I do about it?