Theme ID Mismatch

Weirdly this problem has started for me nowโ€ฆupdated shopify cli to the latest version too.

Request ID: 9a574d2d-e445-4308-817b-adc979ed6014-1781109109

shopify --version
@shopify/cli/4.1.0 wsl-x64 node-v24.16.0

Iโ€™m also starting to see this again! CLI boots up fine, then as soon as you hit the local host, it just errors out

Cli version 4.1.0

Request ID: a3f82979-bea1-4895-96c0-bf42fc3782dd-1781181630

Just started encountering this. Unfortunately the โ€œlogout/loginโ€ solution that worked for someone else is not working for me.

If youโ€™re encountering the issue please try Joshโ€™s snapshot to see if that fixes the issue Theme ID Mismatch - #19 by Josh-Shopify

I have tried installing this package. I do not see the theme mismatch error anymore but I am getting 502 and 302 errors now.

Description

When running shopify theme dev, the local development server starts up normally. However, after serving the first few requests, the CLI throws a fatal Theme ID mismatch error and crashes the proxy session.

This issue persists on a completely clean machine environment across multiple package manager isolation attempts. It appears that the Shopify Storefront Renderer / Upstream APIs fail to carry forward the preview_theme_id context parameter on subsequent internal requests, causing the server-timing headers to drop back to the live theme ID, triggering the CLI safeguard crash.


Environment

  • Operating System: macOS (Apple Silicon / arm64)
  • Shopify CLI Version: 4.2.0 (Verified clean install via NVM global path)
  • Node.js Version: v24.13.1
  • Shell: zsh
  • Package Manager Active Binary: /Users/rafi/.nvm/versions/node/v24.13.1/bin/shopify

Steps to Reproduce

  1. Navigate to the root directory of a valid Shopify theme.
  2. Ensure you are authenticated to the store:
    shopify theme dev --store marionskitchenshopau.myshopify.com
  3. The local proxy loads correctly at http://127.0.0.1:9292.
  4. After 4 to 6 successful root requests (GET 200 /), the server crashes instantly.

Actual Behavior

The CLI logs initial successful traffic and then yields this specific API conflict:

โ€ข 13:28:56 Request ยป    GET 200 / 
โ€ข 13:28:57 Request ยป    GET 200 / 
โ€ข 13:28:58 Request ยป    GET 200 / 
โ€ข 13:28:58 Request ยป    GET 200 / 
โ€ข 13:28:59 Request ยป    GET 200 / 
โ€ข 13:28:59 Request ยป    GET 200 / 
โ•ญโ”€ error โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                                              โ”‚
โ”‚  Theme ID mismatch: expected 160488095993 but got 159878971641.              โ”‚
โ”‚  Request ID: 20f71b0c-fc9b-4a14-a401-d7110adafeed-1781677739                  โ”‚
โ”‚  URL:                                                                        โ”‚
โ”‚  This is likely related to an issue in upstream Shopify APIs.                โ”‚
โ”‚  Please try again in a few minutes and report this issue:                    โ”‚
โ”‚  [https://community.shopify.dev/c/shopify-cli-libraries/14](https://community.shopify.dev/c/shopify-cli-libraries/14)                    โ”‚
โ”‚                                                                              โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Hey everyone,

Just a quick update for anyone still stuck on this! I reached out over on the Shopify CLI GitHub repository, and one of the Shopify contributors (@EvilGenius13) was able to apply a quick internal fix directly for my shop.

I just tested it on my end, and local development is working perfectly againโ€”no more Theme ID mismatch errors or server crashes. :rocket:

If you are still experiencing this issue, I highly recommend chiming in on the GitHub thread so they can take a look at your specific store as well.

Here is the link to the relevant comment: https://github.com/Shopify/cli/issues/7344#issuecomment-4745474859

Hope this helps get you all unblocked!

We ran at this issue today too. No luck dealing with it. Shopify CLI v 4.5.0

Do you have a request ID you can share with us so we can investigate further?