Our hydrogen storefront has a bug that happens randomly, sometimes when the user adds an item to the cart it gets added then removed. looking at the network requests i have been able to confirm that on add to cart one successful POST request goes through, then multiple GET requests are made. the first GET request after the POST request fails, the second returns the cart with the added item, but then any subsequent GET requests show that the item is no longer in the cart. All GET requests and the POST request show that the cart ID and checkout ID never changes. At a glance this seems like it could be a cacheing issue, but we don’t cache the cart, and the change happens between API requests none of which modifies the cart except for the initial add to cart POST request.
Note: The item has enough inventory that it should not be an inventory reservation issue. Its also not a delivery coverage issue nor a selling plan rule.
x-request-id’s:
post request (item added):
4567a9ab-d771-4f4e-8cb3-1fe5b7358bf6-1754491832
successful get request right after the post (item in cart):
41c782c7-a55a-4841-8dc5-5ff9e5a5c1f2-1754491833
get request after that is missing the product (item missing from cart):
e0d87cae-2a45-4260-91c8-36ec9ac2dde1-1754491834