cli: [Bug]: Theme ID mismatch

Please confirm that you have:

  • 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.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Theme

Expected behavior

When I run theme dev and follow the preview URL (http://127.0.0.1:9292), I expect to preview my development theme locally and for the CLI process to not exit.

Actual behavior

CLI exits after following error:

Theme ID mismatch: expected 172567462195 but got 173749109043. 
[0] │  Request ID: 7f690ce7-9d82-4419-9777-9a26e7efeb24-1733758184
[0] │  URL: REDACTED 
[0] │                                                                              
[0] │  This is likely related to an issue in upstream Shopify APIs. 
[0] │  Please try again in a few minutes and report this issue: 
[0] │  https://github.com/Shopify/cli/issues/new?template=bug-report.yml   

Note this doesn’t happen using the full preview URL, only the local URL.

Verbose output

Verbose output
2024-12-10T14:15:18.228Z: 
Running system process:
· Command: npm prefix
· Working directory: /Users/marianne/Downloads/dawn-main 4

2024-12-10T14:15:18.339Z: Obtaining the dependency manager in directory /Users/marianne/Downloads/dawn-main 4...
2024-12-10T14:15:18.563Z: Request to https://ultrafine-codepen.myshopify.com/admin/api/unstable/themes/139056316590/assets/bulk.json completed in 380 ms
With response headers:
- content-type: application/json; charset=utf-8
- server-timing: processing;dur=153, cfRequestDuration;dur=358.000040, ipv6
- x-request-id: 0f60fc01-e31b-4796-a9fd-c4cccfb745b4-1733840118
  
2024-12-10T14:15:18.563Z: File Upload Results:
-sections/header-group.json: success
2024-12-10T14:15:18.563Z: Uploading the following files:
-templates/404.json
-templates/article.json
-templates/cart.json
-templates/password.json
-templates/product.json
-templates/customers/account.json
-templates/customers/activate_account.json
-templates/customers/addresses.json
-templates/customers/order.json
-templates/customers/register.json
2024-12-10T14:15:18.564Z: Uploading the following files:
-templates/customers/reset_password.json
-templates/customers/login.json
2024-12-10T14:15:18.640Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 204 ms
With response headers:
- x-request-id: fcfd6bc2-f0ca-40be-af4c-7fa72863660e
  
2024-12-10T14:15:18.640Z: Analytics event sent: {
"command": "theme dev",
"time_start": 1733840114909,
"time_end": 1733840118224,
"total_time": 3315,
"success": true,
"cli_version": "3.70.0",
"ruby_version": "",
"node_version": "22.12.0",
"is_employee": false,
"uname": "darwin arm64",
"env_ci": false,
"env_plugin_installed_any_custom": false,
"env_plugin_installed_shopify": "[\"@shopify/cli\"]",
"env_shell": "zsh",
"env_device_id": "5adba125250ffb656acf6734e3c045ce9e33d646",
"env_cloud": "localhost",
"env_package_manager": "unknown",
"env_is_global": true,
"env_auth_method": "device_auth",
"cmd_app_warning_api_key_deprecation_displayed": false,
"cmd_all_timing_network_ms": 3139,
"cmd_all_timing_prompts_ms": 0,
"cmd_all_launcher": "unknown",
"cmd_all_topic": "theme",
"cmd_all_plugin": "@shopify/theme",
"cmd_all_force": false,
"cmd_all_verbose": true,
"cmd_all_path_override": true,
"cmd_all_path_override_hash": "39d54f2ef5770121a6b1608021ed33d2b4bc617d",
"cmd_all_last_graphql_request_id": "7e945e2a-d62d-4be9-b16f-c80058587279-1733840117",
"cmd_all_timing_active_ms": 175,
"cmd_all_exit": "ok",
"user_id": "f2c7e177-175b-464e-8234-0f4d94628b70",
"args": "--store ultrafine-codepen --verbose",
"env_plugin_installed_all": "[\"@shopify/cli\"]",
"metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2024-12-10T14:15:18.640Z: Completed command theme dev
2024-12-10T14:15:19.232Z: Request to https://ultrafine-codepen.myshopify.com/admin/api/unstable/themes/139056316590/assets/bulk.json completed in 668 ms
With response headers:
- content-type: application/json; charset=utf-8
- server-timing: processing;dur=365, cfRequestDuration;dur=555.999756, ipv6
- x-request-id: 1a503c05-2868-498e-a706-9812f04e2518-1733840118
  
2024-12-10T14:15:19.234Z: File Upload Results:
-templates/customers/reset_password.json: success
-templates/customers/login.json: success
2024-12-10T14:15:20.388Z: Request to https://ultrafine-codepen.myshopify.com/admin/api/unstable/themes/139056316590/assets/bulk.json completed in 1824 ms
With response headers:
- content-type: application/json; charset=utf-8
- server-timing: processing;dur=1511, cfRequestDuration;dur=1805.999994, ipv6
- x-request-id: fe1ca2a2-e279-4898-b062-bb01914aa2cf-1733840118
  
2024-12-10T14:15:20.389Z: File Upload Results:
-templates/404.json: success
-templates/article.json: success
-templates/cart.json: success
-templates/password.json: success
-templates/product.json: success
-templates/customers/account.json: success
-templates/customers/activate_account.json: success
-templates/customers/addresses.json: success
-templates/customers/order.json: success
-templates/customers/register.json: success
2024-12-10T14:15:20.391Z: Files to be deleted:

2024-12-10T14:15:35.728Z: → Rendering https://ultrafine-codepen.myshopify.com/?_fd=0&pb=0 (with )...
2024-12-10T14:15:36.135Z: Request to https://ultrafine-codepen.myshopify.com/?_fd=0&pb=0 completed in 406 ms
With response headers:
- content-type: text/html; charset=utf-8
- etag: "cacheable:e569a60cd343b1511164f23d6115a9b2"
- server-timing: processing;dur=248;desc="gc:14", db;dur=64, db_async;dur=1.586, edge_cart;dur=8.27;desc="trips=1", render;dur=68, asn;desc="12353", edge;desc="LIS", country;desc="PT", theme;desc="136432025774", pageType;desc="index", servedBy;desc="7mlc", requestID;desc="db042b07-5996-4422-9c59-79399c300c2d-1733840135", cfRequestDuration;dur=336.000204, ipv6
- x-request-id: db042b07-5996-4422-9c59-79399c300c2d-1733840135
  
2024-12-10T14:15:36.135Z: ← 200 (request_id: db042b07-5996-4422-9c59-79399c300c2d-1733840135)
• 14:15:36 Request »    GET 200 / 336ms
╭─ error ──────────────────────────────────────────────────────────────────────────────╮
│                                                                                      │
│  Theme ID mismatch: expected 139056316590 but got 136432025774.                      │
│  Request ID: db042b07-5996-4422-9c59-79399c300c2d-1733840135                         │
│  URL: https://ultrafine-codepen.myshopify.com/?_fd=0&pb=0                            │
│                                                                                      │
│  This is likely related to an issue in upstream Shopify APIs.                        │
│  Please try again in a few minutes and report this issue:                            │
│  https://github.com/Shopify/cli/issues/new?template=bug-report.yml     

Reproduction steps

  1. Run shopify theme dev
  2. Follow local preview link
  3. Notice error in terminal

Operating System

macOS 14.6.1

Shopify CLI version (shopify --version)

@shopify/cli/3.71.4

Shell

zsh

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

v20.9.0

What language and version are you using in your application?

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (6 by maintainers)

Most upvoted comments

I still encounter this issue. I’m on version 3.76.2 and still can’t dev on http://127.0.0.1:9292

I’ve just managed to get localhost working on the latest CLI version. I followed a bunch of steps but looking at them now I think what fixed it was installing an older version (3.63.0) before reinstalling more recent versions up until the latest one.

Here are the full steps just in case they hold any clues:

  1. The first command I ran was rm -rf ~/.shopify-app-cli/ just in case (from the 2.x migration guide)
  2. Then npm uninstall -g @shopify/cli
  3. Then I installed the latest version of the CLI again (npm install -g @shopify/cli@latest) and it still wasn’t working
  4. Figured I should try older versions so I ran npm install -g @shopify@3.63.0 and saw that localhost was now working
  5. I then installed various versions (3.67.0, 3.69.3) until I realised even 3.70.0 was working this time, and then even the latest version was working

Same, actually I can’t use the CLI at all for a while now. For some reasons the CLI is requesting urls I don’t even navigate too (could be an app), such as GET 200 /a/pwa/[myshopifyurl]/manifest 576ms and then I get the Theme ID mismatch. Before I used to be able to restart the command process, but now everytime it breaks.