Issue with useSavedProductsActions

Hi guys. I’m trying to use this hook in development mode right now. I’m already sending everything correctly, but I keep getting this error. What could be causing it?

Screenshot 2025-12-09 at 9.41.04 am

Hey! Can you supply more info so we can try to reproduce this please? See the template here: Shop Minis Support Template - Required for all issue reports

1 Like

Yes

@shopify/shop-minis-react@0.4.17
react@18.2.0
react-dom@18.2.0
lucide-react@0.513.0
Iphone 16 pro
macOS 15.4.1 Xcode Emulator

Issue
What’s broken: When trying to add a product to favorites using the useSavedProductsActions hook, I receive the error “There was an error adding the saved item.”

Expected behavior:
The product should be successfully added to the list of saved (favorite) items without any errors.

Actual behavior:
The product is not added to the favorites list, and the error message “There was an error adding the saved item” is displayed, even though the data is being sent correctly.

Error message:

There was an error adding the saved item

Code example:

  const onSaveProduct = (product: Product) => {
    saveProduct({
      productId: product.id,
      productVariantId: product.defaultVariantId,
      shopId: product.shop.id
    }); 
  }

   <div className="grid grid-cols-2 gap-4 pb-4 pr-4 pl-4">
      {productRow.map((product) => (
        <ProductCard key={product.id} product={product} />
        <ProductCard key={product.id} product={product} onFavoriteToggled={() =>  onSaveProduct(product)}/>
      ))}
    </div>

Manifiest

Reproduction steps:

  1. Attempt to add any product to favorites using the useSavedProductsActions hook.

  2. Confirm that all required data is sent correctly in the request.

  3. Observe the returned error message: “There was an error adding the saved item.”

Hey thanks for the details!

Did you restart the development server after editing the manifest file?

If so can you open the developer tools to see what the full error is in the console?

I don’t receive any errors in the Safari console, only that alert.

I just verified this works for me - is it possible you are not logged in to Shop? Could you try to create a new mini in a different directory (npm init @shopify/shop-mini@latest) and running that? The default template has working favoriting. If it’s still not working could you try starting fresh and do a short screen record so I can maybe see the issue better?