Shopify / cli

Build apps, themes, and hydrogen storefronts for Shopify
https://shopify.dev
MIT License
404 stars 122 forks source link

[Bug]: Incorrect JavaScript Asset URLs for Theme App Extensions #3488

Closed daviareias closed 6 months ago

daviareias commented 6 months ago

In which of these areas are you experiencing a problem?

Extension

Expected behavior

The expected behavior is that all stores serve the correct JavaScript asset link for theme app extensions, which should be: https://cdn.shopify.com/extensions/10bde2b1-85da-42d0-80be-c275218cacdc/0.1.0/assets/antispy.js

example page serving right asset:

https://scalaapps.myshopify.com (use password 12345)

Actual behavior

In some stores, an incorrect JavaScript asset URL is being served, leading to a 404 error as the asset does not exist. The incorrect URL being served is: https://cdn.shopify.com/extensions/10bde2b1-85da-42d0-80be-c275218cacdc/scala-anti-spy-0/assets/antispy.js

Store serving wrong asset:

https://multistorearg.com/

The version of the app being served is the same.

Verbose output

Since this is related to theme app extensions rather than a CLI command execution, the verbose output might not be applicable. However, any logs from Shopify's side regarding asset delivery failures would be helpful.

Reproduction steps

To reproduce the error:

1. Find a theme extension that has not been updated since may last year, you dashboard should show this on Shopify:

Screen Shot 2024-02-29 at 21 55 22

2. Inspect the page to find the script tag sourcing the JavaScript asset. (example page: https://multistorearg.com/)
3. Note the incorrect URL being served for the asset.
4. Compare it to the correct url being served in most stores (example page: https://scalaapps.myshopify.com, use password 12345)

Operating System

not applicable

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

not applicable

daviareias commented 6 months ago

Closing this, we just decided to update the app because otherwise we would have to wait for too long. This is probably only affecting theme extensions that have not been updated since simplifed deployment

sagar-ranglani commented 6 months ago

@daviareias What changes did you make with the app?

daviareias commented 6 months ago

@sagar-ranglani I deployed the exact same code using npm run shopify app deploy, Shopify them started serving the right link in every store.

If you don't have a copy of the code, you're pretty much out of luck I guess.

pd-anthonyg commented 6 months ago

@daviareias in that case the end users would need to re-enable the app embed block, right? For larger scale apps that's a real problem.

daviareias commented 6 months ago

@daviareias in that case the end users would need to re-enable the app embed block, right? For larger scale apps that's a real problem.

They don't need to renable the app, the problem is that Shopify is serving the wrong link. I'm going to reopen this, because I found out is actually affecting EVERY embedded app

avocadoslab commented 6 months ago

Lots of merchants/partners facing this issue and intensity is increasing day by day

https://community.shopify.com/c/shopify-apps/app-embed-extension-blocks-url-throwing-404/m-p/2469135

daviareias commented 6 months ago

Issue was fixed today

agrohs commented 5 months ago

What was fixed/what change does a developer need to make to have this work (and what are the correctly generate URLs supposed to look like format/pattern wise) - We seem to still be experiencing the issue w/ some of our apps.