-
Notifications
You must be signed in to change notification settings - Fork 130
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]: Shopify CLI keeps refreshing when theme-editor-sync = true #3222
Comments
Trying to solve this issue, I made a clean installation of my dev environment with all the latest versions of everything. The issue still persists for this specific merchant. Ubuntu 22.04 There's nothing special within their |
I'm facing the identical issue with the following:
|
Same issue on Apple M1, MacOS 14.2.1 since Shopify CLI version 3.52.0 |
@ahmedbm27 @iPhenan I found a temporary bandaid, if the issue is related to a single file like me. You can add flag ignore = ["templates/index.json"] (or whatever file is problematic) and you'll be able to use customizer sync again (except the ignored file) |
I recently had this within the team. For us it was Unicode hiding in plain sight. A U+2028 LINE SEPARATOR character got inserted when copying multiline text from, e.g., Figma, into a single-line text box in the theme editor. Getting rid of the extra 'invisible' Unicode characters causes the loop to stop for us. The loop also happens if U+2028 is inserted unescaped. It won't show up in VS Code, however on opening the file for the first time you should get prompted to ignore or remove the LS/PS characters. |
@StanAngeloff |
@StanAngeloff Nice catch! Same issue here, I'd have never seen it otherwise. Thanks! Shopify Team, still feel like this is a bug that should be fixed, as it's fairly common to copy/paste text from Figma. Maybe through an error message like the ones thrown when invalid schema is detected during a dev session? |
it worked 🎉🎉 Thanks aloooot |
@StanAngeloff I love you. Definitely would not have found that and this was driving me mad. And I agree with @jpallard6120 -- an error message would be great otherwise there's no way to know what's happening. |
Worked for me thank you for the fix @StanAngeloff |
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. P.S. You can learn more about why we stale issues here. |
@shopify-admins I feel this still warrants a bug fix! |
Just ran into this issue too |
Also having this issue |
Facing the exact same issue and don't have any unicode chars in my files. |
Having this as well, should definitely be fixed. |
A temporary solution I found when this happens is to empty the file that is stuck in an infinite loop (copy to clipboard) => save file => paste the file content => save. |
Still facing issues with this also. Although MaxDesignFR's temporary fix seems to do the job. Any news on a permanent solution from the Shopify team? |
👋 Hey everyone, If you're still facing this issue, could you please share your Thanks a lot for reporting! |
@karreiro Here's my verbose log (is this what you meant?) The reload loop is caused by these unicode characters in |
I'm having this issue too:
If I open settings_schema.json I can see there's an error due to a missing label on a font_picker, but if I add the label field back in it will still fetch the broken schema file from the server and then start the infinite loop again. Edit: Tried deleting the remote theme (
The fix in the end was to add a trailing comma to my settings_schema.json file, as pointed out by @visnaut and also here: #4107 (comment) |
Had same exact issue with settings_schema.json and confirming only adding the trailing comma fixed it.
|
get this issue still too, only since the latest CLI update though |
I updated shopify CLI to version
Currently, I have to
|
Can confirm I get this also - constantly get/update of settings_schema.json. The temp. fix of cutting the contents, saving, pasting and then resaving works but only for that CLI session. Really a shame that CLI has seen a decrease in quality over these past updates. |
You just need to add a trailing comma as someone suggested already here. it's part of shopify's comment in json thing |
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. Just "add a trailing comma" is not really a solution when so many tools these days do things to help ensure standards are being followed. |
100% agree. It's ok saying this but it's not fixing what is clearly the wider issue. @karreiro is there any update from the team on this? It's been marked as Prioritized but with what seems to be no progress made. |
The same scenario occurred with us, involving three computers at our office. The "trailing comma" fix worked well on "settings_schema.json," but not for "assets/manifest.json," which we were forced to delete to continue development with the live editor sync enabled. Let me know if we can help. |
Same issue here with settings schema. Adding comma fixes the issue for us too |
Appreciate your input here - thanks for actioning this in your latest PR. What version should we look out for and how long before we should expect this to be merged? |
👋 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! |
@karreiro Issue seems to be fixed for settings_schema.json for me! Thanks! I have one store still stuck in a loop, but it's due to an app file, so it might not be relevant for Shopify CLI. Sharing the verbose logs just in case:
|
Still waiting for the update via Brew @karreiro. @jpallard6120 seems you're not the only one - happening for my collegue on Windows with the CLI updated to the new version: |
Thank you for sharing that scenario, @jpallard6120! I can reproduce that, and it seems to be a different but related issue. We may expect that to be fixed in the next CLI release. Thank you for sharing this scenario as well, @rcasimmons! Could you please share the full |
Thanks @karreiro! I'll get him to reply with his verbose log on here. In the meantime, I'm still unable to upgrade my CLI via Homebrew. Has the package been released yet onto here? |
@karreiro I am @rcasimmons colleague that is still experiencing a loop post-update, using WSL. Here are my verbose logs.
|
👋 Hey @RCA-JC, Thank you for sharing the logs! For the Regarding the Thanks again for sharing those logs! :) |
This solution did solve my problem. |
I'm getting the same issue, this is on a freshly installed Dawn 15.2.0! Image |
Doesn't look like you're using 3.68.1 - can you share your output from |
I've just updated to the latest version 3.68.1. However, I'm still getting the same error. |
Hmm, this is odd. Have you checked your template files for \u2028? |
👋 Hey @Topenze, Could you please run the command with the Thanks a lot! |
The issue seems to have stopped. However, every time I run theme dev, I get this Reconciliation strategy prompt, I've deleted the development theme and also ran the logout command but I still always get this prompt, how do I prevent this please? |
Please confirm that you have:
In which of these areas are you experiencing a problem?
Theme
Expected behavior
Running
shopify theme dev --theme-editor-sync
should start the live-preview server, and update code within the dev customizer in both directions.Actual behavior
Despite having the same
templates/index.json
file locally and on the development theme, a choice appears:Verbose output
Whatever choice is used, the live-preview gets stuck in an infinite get/update loop:
and so on
Reproduction steps
This happens on a specific store, but not on others. Will be hard to reproduce on a different store, as I don't know the cause of the issue.
Operating System
Ubuntu 20.04
Shopify CLI version (check your project's
package.json
if you're not sure)@shopify/cli/3.53.0
Shell
bash
Node version (run
node -v
if you're not sure)node-v18.19.0
What language and version are you using in your application?
No response
The text was updated successfully, but these errors were encountered: