-
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]: Images don't load with new CDN URL in theme dev environment (shopify theme dev) #1859
Comments
cc @Shopify/theme-developer-tools |
@Shopify/theme-code-tools |
hey @hedgehog90 thanks for reporting this, we have a team working on this. They've identified the root cause of the problem and are working on a fix. |
@Arkham Not sure if this is related to the bug, but if I try and load a section containing images with a ?sections=... AJAX call, all the images come back as |
btw, this affects all CDN files, including google fonts, etc. |
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. |
Is this still not fixed? |
@hedgehog90 no it isn't. I am still waiting for this solution so that I can continue with some changes to my project, as this is affecting the loading of some dependencies in the local environment. @Arkham any update on this? you said the dev team was working on this, almost a month ago. |
Hi @hedgehog90 @evilzebra-labs, I've tried to reproduce this issue on CLI 3.46.0 (released 2 days ago, which includes #1862) and can no longer reproduce the problem. If you're still facing this issue on 3.46.0, could you please run Thank you for reporting this. |
@karreiro thanks for the fast response... but I've made this:
and received the following request ids in the console: request_id: 1ab99189-6d5f-4e2b-9e7c-22ebb6e6b918 Besides that.... loading the dev site on the browser, only throw a bunch of this store is using the Dawn theme. all the network requests to these assets.. have the following URL format: I've made a test on another store, which uses a custom-made theme... and they are working just fine Not sure if this information will help you find the root cause... Later today, I'll try to clear the repo and start fresh.. to check is not a problem with the file structure |
quick update, I've deleted the complete folder.. and made a new "theme pull" for the store that is not working.. |
any news about this? |
Thank you, @evilzebra-labs, for reporting this issue. It has been fixed by #2105 and will be included in the upcoming CLI release. |
We've encountered a significant increase in 404 errors correlating directly with the appearance of /file/ in the URL paths across our Shopify site. Initially, our logs indicated a minor number of 404s, but following recent changes, these have escalated dramatically, specifically after /file/ was introduced into the URL structure. While Shopify CDN URLs containing /file/ are resolving as expected, any attempt to access URLs with /file/ on our actual site results in a 404 error. This issue suggests there might be a routing or path resolution problem within the Shopify environment when /file/ is included in the URL path. It's unclear whether this is due to a recent update or a change in the way Shopify handles static assets or URL routing. We have verified our theme and asset configurations to ensure no unintentional changes have been made that could contribute to this issue. Any insights or suggestions on how to resolve these unexpected 404 errors would be greatly appreciated. Is there a known issue with the handling of /file/ in URLs, or could there be a specific configuration required to support this path structure without resulting in 404s? |
Still not fixed. |
I have the same issue @karreiro |
👋 Hello everyone, Thank you for reporting. If you still facing this issue in the latest version of Shopify CLI (3.69.3). Please, report a new issue including your The legacy image proxy component has been replaced in September (after this issue was closed), so if you're still experiencing a similar scenario today, it's different problem than the one originally reported as we're not relying on the same implementation today, so sharing your Thanks again for reporting! |
Please confirm that you have:
In which of these areas are you experiencing a problem?
Theme
Expected behavior
New CDN URLs are being implemented for some Shopify stores it seems.
All images and asset URLs generated by the appropriate liquid filter used to have a prefix like:
//cdn.shopify.com/s/files/.../products/
But now, for some stores, they're like this:
/cdn/shop/products/
This brings with it additional problems which are already affecting many stores I've checked. I've detailed them in a separate issue in the Shopify Liquid repo, which gets little to no attention it seems:
Shopify/liquid#1708
If someone could get the attention of someone who can help, please link them to this issue.
However, this issue is specifically regarding the image assets loaded in shopify-cli dev.
A new CDN image URL looks like this:
/cdn/shop/files/the-name-of-your-image.jpg
Which the browser resolves to:
http://127.0.0.1:9292/cdn/shop/files/the-name-of-your-image.jpg
It would appear localhost will serve a 200 response but invalid image data so no image loads.
I've confirmed that some other theme devs have started experiencing this within the last 1-2 days.
However other assets like JavaScript and stylesheets and the like are served correctly through the new CDN URLs.
The only way to fix it currently is to prepend every
image_url
output withshop.url
Actual behavior
Images don't load.
Verbose output
Reproduction steps
You need to have a Shopify store that uses the new CDN URLs. It seems most stores are still using the old CDN URLs as mentioned earlier.
Operating System
Windows 11
Shopify CLI version (check your project's
package.json
if you're not sure)3.45.1
Shell
No response
Node version (run
node -v
if you're not sure)No response
What language and version are you using in your application?
No response
The text was updated successfully, but these errors were encountered: