Skip to content
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]: Theme App Extension - Asset CDN link random UUID #4567

Closed
2 tasks done
AlvaApps opened this issue Oct 2, 2024 · 4 comments
Closed
2 tasks done

[Bug]: Theme App Extension - Asset CDN link random UUID #4567

AlvaApps opened this issue Oct 2, 2024 · 4 comments
Labels
Area: @shopify/theme @shopify/theme package issues State: Waiting for feedback Type: Bug Something isn't working

Comments

@AlvaApps
Copy link

AlvaApps commented Oct 2, 2024

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Extension

Expected behavior

Running npm app deploy should release a new version of the theme app extension. If asset files are present they should be uploaded to the following url pattern "https://cdn.shopify.com/extensions/$EXTENSION_ID/$EXTENSION_VERSION/assets/$FILE_NAME"

For example where:

extension id = 1234_5678_9123_4567
extension version = 0.0.1
file name = extension.js

The CDN URL should be https://cdn.shopify.com/extensions/1234_5678_9123_4567/0.0.1/assets/extension.js

Actual behavior

The CDN link is of pattern "http://cdn.shopify.com/extensions/$RANDOM_UUID/0.0.1/assets/extension.js"

Verbose output

n/a

Reproduction steps

  1. Create a theme app extension and include an empty JS file ( extension.js) in the assets folders
  2. In the liquid file add <script src="{{ 'extension.js' | asset_url }}" defer></script>
  3. npm run deploy
  4. Install the theme app extension on a page and view source. Locate the the CDN link and compare the link to the extension id found in the .env file

Operating System

OSX

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

3.66.0

Shell

bash

Node version (run node -v if you're not sure)

22.6.0

What language and version are you using in your application?

js

@AlvaApps AlvaApps added the Type: Bug Something isn't working label Oct 2, 2024
@karreiro karreiro added the Area: @shopify/theme @shopify/theme package issues label Oct 4, 2024
Copy link
Contributor

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

@AlvaApps
Copy link
Author

still relevant

@aswamy
Copy link
Contributor

aswamy commented Nov 26, 2024

Running npm app deploy should release a new version of the theme app extension. If asset files are present they should be uploaded to the following url pattern "https://cdn.shopify.com/extensions/$EXTENSION_ID/$EXTENSION_VERSION/assets/$FILE_NAME"

Hey @AlvaApps, do you know where it was said that the URL should conform to the standard above? The uuid chosen does seem to be random characters chosen during the creation of the app, but not sure if this is a request or a bug.

EDIT: Did a bit more poking around and a new UUID is generated every time we generate a new version for the app. So it isn't chosen "during the creation of the app" as previously suggested, but does stay consistent within the same version.

@AlvaApps
Copy link
Author

Hi @aswamy

After checking again, this is not stated anywhere I had just made an assumption. Please close issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: @shopify/theme @shopify/theme package issues State: Waiting for feedback Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants