I have reproduced the issue on the latest CLI version.
Yes, I am on the latest version
I have searched existing posts and this report is not a duplicate.
Yes, this isn’t a duplicate
In which of these areas are you experiencing a problem?
Theme
Expected behavior
Should have allowed reasonable rate.
Actual behavior
shop_events_listener-3da45d37.js:1 POST http://127.0.0.1:9292/cart/add.js 429 (Too Many Requests)
window2.fetch @ shop_events_listener-3da45d37.js:1
(anonymous) @ b3918e4e0wbf3ac3cepc5707306mb02b36c6m.js:1
(anonymous) @ liquid-ajax-cart.js:1
A @ liquid-ajax-cart.js:1
w @ liquid-ajax-cart.js:1
x @ liquid-ajax-cart.js:1
(anonymous) @ liquid-ajax-cart.js:1Understand this error
installHook.js:1 Liquid Ajax Cart: Error while performing cart Ajax request
overrideMethod @ installHook.js:1
(anonymous) @ liquid-ajax-cart.js:1
Promise.catch
(anonymous) @ liquid-ajax-cart.js:1
A @ liquid-ajax-cart.js:1
w @ liquid-ajax-cart.js:1
x @ liquid-ajax-cart.js:1
(anonymous) @ liquid-ajax-cart.js:1Understand this error
installHook.js:1 SyntaxError: Unexpected token ‘<’, "<!DOCTYPE "... is not valid JSON
overrideMethod @ installHook.js:1
(anonymous) @ liquid-ajax-cart.js:1
Promise.catch
(anonymous) @ liquid-ajax-cart.js:1
A @ liquid-ajax-cart.js:1
w @ liquid-ajax-cart.js:1
x @ liquid-ajax-cart.js:1
(anonymous) @ liquid-ajax-cart.js:1Understand this error
liquid-ajax-cart.js:1 Uncaught TypeError: Cannot read properties of null (reading 'body')
at HTMLDocument. (liquid-ajax-cart.js:1:20396)
at L (liquid-ajax-cart.js:1:3503)
at liquid-ajax-cart.js:1:3093
at
Reproduction steps
Just click add to cart a few times.
Verbose output
shop_events_listener-3da45d37.js:1 POST http://127.0.0.1:9292/cart/add.js 429 (Too Many Requests)
window2.fetch @ shop_events_listener-3da45d37.js:1
(anonymous) @ b3918e4e0wbf3ac3cepc5707306mb02b36c6m.js:1
(anonymous) @ liquid-ajax-cart.js:1
A @ liquid-ajax-cart.js:1
w @ liquid-ajax-cart.js:1
x @ liquid-ajax-cart.js:1
(anonymous) @ liquid-ajax-cart.js:1Understand this error
installHook.js:1 Liquid Ajax Cart: Error while performing cart Ajax request
overrideMethod @ installHook.js:1
(anonymous) @ liquid-ajax-cart.js:1
Promise.catch
(anonymous) @ liquid-ajax-cart.js:1
A @ liquid-ajax-cart.js:1
w @ liquid-ajax-cart.js:1
x @ liquid-ajax-cart.js:1
(anonymous) @ liquid-ajax-cart.js:1Understand this error
installHook.js:1 SyntaxError: Unexpected token ‘<’, "<!DOCTYPE "... is not valid JSON
overrideMethod @ installHook.js:1
(anonymous) @ liquid-ajax-cart.js:1
Promise.catch
(anonymous) @ liquid-ajax-cart.js:1
A @ liquid-ajax-cart.js:1
w @ liquid-ajax-cart.js:1
x @ liquid-ajax-cart.js:1
(anonymous) @ liquid-ajax-cart.js:1Understand this error
liquid-ajax-cart.js:1 Uncaught TypeError: Cannot read properties of null (reading 'body')
at HTMLDocument. (liquid-ajax-cart.js:1:20396)
at L (liquid-ajax-cart.js:1:3503)
at liquid-ajax-cart.js:1:3093
at
Operating system
Mac OS Tahoe
CLI version
3.88
Nodejs version
22.21.1
What language and version are you using in your application?
Node
I’m getting the same. Tried different CLI and Node versions with no success
Thanks for reviewing this.
Based on debugging, the issue appears to be local rate‑limiting on the Shopify CLI dev server , not Liquid Ajax Cart itself.
What’s happening
Multiple rapid /cart/add.js POST requests are triggered by repeated clicks.
The local dev server at http://127.0.0.1:9292 starts returning HTTP 429 .
When the 429 occurs, the response body is HTML (error page), not JSON.
liquid-ajax-cart.js expects JSON and fails with:
So the real failure chain is:
429 response (HTML)
→ JSON.parse fails
→ Ajax Cart crashes
Why this is unexpected
On production Shopify storefronts:
/cart/add.js tolerates rapid user interaction reasonably well
429 responses are rare and usually return JSON
This behavior only reproduces consistently on Shopify CLI local dev
Questions / clarification needed
Is the CLI dev server intentionally rate‑limiting /cart/* endpoints?
Is this rate limit configurable or documented anywhere?
Why does the CLI return HTML instead of JSON for /cart/add.js errors?
Is this behavior expected, or is it a regression in CLI 3.88?
Temporary workarounds (not ideal)
Debouncing add to cart clicks in JS
Adding manual retry / 429 handling in Ajax Cart
Slowing down interaction artificially during development
These workarounds hide the issue but don’t match real storefront behavior.
Suggested fixes
Any of the following would resolve the problem cleanly:
Relax rate‑limits for /cart/* routes in CLI dev
Return JSON error responses for /cart/add.js consistently
Document the rate‑limit so theme/app developers can account for it
Happy to test any proposed fix or provide a minimal reproduction repo if needed.
Thanks.
I mentioned this thread to the author of Liquid Ajax Cart, but I don’t think it’s that library that’s the problem. I’ve used it for years without ever experiencing 422. I think rate limits need to be laxed or returned to what they were before.
Hi all, thanks for reporting this!
We will be addressing this issue in this post:
@eytan-shopify
We’re experiencing widespread 429 errors with Cloudflare bot challenges on Cart API endpoints (/cart.js, /cart/add.js, /cart/change.js) across many stores.
After a short period of normal browsing, all cart requests start returning “Your connection needs to be verified”, fully breaking add‑to‑cart and checkout. This now affects read endpoints (/cart.js) as well, not just mutations. Storefront API calls continue to work.
Repro patterns:
VPN traffic (very common with real custo…
Please follow that post for updates.
When can we expect to see this resolved? It’s even worse today.
@James_Auble , we have relaxed the throttles slightly. Can you confirm if you’re seeing the issue being worse while running app dev or without it?
@Paige-Shopify This is still happening a lot…
Hi @Leo_Cheron , can you share more details of how you’re encountering this error a lot? Which CLI version are you using?
Hi, it becomes impossible to develop with Ajax functions on the cart with the CLI. All requests on http://127.0.0.1:9292/ result in an error 429. I’m using node v22.15.0 and shopify version 3.88.0. I tried the latest version of shopify CLI (3.91) but I had to rollback because in the latest version the checkout no longer works under development.
Thank you for finding a solution quickly.
@MCP_Webdesign thanks for reporting this to us. Can you share a request ID for any successful cart requests for the same cart in that session so we can investigate further?
Hi, what do you mean about request ID?
And now this message on page refresh : “Your connection needs to be verified before you can proceed” and 429 on page request!
This is literally becoming unusable. I can’t go longer than a minute before im seeing 429 and the “Your connection needs to be verified before you can proceed” message. There MUST be a way to be added to a safe list? we are a partner for christ sake, we’re building themes for clients to make you money and your dev tools are woeful.
Someone please sort this out!
Hello everyone, thank you for your patience and I appreciate anyone updating the thread if you’re having issues. For those of you that are, the biggest piece of information we can get from you are your verbose logs.
If you run theme dev –verbose we can use that information to help debug. If anyone having trouble is able to do this, you can email me the log directly at josh.faigan@shopify.com along with your store url you are testing on (my-store.myshopify.com).
1 Like
Failed to render section on Hot Reload with status 401 (Unauthorized).
Request ID: 8067c7da-79dd-4546-9db1-5646f2f1c7f5-1772956969
1 Like
I am seeing this issue now. I just emailed my log to @Josh-Shopify
Hi and thanks for your patience! I appreciate the logs and information. We have identified the root cause and are actively working on a fix. I will update here once we have it. We will also release a snap build to test out.
2 Likes