-
Notifications
You must be signed in to change notification settings - Fork 154
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 returns published theme instead of development theme #3466
Comments
I have the exact same error. Thanks for opening the issue. My details:
Is there anything I should hide if I share my verboose output? |
I have the same error too. |
I found a simple workaround. Simply add |
It did happen on a 3.55.x as well. And somehow this issue is not always occuring.... |
Same problem, I'm on |
I'm on 3.56.1 but I don't have this issue |
Same for me, 24 hours ago there were no issues! Preview link and theme editor link both working fine.
|
My team and I have the same issue. |
same issue here. |
I'm also facing the same issue across multiple themes and shopify store's |
My team and I have the same issue on various themes. CLI 3.45.4 |
Same issue, I feel much better now that I know its not just me. I am seeing random times it works... this feels like a network issue. Also I have two computers on the same OS version but different CLI versions having the same issue. To add more details here is what versions I am running: I have tried what many others have, uninstall and reinstall CLI, logout and login to CLI. My Imac started yesterday, and my powerbook started today. So some time had passed until both computers had the same symptom. I did have a moment that it worked as expected, but upon a new CLI method call, it stopped working again. I will try the workaround, but it would be nice to solve this without the workaround. |
Same issue here across 3 different stores, started around 24 hours ago for me. Using version 3.56.2 |
Just to weigh in, our team is having the same issue from ~24 hours ago. Current CLI version: 3.56.2 We've tried:
Waiting on the above PR to close then will test again |
Since the workaround is passing an id as a query param, which started to happen on a timestamp and not a version update, this feels like something on the Shopify network. My guess something was updated and depending on what server we were connected to impacted us at different times. But we all experienced this starting sometime around Wednesday/Thursday. I suspect we won't see a new CLI release to fix this issue, but something Shopify needs to fix on their network end. |
Hi @edmeehan , I'm also not 100% sure if the fix will help. Looking at the PR it looks like the do something with the cache that could fix the issue that they probably created outside the CLI. Let's wait till it has been released to see if it will work. |
I tested the solution and appears to be partial solution. Some other cache exists on standard browser window that is not being cleared out when a theme is deleted. This ticket should remain open for others having this issue. I can confirm that if you go to the localhost link in a incognito window it will work, so it does appear to be a cache issue. |
Also to add more to this, if you open the localhost link on your standard window then attempt to open in incognito, you will still see the published theme. So still some sort of cache issue. Solution for the ticket does not work as expected. At least for me currently, I will try again in a few minutes to see if some timeout happens. |
getting the same issue on an older version (@shopify/cli/3.46.5) don't think it's a version issue - something on shopify's end appears to have broken this feature for all cli versions |
👋 Hey folks, This issue should be fixed in Shopify CLI
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 Thank you for reporting this and for providing all the details. |
I'm working on a theme app extension and am facing a lot of issues where any change that I'm making in the code is not reflecting on the development store preview page that I'm adding the app block to (product pages). The changes are showing up only if I reload the product page several minutes after I made the code change. This is making the development effort extremely infuriating (sorry). I'm wondering if my problem is also related to this issue. Any fix or suggestion on this front will be greatly appreciated. Thanks. What I've tried so far (unsuccessfully):
More info:
|
This issue does not seem to have been fixed, or the issue is back again. After running |
I'm seeing this bug again on my end as well Mac version: 14.4.1 (23E224) |
had same issue, upgraded my shopify cli via homebrew to |
For me it seems the issue is fixed, except for the one theme I was working on the day when the bug was active. It seems it's stuck in a cache or something. |
For anyone wanting to quickly find their theme id, it is shown in your terminal when starting theme dev:
In the above example, your theme ID is 1234567890 and you should run |
sorry - shopify theme delete -d |
I am still noticing this issue. At times it will return the published theme by default, but at times it will now also return the most recently used unpublished theme, and will refuse to create a development theme, unless I delete the unpublished theme, and then run |
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 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 Thanks again, everyone, for the details and for following this up. |
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 |
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. |
Thank you for the context, @stijns96 and @nikitaourazbaev! @nikitaourazbaev, could you please confirm if this behavior persists after you remove the That would help us narrow down the root cause of the issue. In our tests, removing the flag worked as a temporary workaround, suggesting that the issue is related to password-based authentication in some shops. |
Hi @karreiro, We not using |
@karreiro 3.59.3 has been the version that has consistently given me issues with http://127.0.0.1:9292 Sometimes the first time I load the preview the correct version is show, but as soon as I refresh or browse to any other page I'm dropped back into the live theme. Other times it simply loads the live theme as the preview. I can use the URL http://127.0.0.1:9292?preview_theme_id=000000000 which seems to work for a bit, but eventually I'm dropped back into the live theme. When it does drop out of the theme preview the normal URL will change to http://127.0.0.1:9292?_fd=0&pb=0 To try to help debug I did completely log out of Shopify, cleared all cookies related to Shopify and restarted the CLI to log back in. |
To back this up, I experience all that as well, just as you described it. I also do not use |
I had an instance of this that reliably would drop me into the production theme after editing
|
I'm actually able to reliably duplicate the issue now in my Dawn theme:
|
I've been experiencing this issue for the past week as well. We're all on the latest version of the CLI. At least the preview theme search param override works for a bit. |
@karreiro Indeed, if I remove the I should add that when the issue is occurring, adding the Thanks! |
+1 |
@karreiro I'm not working today but wanted to add that we do not use .toml environment files, and still have this issue. I usually just run the following: I have noticed lately it will sometimes do the following though, which is equally odd behaviour
So changes to styles/scripts reload, but liquid changes aren't reflected. I mainly notice this if I have a tab opened with the published theme and then also try to visit the development theme via |
This still seems to be an issue in 3.60.0 – same experience that @jonathanmoore outlined above. |
Thank you for reporting this scenario, @goroboto. I'm following all reports and request IDs linked in this thread, to make sure that Shopify CLI 3.60 fixes this issue in all scenarios. The version @goroboto, could you please share your Thanks again, @goroboto! |
I’ve been running 3.60.0 since this morning (~7 hours ago), and, so far, have not seen this issue. |
@karreiro I've obfuscated some of the data here but this is the log from the point where
|
@karreiro First, disclosure, I have not yet updated to 3.60, so I will attempt that shortly, but felt I would share this. I have started this today, and it initially loaded with the dev theme. It also stayed in the dev theme after making changes in the theme editor to the settings_data.json file. However, after making a change to a CSS/JS file, and having those changes uploaded, it has switched to the main theme. I've pulled some of the logs out, so that you can see when I made the changes to the settings_data.json file via theme editor, and how they synced ok. Then
I do believe around |
@karreiro I was running 3.59 earlier today and was still having the issue there. I've updated to 3.60 and have not yet experienced the issue. |
Thanks a lot for sharing these logs, @goroboto! I've followed the request ids, and the user agent indicates the CLI is running on version 3.59.3. So, an error might have happened during the upgrade. Could you please try to reinstall it? The CLI 3.60 includes a fix for the issue where Thanks a lot for sharing those details! |
@karreiro thank you for reviewing. I did just notice when using --verbose that the log returned a User-Agent value of After a reinstall via brew using the following commands:
...I ran |
@karreiro we tried this on a few different machines and it looks like this issue is only occurring on the install I was initially testing it on. Everywhere else it's 3.60.0 and 127.0.0.1:9292 is working great! Thank you for fixing this! |
working very nicely for me on 3.60.0 after the update + restarting machine have also noticed that switching between locales/markets is working much better than before - this was a bit of a pain point previously thanks for all the attention to this @karreiro really appreciate you sticking with us |
Thanks a lot, everyone, for contributing feedback and logs! Since version 3.60, we have not received any new reports of intermittent issues of this nature, confirming that the fix we shipped has really addressed all remaining scenarios. Therefore, I'm closing this issue. |
I flush my dns and windows:
|
Please confirm that you have:
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
Reproduction steps
shopify theme dev
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.The text was updated successfully, but these errors were encountered: