500 Error on Shopify Graphql - Buy One Get One Discount breaks cart

Topic summary

A critical bug occurs when using Shopify’s Buy One Get One (BOGO) discount with the GraphQL API and JS Buy SDK. When products included in a BOGO promotion are added to the cart multiple times, users encounter a 500 Internal Server error when attempting to remove line items.

Key Technical Details:

  • The error occurs specifically with line items involved in BOGO discounts
  • Same variant items split into multiple line items in the cart
  • Error message: “Internal error. Looks like something went wrong on our end”
  • A minimum reproducible example using Shopify’s own code has been provided on GitHub

Current Status:

  • Issue reported on both this forum and Shopify’s JS Buy SDK GitHub (issue #926) with no response for several days
  • Shopify support has been redirecting to “third party theme developers” despite the issue being reproducible with Shopify’s official code
  • ShopifyDevSup acknowledged the issue and escalated it internally to determine if it’s related to a Shopify component rather than the SDK
  • Multiple users confirmed experiencing the same problem
  • One user noted this wasn’t an issue a few days ago, suggesting a recent production change may have caused it

Resolution: Ongoing investigation, no fix yet.

Summarized with AI on November 25. AI used: claude-sonnet-4-5-20250929.

Describe the bug
Shopify Buy One Get One discount breaks cart functionality.

The following instructions are based off of this minimum reproducible example which uses Shopify’s own code! Here is a Loom video which demonstrates the issue

Steps to reproduce:

  1. Create a collection listing all products example
  2. Create a Buy One Get One Discount example
  3. Using this example code in react-js-buy folder, add a product that is part of the Buy One Get One discount (eg “Foundations in MDMA Safety, Therapeutic Applications & Research”) to cart multiple times

Expected:

Cart should show line items with quantity.

You should be able to add or remove the line items from cart.

Actual:

Strange presentation in the cart with same variant split into multiple line items.

You’re unable to remove line items from the cart which are involved in the BOGO discount. 500 error from the graphql endpoint for example:

index.js:4078 Uncaught (in promise) Error: [{"message":"Internal error. Looks like something went wrong on our end.\nRequest ID: 9ef6a61e-3635-4426-b263-b7c59582e46f (include this in support requests).","extensions":{"code":"INTERNAL_SERVER_ERROR","requestId":"9ef6a61e-3635-4426-b263-b7c59582e46f"}}]

Code Example:
Here is a minimum reproducible example code based off of the storefront-api-examples repo

Video Example:
Here is a Loom video which demonstrates the issue

This issue is also open on Shopify Buy github https://github.com/Shopify/js-buy-sdk/issues/926

1 Like

I keep getting told by Shopify support to “contact the third party theme developer” which is really annoying because I’ve put in the time to reproduce the issue with Shopify’s own code!!!

1 Like

I’ve also opened this issue on Shopify Buy github, no response there for days https://github.com/Shopify/js-buy-sdk/issues/926

1 Like

Same issue

Hey @shawngrona and @whitesunset - thanks for getting in touch and for opening up that Github issue in the JS Buy SDK repo. That’s usually the best way forward to get issues related to specific libraries/dev tools looked at, but I’ve also raised this internally on my end in case it is related to something within a Shopify component rather than the Buy SDK. I can’t guarantee a direct response through the forums, but I did want to touch base to let you know that we are looking into this.

I wanted to chime in to mention that we are seeing this issue when trying to remove the last line item from the cart using the shopify-buy SDK as well. Hopefully this issue is resolved. It wasn’t an issue a few days ago. Maybe something was pushed to production that isn’t playing nice with the buy SDK?

2 Likes