cli icon indicating copy to clipboard operation
cli copied to clipboard

[Bug]: `/cart/add` 404ing in local development

Open fergus-haywood opened this issue 7 months ago • 8 comments

Please confirm that you have:

  • [x] Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • [x] Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Other

Expected behavior

When adding a variant to the cart, the cart should be updated to include the new item

Actual behavior

When adding an variant to the cart, the CLI is showing a 404 error for the /cart/add endpoint.

Verbose output

Verbose output
• 09:19:58 Request »    GET 404 /cart/add/41431326228614 554ms

Reproduction steps

  1. Launch the CLI with shopify theme dev
  2. Try to add a variant to the cart manually by entering http://127.0.0.1:9292/cart/add/{{ variant_id}}

Operating System

Mac OS Sequoia 15.3.2

Shopify CLI version (shopify --version)

3.79.0

Shell

zsh

Node version (run node -v if you're not sure)

v23.11.0

What language and version are you using in your application?

Shopify Liquid

fergus-haywood avatar May 05 '25 21:05 fergus-haywood

Encountering the same issue on our local env with Shopify CLI

Image

pietervandendungen avatar May 06 '25 13:05 pietervandendungen

Same error for me with Shopify CLI v3.79.0

vfcoding avatar May 07 '25 09:05 vfcoding

I confirm, I have this issue too.

MaxDesignFR avatar May 07 '25 11:05 MaxDesignFR

Same here. cart/update.js isn't working either.

Teunel avatar May 07 '25 11:05 Teunel

Same here CLI version 3.79.1

ceri-waterscreative avatar May 08 '25 11:05 ceri-waterscreative

Same here on v3.78.1.

Nothing showing with --verbose as well.

stijns96 avatar May 08 '25 12:05 stijns96

Same problem with version 3.79.0.

The only temporary fix I've found is to delete all cookies on 127.0.0.1. 🤷‍♂️

msev avatar May 09 '25 07:05 msev

Same problem with version 3.79.0.

The only temporary fix I've found is to delete all cookies on 127.0.0.1. 🤷‍♂️

Smashing, thanks. Worked fine here on CLI version 3.79.0

jahlbom avatar May 09 '25 13:05 jahlbom

Following this topic - also happening here.

procarrera avatar May 13 '25 21:05 procarrera

Same here!

NerdieIrina avatar May 14 '25 12:05 NerdieIrina

Same here

jo-elbdev avatar May 15 '25 12:05 jo-elbdev

Same here

tr-elbdev avatar May 15 '25 12:05 tr-elbdev

Same issue here — just following this thread.

I’m not using Shopify CLI for local development, I run a regular Shopify store in production. We’re experiencing the same /cart/add.js and cart/update.js ,404 error, even for new visitors.

veno-02 avatar May 15 '25 16:05 veno-02

Just tried out with CLI v3.38.0, issue is still there

djordje-st avatar May 19 '25 13:05 djordje-st

It seems to work on v3.80.4 🎊

vfcoding avatar May 21 '25 15:05 vfcoding

I just tested on v3.81.2 and this appears to be fixed. If it's still an issue let us know!

graygilmore avatar Jun 23 '25 23:06 graygilmore