cli: [Bug]: Shopify theme dev returns published theme instead of development 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
http://127.0.0.1:9292/ should serve the development theme
Actual behavior
http://127.0.0.1:9292/ serves the published theme
Verbose output
stijn@MacBook-Air-van-Stijn theme % shopify theme dev --verbose
2024-02-22T09:11:45.194Z: Running command theme dev
shopify:theme:dev init version: @oclif/core@3.15.1 argv: [ '--verbose' ] +0ms
2024-02-22T09:11:45.208Z: Ensuring that the user is authenticated with the Theme API with the following scopes:
[]
2024-02-22T09:11:45.208Z: Ensuring that the user is authenticated with the Admin API with the following scopes for the store bosch-stage.myshopify.com:
[]
2024-02-22T09:11:45.208Z: Getting session store...
2024-02-22T09:11:45.210Z: Validating existing session against the scopes:
[
"openid",
"https://api.shopify.com/auth/shop.admin.graphql",
"https://api.shopify.com/auth/shop.admin.themes",
"https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
"https://api.shopify.com/auth/shop.storefront-renderer.devtools",
"https://api.shopify.com/auth/partners.app.cli.access",
"https://api.shopify.com/auth/destinations.readonly"
]
For applications:
{
"adminApi": {
"scopes": [],
"storeFqdn": "bosch-stage.myshopify.com"
}
}
2024-02-22T09:11:45.211Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2024-02-22T09:11:45.211Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:
- User-Agent: Shopify CLI; v=3.56.2
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-02-22T09:11:45.466Z: Request to https://accounts.shopify.com/oauth/introspection completed in 247 ms
With response headers:
- cache-control: no-cache, no-store, private, must-revalidate, max-age=0
- content-type: application/json; charset=utf-8
- etag: W/"067339d8532fd52b511584a198b85081"
- x-request-id: ffd95db2-818b-4955-a1e7-98d2da9fd13c
2024-02-22T09:11:45.470Z: The identity token is valid: true
2024-02-22T09:11:45.471Z:
The validation of the token for application/identity completed with the following results:
- It's expired: false
- It's invalid in identity: false
2024-02-22T09:11:45.471Z: The current session is valid but needs refresh. Refreshing...
2024-02-22T09:11:45.472Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=refresh_token&access_token=atkn_CjQIgJncrgYQoNHcrgZSJggBEhBBC67Yl69P2KyiWIYFsSN5GhB25X0ShMRBFq7145JA3ofXEkCbDXEELFag5nZF6ZTvJKiYb22G-tS-3Cf6iwyg144tVwyBehMou0ke7KC-X5_h7DsgMrKsk8J_N4_K-2wh53gG&refresh_token=atkn_CiEIgJncrgYQgLP6rwaiARIKEHblfRKExEEWrvXjkkDeh9cSQAaTpPU4jhUmPGqfMyVWQhj0Ct36MiXl7X4wuQ5Jm4KzPyKv5kZzXmI8POF0EE_l56Wb6tY4CQyaxDCL7C22iAk&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3
With request headers:
- User-Agent: Shopify CLI; v=3.56.2
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-02-22T09:11:45.739Z: Request to https://accounts.shopify.com/oauth/token?grant_type=refresh_token&access_token=atkn_CjQIgJncrgYQoNHcrgZSJggBEhBBC67Yl69P2KyiWIYFsSN5GhB25X0ShMRBFq7145JA3ofXEkCbDXEELFag5nZF6ZTvJKiYb22G-tS-3Cf6iwyg144tVwyBehMou0ke7KC-X5_h7DsgMrKsk8J_N4_K-2wh53gG&refresh_token=atkn_CiEIgJncrgYQgLP6rwaiARIKEHblfRKExEEWrvXjkkDeh9cSQAaTpPU4jhUmPGqfMyVWQhj0Ct36MiXl7X4wuQ5Jm4KzPyKv5kZzXmI8POF0EE_l56Wb6tY4CQyaxDCL7C22iAk&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3 completed in 265 ms
With response headers:
- cache-control: no-cache, no-store, private, must-revalidate, max-age=0
- content-type: application/json; charset=utf-8
- etag: W/"9f207c1a104e5692ebade96e7fce93a8"
- x-request-id: bd5c9337-5d21-4995-9773-c73614e550cc
2024-02-22T09:11:45.742Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=271e16d403dfa18082ffb3d197bd2b5f4479c3fc32736d69296829cbb28d41a6&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&subject_token=****
With request headers:
- User-Agent: Shopify CLI; v=3.56.2
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-02-22T09:11:45.742Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=ee139b3d-5861-4d45-b387-1bc3ada7811c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools&subject_token=****
With request headers:
- User-Agent: Shopify CLI; v=3.56.2
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-02-22T09:11:45.742Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=32ff8ee5-82b8-4d93-9f8a-c6997cefb7dc&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly&subject_token=****
With request headers:
- User-Agent: Shopify CLI; v=3.56.2
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-02-22T09:11:45.742Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=7ee65a63608843c577db8b23c4d7316ea0a01bd2f7594f8a9c06ea668c1b775c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.graphql+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.themes+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly&subject_token=****&destination=https%3A%2F%2Fbosch-stage.myshopify.com%2Fadmin
With request headers:
- User-Agent: Shopify CLI; v=3.56.2
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-02-22T09:11:45.950Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=ee139b3d-5861-4d45-b387-1bc3ada7811c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools&subject_token=**** completed in 206 ms
With response headers:
- cache-control: no-cache, no-store, private, must-revalidate, max-age=0
- content-type: application/json; charset=utf-8
- etag: W/"d612fd32757ec33bfbfce416f173afdd"
- x-request-id: d5cba59b-38d3-4346-8637-eb27cd1ef821
2024-02-22T09:11:45.964Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=32ff8ee5-82b8-4d93-9f8a-c6997cefb7dc&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly&subject_token=**** completed in 219 ms
With response headers:
- cache-control: no-cache, no-store, private, must-revalidate, max-age=0
- content-type: application/json; charset=utf-8
- etag: W/"9794ebd75dfd46a45b5662b3f8fd802c"
- x-request-id: f4fb2857-3c4f-4064-bbc7-846e4645ac4a
2024-02-22T09:11:45.972Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=7ee65a63608843c577db8b23c4d7316ea0a01bd2f7594f8a9c06ea668c1b775c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.graphql+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.themes+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly&subject_token=****&destination=https%3A%2F%2Fbosch-stage.myshopify.com%2Fadmin completed in 227 ms
With response headers:
- cache-control: no-cache, no-store, private, must-revalidate, max-age=0
- content-type: application/json; charset=utf-8
- etag: W/"a0e00af54eab1f75b55019d8c7dda312"
- x-request-id: be6e0c60-16c6-4a7a-9ce0-0534b9032807
2024-02-22T09:11:46.052Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=271e16d403dfa18082ffb3d197bd2b5f4479c3fc32736d69296829cbb28d41a6&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&subject_token=**** completed in 308 ms
With response headers:
- cache-control: no-cache, no-store, private, must-revalidate, max-age=0
- content-type: application/json; charset=utf-8
- etag: W/"30476b0dd2989958656ab403ee3e15ad"
- x-request-id: 8255fea3-4f74-4c35-bede-14f725e32e42
2024-02-22T09:11:46.053Z: Setting session store...
2024-02-22T09:11:46.059Z: Ensuring that the user is authenticated with the Storefront API with the following scopes:
[]
2024-02-22T09:11:46.059Z: Getting session store...
2024-02-22T09:11:46.059Z: Validating existing session against the scopes:
[
"openid",
"https://api.shopify.com/auth/shop.admin.graphql",
"https://api.shopify.com/auth/shop.admin.themes",
"https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
"https://api.shopify.com/auth/shop.storefront-renderer.devtools",
"https://api.shopify.com/auth/partners.app.cli.access",
"https://api.shopify.com/auth/destinations.readonly"
]
For applications:
{
"storefrontRendererApi": {
"scopes": []
}
}
2024-02-22T09:11:46.059Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2024-02-22T09:11:46.060Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:
- User-Agent: Shopify CLI; v=3.56.2
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json
2024-02-22T09:11:46.252Z: Request to https://accounts.shopify.com/oauth/introspection completed in 192 ms
With response headers:
- cache-control: no-cache, no-store, private, must-revalidate, max-age=0
- content-type: application/json; charset=utf-8
- etag: W/"9b0a557e81a1928faa8b089d7c8cecde"
- x-request-id: 8a4a743e-f163-423d-a7de-8fd69c5713d1
2024-02-22T09:11:46.254Z: The identity token is valid: true
2024-02-22T09:11:46.254Z:
The validation of the token for application/identity completed with the following results:
- It's expired: false
- It's invalid in identity: false
2024-02-22T09:11:46.261Z:
Running system process:
· Command: /opt/homebrew/opt/ruby/bin/ruby -v
· Working directory: /Users/stijn/Sites/Projects/shopify-bosch/theme
2024-02-22T09:11:46.273Z:
Running system process:
· Command: /opt/homebrew/opt/ruby/bin/bundle -v
· Working directory: /Users/stijn/Sites/Projects/shopify-bosch/theme
2024-02-22T09:11:46.408Z: Reading the content of file at /opt/homebrew/Cellar/shopify-cli/3.56.2/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/assets/cli-ruby/Gemfile...
2024-02-22T09:11:46.409Z:
Running system process:
· Command: /opt/homebrew/opt/ruby/bin/bundle install
· Working directory: /opt/homebrew/Cellar/shopify-cli/3.56.2/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/assets/cli-ruby
2024-02-22T09:11:46.600Z:
Running system process:
· Command: /opt/homebrew/opt/ruby/bin/bundle exec /opt/homebrew/opt/ruby/bin/ruby /opt/homebrew/Cellar/shopify-cli/3.56.2/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/assets/cli-ruby/bin/shopify theme token --admin atkn_Cp8DCNGf3K4GEPHX3K4GYpADCAESED-F9Pqcm0CepM8os-dc6vEaqAFodHRwczovL2FwaS5zaG9waWZ5LmNvbS9hdXRoL3BhcnRuZXJzLmNvbGxhYm9yYXRvci1yZWxhdGlvbnNoaXBzLnJlYWRvbmx5IGh0dHBzOi8vYXBpLnNob3BpZnkuY29tL2F1dGgvc2hvcC5hZG1pbi5ncmFwaHFsIGh0dHBzOi8vYXBpLnNob3BpZnkuY29tL2F1dGgvc2hvcC5hZG1pbi50aGVtZXMgDSinUzIQwzzVKXXpQ5eKkLgJeKkqPzokZjJkMGY1OTktMzFjYS00YTBjLWI2MDAtODg2Mzk1ODM3OGZlQgdBY2NvdW50ShD0yx12w3JCGrIM_ggo5FbtUlN7InN1YiI6ImZiZGIyNjQ5LWUzMjctNDkwNy04ZjY3LTkwOGQyNGNmZDdlMyIsImlzcyI6Imh0dHBzOi8vYWNjb3VudHMuc2hvcGlmeS5jb20ifWIQq0wU-P7DRCKuFTRC-QefQWoQrBU3pebITYSDaglyzRk3ohJAuY7fFYkhYwBJ0Pjxrcq-ozt4SMa1TNLekMEqSgWshfpHd1ISr6EBEpdoNsv3-v38XEXlsiYpMrpz1Dee0Zt7DA --sfr atkn_CqMCCNGf3K4GEPHX3K4GYpQCCAESEKzH-v1hqUrNs2emoX0lFIkaPmh0dHBzOi8vYXBpLnNob3BpZnkuY29tL2F1dGgvc2hvcC5zdG9yZWZyb250LXJlbmRlcmVyLmRldnRvb2xzINhSKKdTOiRmMmQwZjU5OS0zMWNhLTRhMGMtYjYwMC04ODYzOTU4Mzc4ZmVCB0FjY291bnRKEPTLHXbDckIasgz-CCjkVu1SU3sic3ViIjoiZmJkYjI2NDktZTMyNy00OTA3LThmNjctOTA4ZDI0Y2ZkN2UzIiwiaXNzIjoiaHR0cHM6Ly9hY2NvdW50cy5zaG9waWZ5LmNvbSJ9YhCrTBT4_sNEIq4VNEL5B59BahCsFTel5shNhINqCXLNGTeiEkD7pOr3976XOwp6ppNhxrT0kmBK1ww_o3uMgO7nZO_G-l4_OarpHABMCmLTwY8JJ8q_kOQ27pfHvNvzHP22-OQO
· Working directory: /Users/stijn/Sites/Projects/shopify-bosch/theme
2024-02-22T09:11:46.884Z: Getting development theme...
2024-02-22T09:11:47.187Z: Request to https://bosch-stage.myshopify.com/admin/api/unstable/themes/159229935962.json?fields=id%2Cname%2Crole%2Cprocessing completed in 301 ms
With response headers:
- content-type: application/json; charset=utf-8
- x-request-id: 55ece533-7793-489d-a396-805525c5ded0
╭─ success ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Preview your theme │
│ • http://127.0.0.1:9292 │
│ │
│ Next steps │
│ • Customize your theme at the theme editor │
│ • Share your theme preview (https://bosch-stage.myshopify.com/?preview_theme_id=159229935962) │
│ │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
2024-02-22T09:11:47.226Z:
Running system process:
· Command: /opt/homebrew/opt/ruby/bin/ruby -v
· Working directory: /Users/stijn/Sites/Projects/shopify-bosch/theme
2024-02-22T09:11:47.234Z:
Running system process:
· Command: /opt/homebrew/opt/ruby/bin/bundle -v
· Working directory: /Users/stijn/Sites/Projects/shopify-bosch/theme
2024-02-22T09:11:47.340Z: Reading the content of file at /opt/homebrew/Cellar/shopify-cli/3.56.2/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/assets/cli-ruby/Gemfile...
2024-02-22T09:11:47.341Z:
Running system process:
· Command: /opt/homebrew/opt/ruby/bin/bundle install
· Working directory: /opt/homebrew/Cellar/shopify-cli/3.56.2/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/assets/cli-ruby
2024-02-22T09:11:47.529Z:
Running system process:
· Command: /opt/homebrew/opt/ruby/bin/bundle exec /opt/homebrew/opt/ruby/bin/ruby /opt/homebrew/Cellar/shopify-cli/3.56.2/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/assets/cli-ruby/bin/shopify theme serve /Users/stijn/Sites/Projects/shopify-bosch/theme --live-reload hot-reload --theme 159229935962 --overwrite-json undefined
· Working directory: /Users/stijn/Sites/Projects/shopify-bosch/theme
/opt/homebrew/Cellar/shopify-cli/3.56.2/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/assets/cli-ruby/bin/shopify:15: warning: observer was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add observer to your Gemfile or gemspec.
/opt/homebrew/Cellar/shopify-cli/3.56.2/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/assets/cli-ruby/bin/shopify:15: warning: webrick was loaded from the standard library, but is not part of the default gems since Ruby 3.0.0. Add webrick to your Gemfile or gemspec.
/opt/homebrew/Cellar/shopify-cli/3.56.2/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/assets/cli-ruby/bin/shopify:15: warning: base64 was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile or gemspec.
DEBUG GET https://bosch-stage.myshopify.com/admin/api/unstable/themes.json with request_id: 801717c5-997d-4c15-8715-15037425cc32
* Syncing theme #159229935962 on bosch-stage.myshopify.com
DEBUG GET https://bosch-stage.myshopify.com/admin/api/unstable/themes/159229935962/assets.json with request_id: eb26d7ad-5a60-4626-b41f-6aae63fdb19b
100%
[2024-02-22 10:11:48] INFO WEBrick 1.7.0
[2024-02-22 10:11:48] INFO ruby 3.3.0 (2023-12-25) [arm64-darwin23]
[2024-02-22 10:11:48] INFO WEBrick::HTTPServer#start: pid=21632 port=9292
Reproduction steps
- Setup a repo with shopify
- run
shopify theme dev
- Open http://127.0.0.1:9292 in browser
Operating System
macOS Sonoma v14.2.1
Shopify CLI version (check your project’s package.json
if you’re not sure)
3.56.2
Shell
zsh
Node version (run node -v
if you’re not sure)
v20.10.0
What language and version are you using in your application?
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin23], node v20.10.0
Workaround
Got to http://127.0.0.1:9292/?preview_theme_id=xxx
Replace xxx
with you development theme id. You can find it in the terminal or url of your theme editor.
About this issue
- Original URL
- State: open
- Created 4 months ago
- Reactions: 9
- Comments: 59 (4 by maintainers)
I found a simple workaround.
Simply add
?preview_theme_id=xxx
behind your urlFor anyone wanting to quickly find their theme id, it is shown in your terminal when starting theme dev:
[1] http://127.0.0.1:9292
[2] https://shop-id.myshopify.com/admin/themes/1234567890/editor
[3] https://shop-id.myshopify.com/?preview_theme_id=1234567890
In the above example, your theme ID is 1234567890 and you should run
http://127.0.0.1:9292?preview_theme_id=1234567890
to make the local preview work again.Thank you, everyone, for reporting this issue and contributing with details!
The release 3.59.2 has resolved issues involving the live preview and the development server.
To date, the team has mitigated all use cases that could be isolated based on the details we have today, but the intermittent reports suggest there might still be a problem. We’d like to avoid ambiguity and ensure all issues involving the live theme and the
shopify theme dev
command are fixed for everyone.The intermittent nature of some reports makes this process challenging. Thus, please, if you notice any issue with the preview of the development involving the live, share a screenshot of the problem including the
--verbose
output with us (feel free to send it directly to me if you don’t want to share here: guilherme.carreiro@shopify.com). With that, we can reproduce the exact scenario you’re facing with the latest version of Shopify CLI.Thanks again, everyone, for the details and for following this up.
I’ve upgraded too and it’s still not working for me without the
preview_theme_id
trick.In my experience
Shopify theme dev
command has been unreliable for the past month even though they did multiple release to adress this issue.👋 Hey folks,
This issue should be fixed in Shopify CLI
3.56.3
. If you’re still facing this issue, could you please do the following?shopify theme dev --verbose
Some changes on the platform generated this issue in the CLI and we’re currently working around that at the CLI level as we can’t rollback those changes. If version
3.56.3
is not working, it might reveal a different problem that needs to be fixed.Thank you for reporting this and for providing all the details.
This just started happening for me this morning with 3.59.1, and has continued after updating to 3.59.2. It happens after a reload. The initial load shows the correct theme. Using homebrew-installed global Shopify CLI.
Here’s the verbose output, the reload is towards the end of the log:
https://gist.github.com/nikitaourazbaev/9944c83a3a8514afa3b4f76e4be74747
@karreiro happy to send an unredacted one if this is not helpful.
Hi @karreiro,
since v3.59.2 it’s actually more broken then it ever was. Whenever we save a file and hot reload kicks in, it will automatically go back to one of the live themes…
Seen this at a colleague, so I will try to post a verbose asap.
Update It only happens when you have installed it through npm
@bogdanoasa what has worked for me is deleting the temp dev theme and then starting up again
shopify theme dev -d (it will ask you to confirm first)
happy for you. I hope it lasts
I upgraded to 3.59.1 yesterday, shopify auth logout, logged back in, all good
imagine my surprise this morning when I started up theme dev only to see the same bug again
for sure. sounds like there was a platform change that caused this issue initially, they tried to apply a fix, then shopify rolled out the ‘unified CLI’ and a lot of us started experiencing these issues again
I have sympathy for the team - I’m sure there is a good amount of “merge hell” going on. they mentioned they also had to migrate from ruby to ts for the unified cli. a lot going on all at once
however I would say 90% of all use of the CLI is shopify theme dev. saying this as someone who spends a lot of time in both app dev and theme dev. it’s a critical piece of the CLI and it sucks to log in to work every day and constantly have to re start the cli to see your preview environment before it reverts back to prod randomly
had same issue, upgraded my shopify cli via homebrew to
v3.58.2
and everything work’s smoothly!It did happen on a 3.55.x as well. And somehow this issue is not always occuring…