cli: [Bug]: `shopify theme dev` is losing track of the development theme
In which of these areas are you experiencing a problem?
Theme
Expected behavior
When users run shopify theme dev, a development theme should be created and assign as [yours] (your development theme should never be re-assigned).
Actual behavior
When users run shopify theme dev, the development theme seems to be re-assigned and in some contexts the CLI is election even non-development themes.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 14
- Comments: 17 (5 by maintainers)
Here’s how I’m working around it:
Find your development theme in the list
Run
shopify theme devand it should use a new development theme instead of the live theme.Agree this whole issue has been a pain in the a**. Shopify pushed a new CLI update today which now shows a new warning:
👋 Hey @tpage99, thanks a lot for sharing the video and the request IDs. We’ve been able to reproduce a scenario similar to the one you shared, and we’ve changed how
shopify theme devselects the correct theme to handle that scenario.Could you please retry using the most recent version of Shopify CLI (
3.65)? With that change, you should no longer face that issue.I’m going to wait for your feedback before closing this one, because while I was able to reproduce a similar problem, I can’t reproduce using the exact same steps since I can’t use your store.
Thank you for reporting this.
@lukeh-shopify definitely still an issue. Deleting the dev theme and starting fresh seems to fix it for a while at least.
Shopify CLI Version 3.64.1
CLI Output
Video https://vimeo.com/990591560/197aae9229
Thanks @karreiro! This looks to have been resolved, or at least initially here pulling in and working on a handful of themes across different shops I’m not getting the issue.
Seems to be working as intended! Thanks so much for working on this 🙏
@lukeh-shopify the issue will kick in after making a change to the theme and refreshing. there are loads of reproductions and logs in this thread.
also worth nothing it tends to show up randomly after a dev theme has been around for a bit - like, day two of a new theme build, I’ll pull up the project to start working on it and the bug will appear again. next time it happens I’ll screen record
I’m curious if you & the rest of the team at Shopify are testing this from a special shopify staff account, or if you’ve tried to reproduce in a regular vanilla partner account. last time this bug came up Shopify staff had a really hard time reproducing it even though thousands of partners were affected.
also not that it should matter, but I’m on the most recent version of the CLI with node 20. unix terminal
seeing this issue again with version 3.64.1 and 3.64 @karreiro
step 1: shopify theme dev step 2: click 192…ip preview step 3: refresh step 4: surprise! it’s the live theme
Thank you, everyone, for reporting this problem and providing details.
This issue has been fixed by https://github.com/Shopify/cli/pull/3809, so upgrading to the latest release (3.59.2) fixes this problem.