-
Notifications
You must be signed in to change notification settings - Fork 125
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
Comments
I found a workaround. If you go to the editor link and then click preview it will take me to the local instance. |
A new CLI3 version has been released, with many fixes. Does it still appear there? |
Yes |
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. |
This issue still exists. I'm on CLI 3.45.4 and I have the exact problem as described in this issue. 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. |
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. |
Issue still exists |
Still relevant. |
Issue still exists |
The issue still exists. |
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. |
issue still exists |
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. |
"@shopify/cli": "^3.49.2" |
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. |
Still an issue. |
Still an issue. |
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? |
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). |
Somehow was not well fixed, had the bug, after couple "theme dev" tries - it did not appear anymore. |
still an issue |
poor guy, almost waiting a year |
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! |
Still active. |
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. |
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 Update: Shortly after I posted this it has gone back to reflecting production - regardless of any flags passed or not passed |
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. |
Haven't had luck changing flags around. I'm using the 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! |
Not sure if it's just lucky timing or what, but after restarting my computer localhost syncs to the proper dev theme again 🤷♂️ |
I am also having this issue on all my computers and redirected to the password page of the live site. |
Like @rich-cherry, I'm also getting the live theme rendering on the localhost. :( |
it's still an issue for me too. I am on Widnows: TOOLING AND SYSTEM |
Still an issue on MacOS, CLI 3.50.0 |
i have the same issue Shopify CLI version: 3.58.2 |
I don't know if this will help everyone, but running the command with --verbose fixed it for me. |
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!!!! |
Thanks, everyone, for reporting this! This issue has been fixed in the latest version of Shopify CLI and no longer requires the Thanks again for all details and context! |
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. |
Still have the same issue on latest version too with fresh initialization of theme |
Issue still active for me too. |
Still active. Come on guys. |
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. |
Hi all, please see this comment and direct any further bug reports that open Github issue. Thanks |
Please confirm that you have:
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 URLhttp://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
Reproduction steps
shopify theme dev
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
The text was updated successfully, but these errors were encountered: