-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: --theme-editor-sync running infinite loop #4107
Comments
+1, same issue after updating to 3.62.0 |
Hi there 👋🏻 It probably has to due with the new trailing comma support. There are 2 solutions at the moment: This is always happening with the settings_schema.json . If you have this with another file, you most likely have an illegal unicode in your code. |
this got my Vite assets/manifest.json file too, same endless loop, trailing comma fixed :/ |
As a note, something really does need to be done about this, because most code editors these days do auto formatting of files, which does not support the trailing comma as its not part of the spec of JSON. This is causing a massive headache of having to manually copy files when making changes, rather than letting the CLI handle those changes |
👋 Hey everyone, Thank you for your input and all the details about this issue. We've released a new version of the Shopify CLI some minutes ago with the fix ( Thanks again for reporting! |
Thanks @karreiro 👏🏻 You the man! |
Oh no... @karreiro |
Thank you for sharing that, @lesterdefreitas! I've also noticed a similar scenario here. My original PR, unfortunately, missed a detail related to |
Ah, awesome, thanks dude! |
Oh sweet baby jesus.. Thank you guys! |
@karreiro this seems to have cropped back up with the latest release of CLI - both in the new and with --legacy flags. Has the team not incorporated this fix? |
Same here. We have some stores that are doing this across 100+ template files. It feels to me as though it's to do with the new JSON comments that are added to the top of the file? Perhaps one side is trying to add them and the other side is trying to remove them? Just a thought. |
Yeah that could be a plausible solution. The weird thing is that before 3.67.X everything was working as it should but you're right - I don't think it was fully addressed. Hopefully @karreiro can shed some light :) |
I feel like the CLI is getting worse and worse, unfortunately. Almost every release has a bug that breaks the entire CLI. If not at startup, then a minute later. Hot reload is sometimes executed multiple times and debugging is a hopeless task... I'm glad we finally don't have to use brew anymore, but the quality of the CLI really needs to go up. Also, developing for multistore is not yet fully optimised unfortunately |
Absolutely agree - the quality has really gone downhill - especially considering this is our only tool. |
I had the same issue with version Adding a comma to all JSON files solved my problem |
Yeah... what the heck? I just came back to my own codebase to make a small change and it is instantly going crazy, endlessly looping over json files. What gives? Video evidence: |
I too have this issue again. I got hundreds of json files going crazy. Impossible to use the CLI like that. It's been months and still no permanent fix was found, lame! Here is a node script I placed in a .app folder in my project to add the trailing commas at the end of every json files. Could be better but does the job, and why in the first place do we have to go through this again? Make sure you use git to check the local changes.
|
👋 Hey everyone, It seems like a platform change has impacted the original fix applied to this issue. If you're still facing the infinite loop in the most recent version of Shopify CLI, could you please share your
@rcasimmons, the Thank you, everyone, for the quick feedback. |
Thanks @karreiro but as I've outlined I can't use the newer cli version due to the issue I linked - is there a chance the fix can be ported to the legacy cli version because I'm sure there will be people using --legacy who would require this fix. |
Please confirm that you have:
In which of these areas are you experiencing a problem?
Theme
Expected behavior
Running
shopify theme dev --store --theme-editor-sync
should sync once on start.Actual behavior
Sync gets stuck in an infinite loop:
Verbose output
Reproduction steps
shopify theme dev --store --theme-editor-sync
Operating System
macOS Sonoma 14.5
Shopify CLI version
3.62.0
The text was updated successfully, but these errors were encountered: