cli icon indicating copy to clipboard operation
cli copied to clipboard

[Bug]: Shopify CLI keeps refreshing when theme-editor-sync = true

Open jpallard6120 opened this issue 1 year ago • 19 comments

Please confirm that you have:

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

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:

The local file templates/index.json is different from the remote version in the development theme.
? What would you like to do? (Choose with ↑ ↓ ⏎, filter with 'f')
> 1. Keep the remote version
  2. Keep the local version
  3. Merge files (it may break the local file)
  4. Exit

Verbose output

Whatever choice is used, the live-preview gets stuck in an infinite get/update loop:

  • 11:13:25 Synced » get templates/index.json                                                                                                                                                               
  • 11:13:26 Synced » update templates/index.json                                                                                                                                                            
  • 11:13:29 Synced » get templates/index.json                                                                                                                                                               
  • 11:13:29 Synced » update templates/index.json
  • 11:13:32 Synced » get templates/index.json
  • 11:13:33 Synced » update templates/index.json
  • 11:13:36 Synced » get templates/index.json
  • 11:13:36 Synced » update templates/index.json

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

jpallard6120 avatar Jan 03 '24 16:01 jpallard6120