themekit icon indicating copy to clipboard operation
themekit copied to clipboard

Website is one version behind changes uploaded with theme watch

Open dhmacs opened this issue 7 years ago • 19 comments

What happened

When I change a file, theme watch command correctly uploads it to the Shopify store (I can see the latest versions from the admin code page), but I can't see the changes in the website. At first I though it could be browser cache, but even in private browsing I can't see the changes. And every time I make changes to the file, the website updates to the previous change, not the latest.

What I expected to happen

When I change a file, and it gets uploaded by theme watch, the website runs on the latest version of that file

Steps to reproduce

  1. Run theme watch
  2. Make a change (let's call the change A)
  3. Wait for themekit to upload the changed file
  4. In the website you won't see change A
  5. Make another change to the same file (let's call the change B)
  6. Wait for themekit to upload the changed file
  7. In the website I see the changes A

My Environment

OS (including version): macOS High Sierra v10.13.1 Themekit version: 0.7.5 Ignore Files(if any):

dhmacs avatar Dec 05 '17 21:12 dhmacs

There is nothing that should interfere with the assets loading or for a second change cause any change to the previous change. Do you have asset precompiler that may be interfering with the asset uploading?

tanema avatar Jan 09 '18 20:01 tanema

@tanema when I reproduced the error webpack was turned off. The thing is that the code is actually uploaded to Shopify, but Shopify displays the previous version of the file.

For now, the work around I've found is that every time I make a change, I change the compiled file again (I do this through a webpack plugin by adding a blank space at the end of the changed source file). This will make the file being uploaded twice, so that the shopify store displays the current - 1 copy of it.

dhmacs avatar Jan 10 '18 07:01 dhmacs

Do you have the same problem is you change the files with the editor on shopify?

tanema avatar Jan 10 '18 14:01 tanema

Sounds similar to #473

cameroncowden avatar Jan 10 '18 15:01 cameroncowden

@tanema I've tried it again today, and even changing with the Shopify editor has the same issue.. So it appears indeed to be an issue of the platform

dhmacs avatar Jan 11 '18 10:01 dhmacs

I have the same setup as @macs91 and have the exact same problem. I have to save the file, then increment a value somewhere and save again. Really annoying, I should automate it.

jroboyd avatar Apr 16 '18 19:04 jroboyd

@boydy12 I wrote a really ugly webpack plugin to automate that 😂

dhmacs avatar Apr 16 '18 20:04 dhmacs

From issues coming from Shopify because themekit uploads files in such quick succession, this issue seems related to our asset version tracking. We keep version and check for changes so our systems will know when the cdn needs to be updated. I will keep this updated, I know this issue have been open for a long time but this has only become more visible as themekit gets faster.

tanema avatar Mar 28 '19 14:03 tanema

I believe this issue should be mitigated within shopify now. We have managed to put a few protections in place to stop it from happening.

tanema avatar Jun 19 '19 18:06 tanema

I'm still experiencing this issue

My Environment OS (including version): Windows 10 Themekit version: ThemeKit 1.0.1 windows/amd64

CurtisMac avatar Jul 05 '19 08:07 CurtisMac

I'm still experiencing this on Themekit as well as Slate. It takes 2 reloads to see the new version on Themekit and the automatic reload + a manual reload on Slate.

dan-gamble avatar Sep 19 '19 14:09 dan-gamble

I'm experiencing this as well. Seems like a bunch of others are who are using Slate. Can this be reopened and investigated? It's making for very slow development.

RustyDev avatar Oct 09 '19 16:10 RustyDev

This can stay open however the issue is with Shopify and not themekit. The APIs have issues sometimes with updating CDN and file versions.

tanema avatar Oct 09 '19 16:10 tanema

Thank you for the response. Is there another channel to report this bug so that Shopify devs can hear from us? This bug is making theme development 2x what it should be.

RustyDev avatar Oct 10 '19 16:10 RustyDev

Shopify Support is the only way to report this specific issue.

tanema avatar Oct 10 '19 16:10 tanema

Hey @tanema,

Do you know if there is any update on this one? Have been experiencing this one constantly for the last ~6 months or so now. If not does anyone have any hacks or the like to to get around this temporarily?

dan-gamble avatar Apr 26 '20 10:04 dan-gamble

Ditto, getting this freqently. Any ideas?

adamchipperfield avatar Dec 21 '20 19:12 adamchipperfield

Hi all,

I have the same problem every time I use the DEPLOY command.

Anyone have any news? Any trick to get around this?

IllidanMalar avatar Feb 18 '21 15:02 IllidanMalar

Hi, Same issue here! The deploy command creates many problems...

AlexSnow98 avatar Feb 19 '21 15:02 AlexSnow98