cli: [Bug]: `shopify theme dev` preview shows live theme
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
As recently as Friday (2023-08-11) I was working locally on theme development using shopify theme dev
, previewing changes locally and making content updates to the remote dev theme via the Theme Customizer.
Actual behavior
Upon starting work this morning, the local preview URL (http://127.0.0.1:9292
) shows the live theme of the test store I’m developing against, as does the preview link (https://<store-name>.myshopify.com/?preview_theme_id=<dev-theme-id>
).
However, the preview in the Theme Customizer (https://admin.shopify.com/store/<store-name>/themes/<dev-theme-id>/editor
) shows the correct development theme.
Reproduction steps
- Run
shopify theme dev
- Click the localhost preview link output by the CLI
- Observe that the preview shows the store’s live theme
- Open the theme customizer link output by the CLI
- Observe that the theme customizer correctly shows the dev theme
I’ve updated the CLI, cleared my cache, and deleted and recreated my development theme to no avail. Is there a known issue with this?
Thanks.
Operating System
macOS 12.6.7
Shopify CLI version (check your project’s package.json
if you’re not sure)
@shopify/cli/3.48.1 darwin-x64 node-v20.5.1
Shell
iTerm 2 + Bash
Node version (run node -v
if you’re not sure)
v16.19.0
What language and version are you using in your application?
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 2
- Comments: 22 (2 by maintainers)
I’m also having this issue two stores. Notably, it started after switching between stores using the --store flag. Preview URL works fine, but localhost (with hot reload) does not - it pulls the live theme.
@Eben-Hafkamp what URL parameter did you hit to get your localhost version to pull the development theme vs. the live theme?
Edited: Hitting 127.0.0.1:9292?preview_theme_id=YOUR_THEME_ID_HERE fix it for me. Thanks!
Experienced this bug. Had to manually copy the Theme ID from the terminal into the localhost window as a preview url parameter to get it to switch from Live.
Same issue here, I don`t see changes in local development, but on the theme editor, it looks fine. Looks like freezed on previous changes.
choksi215 try carolinerusso’s suggestion in the post just before yours: Hitting 127.0.0.1:9292?preview_theme_id=YOUR_THEME_ID_HERE
Doing the above solved the problem for me.
I have also been getting this problem since yesterday. Was completely fine before. I can view the local dev theme by getting a share preview link. Not been able to get hot reload since then either. This is happening with two separate stores.
👋 Hello everyone,
Indeed, we experienced some instability on the platform that impacted CLI features, causing the live theme to be previewed instead of the current development theme. However, this issue has been resolved, and the CLI should now be functioning as expected without any need for an upgrade.
Please, don’t hesitate to reopen this issue if you continue to encounter this problem.
Same here!