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]: Asset must have a value or attachment #5010

Closed
2 tasks done
alexr8 opened this issue Dec 3, 2024 · 13 comments · Fixed by #5015
Closed
2 tasks done

[Bug]: Asset must have a value or attachment #5010

alexr8 opened this issue Dec 3, 2024 · 13 comments · Fixed by #5015
Assignees
Labels
Area: @shopify/theme @shopify/theme package issues Severity: 3 Normal Severity Type: Bug Something isn't working

Comments

@alexr8
Copy link

alexr8 commented Dec 3, 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?

Theme

Expected behavior

I updated my shopify cli to the latest version (3.71.0) via Homebrew. Worth noting the following:

  • I uninstalled Homebrew and reinstalled it so that it ran properly on my Mac (I had time machined from an intel mac to a silicon mac about 6 months ago, meaning my homebrew was using Rosetta so I reinstalled it at Homebrews suggestion).
  • However I had run the shopify CLI with my theme for many months on my new mac with no issues. I cannot remember if my previous install of the Shopify CLI was via npm or via homebrew unfortunately.

I ran shopify theme dev which should have synced my local theme to my development theme, as it had done before my CLI upgrade.

Actual behavior

When i tried to run my usual shopify theme dev command to continue working on my store, i got the error:

Failed to perform the initial theme synchronization.
Asset must have a value or attachment 

I've not had issues before this upgrade. This is a custom theme, that was initially based on Dawn but then customised heavily.

I have since tried the following:
shopify theme push the theme - same error
shopify theme delete then shopify theme dev - same error

Below is the output of shopify theme dev with a verbose flag once i've deleted my development theme and tried shopify theme dev again.

Verbose output

Verbose output
See attached file above - character limit not long enough.

Reproduction steps

  1. Install latest shopify cli version via homebrew
  2. Run shopify theme dev on an existing development theme

Operating System

Mac OS 14.6.1

Shopify CLI version (shopify --version)

3.71.0

Shell

VSCode 1.95.3 terminal, and iTerm2 3.5.10

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

v23.3.0 (using the homebrew version of node)

What language and version are you using in your application?

No response

@alexr8 alexr8 added the Type: Bug Something isn't working label Dec 3, 2024
@alexr8
Copy link
Author

alexr8 commented Dec 3, 2024

One further thing to note, i also tried deleting all files in my asset folder, and running shopify theme delete then shopify theme dev so it had no assets to upload, and i still got the same error of Asset must have a value or attachment .

@victor-roswell
Copy link

I am having the same exact issue.

@JasonHassold
Copy link

I'm also having this issue 🙃

@KelseyCooper
Copy link

Same issue here.

@graygilmore
Copy link
Contributor

Thank you for the report! We're fairly confident this is an issue when the CLI encounters an empty file that it tries to upload. We'll work on getting a patch out soon but in the mean time you can find all of your empty files by running the following inside your theme folder:

find . -type f -empty

@graygilmore graygilmore self-assigned this Dec 3, 2024
@alexr8
Copy link
Author

alexr8 commented Dec 3, 2024

I can confirm that I had two empty files in my theme - one .liquid file in /sections and one .js file in /assets. Adding in a /* */ comment in the js file, and {% comment %} {% endcomment %} in the liquid file was all it needed to get it working, without downgrading the version (will tidy up those blank files in due course).

@JasonHassold
Copy link

Can confirm I had 1 empty file as well

@frandiox
Copy link
Contributor

frandiox commented Dec 4, 2024

This version of the CLI should have it fixed, in case you need it before the next release 🙌

@jarnanchen
Copy link

anyone still having this even on the latest version?

@graygilmore
Copy link
Contributor

This patch was not included in the most recent release but should be bundled with a release very soon.

@jvlvl-z
Copy link

jvlvl-z commented Dec 6, 2024

Removing the empty files did the job but do developers even test these updates? It's literally an issue as soon as you run shopify theme dev. It's not tucked away.

@devinenoise
Copy link

Yike hot fix ASAP guys

@graygilmore
Copy link
Contributor

Hey folks! Thanks for your patience. This has been patched in 3.71.4.

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 Severity: 3 Normal Severity Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants