Skip to content
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 theme dev local server is redirecting to the actual theme URL (CLI 3.44.1) #1642

Closed
2 tasks done
claykelly opened this issue Mar 22, 2023 · 53 comments
Closed
2 tasks done
Assignees
Labels
Area: @shopify/theme @shopify/theme package issues Type: Bug Something isn't working

Comments

@claykelly
Copy link

claykelly commented Mar 22, 2023

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

Running shopify theme dev produces a local development theme (http://127.0.0.1:9292) which allows for real time testing with that stores data without having to push and pull from the theme.

Actual behavior

After running shopify theme dev, when opening the local URL
http://127.0.0.1:9292
in the Google Chrome (Version 111.0.5563.64), I am redirected to the theme's actual store URL
https://my_theme.myshopify.com/password?_fd=0

I have done some extensive digging trying to find a similar case and the only other open ticket I found was here on a 2.x CLI, which seems to still be unresolved: Shopify/shopify-cli#2315

I can get around the issue by pushing to the theme and then testing there but like the other post mentioned this defeats the entire purpose of the development CLI.

I have tired to clear browser data, use chrome incognito, open url via command line, changing the port the command is using... nothing. I can also include the chrome developer tools network response if that is needed.

I originally had a theme that was connected with GitHub and was concerned that it may be causing the issue. I ended up creating a new development store and pulled the default Dawn theme locally following this documentation: https://shopify.dev/docs/themes/tools/cli. Still no dice. Next, I thought that maybe it was because I was working with the published theme. I copied the dawn theme I had just made and pulled the unpublished theme locally and tried again... same issue.

Verbose output

test-shopify shopify theme dev --verbose
2023-03-22T15:40:23.168Z: Running command theme dev
  shopify:theme:dev init version: @oclif/core@2.1.4 argv: [ '--verbose' ] +0ms
2023-03-22T15:40:23.195Z: Ensuring that the user is authenticated with the Theme API with the following scopes:
[]

2023-03-22T15:40:23.195Z: Ensuring that the user is authenticated with the Admin API with the following scopes for the store CCK-Outfitters-New-Theme.myshopify.com:
[]

2023-03-22T15:40:23.195Z: Getting session store...
2023-03-22T15:40:23.197Z: 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"
]
For applications:
{
  "adminApi": {
    "scopes": [],
    "storeFqdn": "CCK-Outfitters-New-Theme.myshopify.com"
  }
}

2023-03-22T15:40:23.197Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2023-03-22T15:40:23.197Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:
 - User-Agent: Shopify CLI; v=3.44.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2023-03-22T15:40:23.383Z: Request to https://accounts.shopify.com/oauth/introspection completed in 181 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/"60d8375534928681d48af2f67db54a89"
 - x-request-id: c671606a-1360-433f-887c-a840da3c4715
    
2023-03-22T15:40:23.386Z: The identity token is valid: true
2023-03-22T15:40:23.386Z: 
The validation of the token for application/identity completed with the following results:
- It's expired: false
- It's invalid in identity: false
  
2023-03-22T15:40:23.386Z: The current session is valid but needs refresh. Refreshing...
2023-03-22T15:40:23.387Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=refresh_token&access_token=atkn_f4c38e1e0ca5854503eea487b641cb6345cd2bd9a42df06210a7424f586e8969&refresh_token=atkn_c15816ecfbd7c20b33b94e815ce11fc3ea6480186f178f5ba136660b32f8ea9e&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3
With request headers:
 - User-Agent: Shopify CLI; v=3.44.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2023-03-22T15:40:23.736Z: Request to https://accounts.shopify.com/oauth/token?grant_type=refresh_token&access_token=atkn_f4c38e1e0ca5854503eea487b641cb6345cd2bd9a42df06210a7424f586e8969&refresh_token=atkn_c15816ecfbd7c20b33b94e815ce11fc3ea6480186f178f5ba136660b32f8ea9e&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3 completed in 347 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/"02e658a7552bc733eaecd2e9bbb535c5"
 - x-request-id: 588fde63-95f7-4ea9-a329-719dd48412bf
    
2023-03-22T15:40:23.738Z: 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=openid+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&subject_token=atkn_eef0d1215d7bcad20de8eb54e65214af3d9c88e208d5937e4ff89fe7023d49d2
With request headers:
 - User-Agent: Shopify CLI; v=3.44.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2023-03-22T15:40:23.739Z: 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=openid+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools&subject_token=atkn_eef0d1215d7bcad20de8eb54e65214af3d9c88e208d5937e4ff89fe7023d49d2
With request headers:
 - User-Agent: Shopify CLI; v=3.44.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2023-03-22T15:40:23.931Z: 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=openid+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&subject_token=atkn_eef0d1215d7bcad20de8eb54e65214af3d9c88e208d5937e4ff89fe7023d49d2 completed in 191 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/"a137dd14339ad3217927ddf619a7df0b"
 - x-request-id: 703de277-d914-4fa8-8b56-cbf55c8b7b5d
    
2023-03-22T15:40:24.158Z: 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=openid+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools&subject_token=atkn_eef0d1215d7bcad20de8eb54e65214af3d9c88e208d5937e4ff89fe7023d49d2 completed in 417 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/"0aa63f23f3033235810abf6d3c7b66f5"
 - x-request-id: 42104d35-4bde-40f6-ba3d-78eb47f5fe16
    
2023-03-22T15:40:24.161Z: 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=openid+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=atkn_eef0d1215d7bcad20de8eb54e65214af3d9c88e208d5937e4ff89fe7023d49d2&destination=https%3A%2F%2FCCK-Outfitters-New-Theme.myshopify.com%2Fadmin
With request headers:
 - User-Agent: Shopify CLI; v=3.44.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2023-03-22T15:40:24.415Z: 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=openid+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=atkn_eef0d1215d7bcad20de8eb54e65214af3d9c88e208d5937e4ff89fe7023d49d2&destination=https%3A%2F%2FCCK-Outfitters-New-Theme.myshopify.com%2Fadmin completed in 252 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/"7c02137f2939f492903c526f86d1ac9d"
 - x-request-id: b317e613-b63d-459b-bc8e-a8e2b2408701
    
2023-03-22T15:40:24.417Z: Setting session store...
2023-03-22T15:40:24.437Z: Getting development theme...
2023-03-22T15:40:24.782Z: Request to https://cck-outfitters-new-theme.myshopify.com/admin/api/unstable/themes/146387009835.json?fields=id completed in 343 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - x-request-id: b303c2ae-80e1-4fff-ba90-0ce22a82000b
    
2023-03-22T15:40:24.786Z: Ensuring that the user is authenticated with the Storefront API with the following scopes:
[]

2023-03-22T15:40:24.786Z: Getting session store...
2023-03-22T15:40:24.787Z: 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"
]
For applications:
{
  "storefrontRendererApi": {
    "scopes": []
  }
}

2023-03-22T15:40:24.787Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2023-03-22T15:40:24.788Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:
 - User-Agent: Shopify CLI; v=3.44.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2023-03-22T15:40:24.798Z: Obtaining the dependency manager in directory ../.....
2023-03-22T15:40:24.802Z: 
Running system process:
  · Command: /opt/homebrew/opt/ruby/bin/ruby -v
  · Working directory: /Users/claykelly/Projects/test-shopify

2023-03-22T15:40:24.928Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 115 ms
With response headers:
 - x-request-id: df4c45c4-8cff-49f1-a9ad-8cdd65d9b1dd
    
2023-03-22T15:40:24.929Z: Analytics event sent: {
  "command": "theme dev",
  "time_start": 1679499623169,
  "time_end": 1679499624794,
  "total_time": 1625,
  "success": true,
  "cli_version": "3.44.1",
  "ruby_version": "3.2.1",
  "node_version": "19.8.1",
  "is_employee": false,
  "uname": "darwin arm64",
  "env_ci": false,
  "env_plugin_installed_any_custom": false,
  "env_plugin_installed_shopify": "[\"@shopify/cli\",\"@shopify/plugin-did-you-mean\",\"@shopify/theme\"]",
  "env_shell": "zsh",
  "env_device_id": "4e8467edaee8963943bb13d6fefdef5ba227b4de",
  "env_cloud": "localhost",
  "env_package_manager": "yarn",
  "cmd_all_launcher": "unknown",
  "cmd_all_topic": "theme",
  "cmd_all_plugin": "@shopify/theme",
  "args": "--verbose",
  "env_plugin_installed_all": "[\"@shopify/cli\",\"@shopify/plugin-did-you-mean\",\"@shopify/theme\"]",
  "metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2023-03-22T15:40:24.929Z: Completed command theme dev
2023-03-22T15:40:24.959Z: Request to https://accounts.shopify.com/oauth/introspection completed in 170 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/"ba002af31ccf9ddf690c6988264081db"
 - x-request-id: c515981f-b733-49fe-9188-5031e2b41f8d
    
2023-03-22T15:40:24.960Z: The identity token is valid: true
2023-03-22T15:40:24.960Z: 
The validation of the token for application/identity completed with the following results:
- It's expired: false
- It's invalid in identity: false
  
2023-03-22T15:40:24.965Z: 
Running system process:
  · Command: /opt/homebrew/opt/ruby/bin/ruby -v
  · Working directory: /Users/claykelly/Projects/test-shopify

2023-03-22T15:40:24.975Z: 
Running system process:
  · Command: /opt/homebrew/opt/ruby/bin/bundle -v
  · Working directory: /Users/claykelly/Projects/test-shopify

2023-03-22T15:40:25.061Z: Reading the content of file at /opt/homebrew/Cellar/shopify-cli/3.44.1/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/assets/cli-ruby/Gemfile...
2023-03-22T15:40:25.062Z: 
Running system process:
  · Command: /opt/homebrew/opt/ruby/bin/bundle install
  · Working directory: /opt/homebrew/Cellar/shopify-cli/3.44.1/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/assets/cli-ruby

2023-03-22T15:40:25.234Z: 
Running system process:
  · Command: /opt/homebrew/opt/ruby/bin/bundle exec /opt/homebrew/opt/ruby/bin/ruby /opt/homebrew/Cellar/shopify-cli/3.44.1/libexec/lib/node_modules/@shopify/theme/node_modules/@shopify/cli-kit/assets/cli-ruby/bin/shopify theme serve . --live-reload hot-reload --theme 146387009835
  · Working directory: /Users/claykelly/Projects/test-shopify

┏━━ Viewing theme… ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
┃ DEBUG GET https://CCK-Outfitters-New-Theme.myshopify.com/admin/api/unstable/themes.json with X-Request-Id: 2f574d79-1e4d-4258-88ec-b6d422e9e2a7
┃ * Syncing theme #146387009835 on CCK-Outfitters-New-Theme.myshopify.com
┃ DEBUG GET https://CCK-Outfitters-New-Theme.myshopify.com/admin/api/unstable/themes/146387009835/assets.json with X-Request-Id: e4b0f84e-4ed5-4f12-8b41-c38a1ac5853a
┃                                                                                                                                                                                      100%
┃ 
┃ Serving .
┃ 
┃ Please open this URL in your browser:
┃ http://127.0.0.1:9292
┃ 
┃ Customize this theme in the Theme Editor, and use 'theme pull' to get the changes:
┃ https://CCK-Outfitters-New-Theme.myshopify.com/admin/themes/146387009835/editor
┃ 
┃ Share this theme preview:
┃ https://CCK-Outfitters-New-Theme.myshopify.com/?preview_theme_id=146387009835
┃ 
┃ (Use Ctrl-C to stop)
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ (0.54s) ━━
[2023-03-22 10:40:26] INFO  WEBrick 1.7.0
[2023-03-22 10:40:26] INFO  ruby 3.2.1 (2023-02-08) [arm64-darwin21]
[2023-03-22 10:40:26] INFO  WEBrick::HTTPServer#start: pid=90428 port=9292


CHROME DEV TOOLS OUTPUT:

Reproduction steps

  1. Pull theme
  2. run shopify theme dev
  3. open given URL (http://127.0.0.1:9292)
  4. URL redirects to actual theme URL

Operating System

Mac OS Monterey v12.5

Shopify CLI version (check your project's package.json if you're not sure)

3.44.1

Shell

zsh

Node version (run node -v if you're not sure)

v18.8.0

What language and version are you using in your application?

Ruby 3.2.1

@claykelly
Copy link
Author

I found a workaround. If you go to the editor link and then click preview it will take me to the local instance.

@Poitrin
Copy link
Contributor

Poitrin commented Apr 6, 2023

A new CLI3 version has been released, with many fixes. Does it still appear there?

@ppandey-debug
Copy link

A new CLI3 version has been released, with many fixes. Does it still appear there?

Yes

@github-actions
Copy link
Contributor

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

@v1nk0
Copy link

v1nk0 commented May 16, 2023

This issue still exists. I'm on CLI 3.45.4 and I have the exact problem as described in this issue.
I'm running shopify theme dev --store=xxxx.myshopify.com and instead of showing the theme I'm developing, the browser immediately redirects and just shows the live store.

As described, I can view the development version when I use the editor link and click "preview", but this does not solve the problem as I'm missing out on the hot-reload functionality when not using the local http://127.0.0.1:9292.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2023

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

@v1nk0
Copy link

v1nk0 commented Jun 9, 2023

Issue still exists

@haroldao
Copy link

Still relevant.

@danhvo11012
Copy link

Issue still exists

@xxated
Copy link

xxated commented Aug 8, 2023

The issue still exists.
Clicking preview from editor still redirects.

@github-actions
Copy link
Contributor

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

@hackbraten68
Copy link

issue still exists

@BaileyP-dev
Copy link

Issue came up to me too. Not sure what caused it, but my fix was to use command theme delete, and reset my computer. When I did theme dev the new instance of the local host worked. I wonder if delete and just a new terminal window may have worked.

@truemoroz
Copy link

"@shopify/cli": "^3.49.2"
When I select another language, I get redirect to my shopify store.
I can't debug localization

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

@benergize
Copy link

Still an issue.

@chinovader
Copy link

Still an issue.
Current Shopify CLI version: 3.49.6

@albchu
Copy link
Contributor

albchu commented Oct 10, 2023

Hi folks, we're having difficulties reproducing this issue in our dev environments. Does anyone have a consistent reproduce flow for getting this issue to start appearing?

@chinovader
Copy link

chinovader commented Oct 11, 2023

Hi Albert, after installing again a dev environment from scratch, for me, this is happening in a store that is not a development store, and only with the assets url (to be honest, I don't know if the Shopify CLI can be used with not development stores).
Sorry I can not provide more precise details.

@xzikoto
Copy link

xzikoto commented Jan 29, 2024

Somehow was not well fixed, had the bug, after couple "theme dev" tries - it did not appear anymore.

@v1nk0
Copy link

v1nk0 commented Jan 30, 2024

still an issue

@JulianOriginem
Copy link

JulianOriginem commented Feb 9, 2024

still an issue

poor guy, almost waiting a year

@JulianOriginem
Copy link

Had the same problem when using: shopify theme dev --store my-store.shopify.com --live-reload hot-reload

After removing the --live-reload flag it seemed to work. After that added the --live-reload flag again and now it still works!
Try messing around with flags. Removing them, adding them, etc

@iska31
Copy link

iska31 commented Feb 22, 2024

Still active.

@GLips
Copy link

GLips commented Feb 22, 2024

I'm seeing this issue too. It's not redirecting for me, but it seems to be serving the production theme on the localhost server.

@Acariah
Copy link

Acariah commented Feb 23, 2024

I also started seeing this issue yesterday after ~2 years of no issues. No config changes on my end nor store changes. It also happens on multiple stores.

I am seeing the exact problem mentioned here #1642 (comment) however strangely enough when I remove the sync flags as mentioned here #1642 (comment) everything works as normal.

At least for me, this seems directly tied to --theme-editor-sync

Update: Shortly after I posted this it has gone back to reflecting production - regardless of any flags passed or not passed

@rich-cherry
Copy link

I'm experiencing the same problem — local is showing the live theme instead of the correct branch. May be a caching issue, as it occasionally it renders the correct theme in incognito.

@GLips
Copy link

GLips commented Feb 23, 2024

Haven't had luck changing flags around. I'm using the shopify.theme.toml file to set flags and environments, but it seems that the issue still happens when I pass the arguments in on the command line manually.

So much activity on this note after two weeks of inactivity makes me feel like it might be a server-side thing on Shopify's end?

@Acariah
Copy link

Acariah commented Feb 23, 2024

Haven't had luck changing flags around. I'm using the shopify.theme.toml file to set flags and environments, but it seems that the issue still happens when I pass the arguments in on the command line manually.

So much activity on this note after two weeks of inactivity makes me feel like it might be a server-side thing on Shopify's end?

I'm willing to wager this might be the case. A couple of my juniors reached out today experiencing the same issue out of the blue; so hopefully it goes away as quickly as it came!

@GLips
Copy link

GLips commented Feb 23, 2024

Not sure if it's just lucky timing or what, but after restarting my computer localhost syncs to the proper dev theme again 🤷‍♂️

@DannyTaki
Copy link

I am also having this issue on all my computers and redirected to the password page of the live site.

@lizsterine
Copy link

Like @rich-cherry, I'm also getting the live theme rendering on the localhost. :(

@drissnejjar
Copy link

it's still an issue for me too.

I am on Widnows:

TOOLING AND SYSTEM
Shopify CLI 3.57.1
OS windows-amd64
Shell unknown
Node version v20.11.1
Ruby version 3.2.3

@bansavage
Copy link

Still an issue on MacOS, CLI 3.50.0

@klupsky
Copy link

klupsky commented Apr 4, 2024

i have the same issue Shopify CLI version: 3.58.2

@bansavage
Copy link

bansavage commented Apr 5, 2024

@karreiro @gonzaloriestra @shauns
Can we get some confirmation this issue is continuing?
This bug has been recurring for over 1 year and counting!
Is using SHOPIFY_CLI_BUNDLED_THEME_CLI the fix again?

These are just some of the issues from the past....

#1320
#1425
#2665
#3466
#3206

@adamatronix
Copy link

I don't know if this will help everyone, but running the command with --verbose fixed it for me.

@freakkiller
Copy link

I had the same bug. I was able to fix it with the following workaround: I added the parameter 'preview_theme_id=xxxx' (xxxx is the theme ID!) to the URL http://127.0.0.1:9292. Now the correct theme is used for the display.

@BenderBendingDev
Copy link

I had the same bug. I was able to fix it with the following workaround: I added the parameter 'preview_theme_id=xxxx' (xxxx is the theme ID!) to the URL http://127.0.0.1:9292. Now the correct theme is used for the display.

Thank you, it has been the ONLY thing that has worked for me.

I emphasize this because I have not found it anywhere.

Thank you very much!!!!

@karreiro
Copy link
Contributor

Thanks, everyone, for reporting this!

This issue has been fixed in the latest version of Shopify CLI and no longer requires the preview_theme_id=xxxx workaround.

Thanks again for all details and context!

@karreiro karreiro self-assigned this May 14, 2024
@stevebreault
Copy link

Have updated to @shopify/cli/3.60.1 darwin-arm64 node-v22.1.0 and the issue persists. Changing languages redirects to the Shopify hosted site rather than staying on localhost.

@pawanrana1992
Copy link

Still have the same issue on latest version too with fresh initialization of theme

@Tom-woodhouse
Copy link

Issue still active for me too.

@darrenortiz77
Copy link

Still active. Come on guys.

@klupsky
Copy link

klupsky commented Jul 15, 2024

in my case the issue was that my cache was emptied, therefor i wasn't logged into my shopify store. my solution was to temporary add the login form to my password page, log in again with the store password and remove it again.

@lukeh-shopify
Copy link
Contributor

Hi all, please see this comment and direct any further bug reports that open Github issue. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: @shopify/theme @shopify/theme package issues Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests