Get Assets contains illegal characters

Nico4
Shopify Expert
15 0 3

On the Boundless Shopify theme every time i make GET ASSETS reauest the following on this specific file contains illegal caractere.

Note the theme is fresh forn install, untouched. I use Nodejs https://github.com/MONEI/Shopify-api-node

This only happen on this theme file as far as I can tell.

Is the file really containing characters on the Shopify side or ???

The content_type seems to be wrong: content_type: 'application/octet-stream', other working files show this type: content_type: 'text/x-liquid'.

{ key: 'snippets/product-grid-item.liquid ',
  public_url: null,
  attachment: 'PGRpdiBjbGFzcz0icHJvZHVjdC1pdGVtIGdyaWRfX2l0ZW0ge3sgZ3JpZF9p\ndGVtX3dpZHRoIH19Ij4KICA8ZGl2IGNsYXNzPSJwcm9kdWN0LWl0ZW1fX2xp\nbmstd3JhcHBlciI+CiAgICA8YSBjbGFzcz0icHJvZHVjdC1pdGVtX19saW5r\nIHslIGlmIHByb2R1Y3RfaW1hZ2Vfc3BhY2luZyAlfSBwcm9kdWN0LWl0ZW1f\nX2ltYWdlLS1tYXJnaW5zeyUgZW5kaWYgJX0iIGhyZWY9Int7IHByb2R1Y3Qu\ndXJsIHwgd2l0aGluOiBjb2xsZWN0aW9uIH19Ij4KCiAgICA8c3BhbiBjbGFz\ncz0iaW1hZ2Utd3JhcHBlciI+CiAgICAgIHslIGlmIHByb2R1Y3QuZmVhdHVy\nZWRfaW1hZ2Uuc3JjID09IGJsYW5rICV9CiAgICAgICAgPGltZyBzcmM9Int7\nIHByb2R1Y3QuZmVhdHVyZWRfaW1hZ2Uuc3JjIHwgaW1nX3VybDogJzEwMjR4\nJyB9fSIgYWx0PSJ7eyBwcm9kdWN0LmZlYXR1cmVkX2ltYWdlLmFsdCB8IGVz\nY2FwZSB9fSI+CiAgICAgIHslIGVsc2UgJX0KICAgICAgICA8bm9zY3JpcHQ+\nCiAgICAgICAgICA8aW1nIGNsYXNzPSJwcm9kdWN0LWl0ZW1fX2ltYWdlLW5v\nLWpzIiBzcmM9Int7IHByb2R1Y3QuZmVhdHVyZWRfaW1hZ2Uuc3Jj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ScgfCB0IH19CiAgICAgICAgICA8L3NwYW4+CiAgICAg\nICAgeyUgZW5kaWYgJX0KICAgICAgPC9zcGFuPgogICAgPC9hPgogIDwvZGl2\nPgo8L2Rpdj4K\n',
  created_at: '2018-04-05T17:04:13-04:00',
  updated_at: '2018-04-05T17:04:13-04:00',
  content_type: 'application/octet-stream',
  size: 3879,
  theme_id: 12253921374,
  warnings: 
   [ '"snippets/product-grid-item.liquid " contains illegal characters' ] }

 

0 Likes
Josh
Shopify Staff
Shopify Staff
1131 82 191

Hey Nico, 

What are you doing with the contents of the asset after you retrieve it? It sounds like there may be something else going on here aside from just a GET for an asset.

I've installed the Boundless theme myself and used an HTTP client to get the 'snippets/product-grid-item.liquid' asset without issue, and the content_type in the response is 'text\/x-liquid' as well. So I have been unable to replicate this with a fresh theme installation.

0 Likes
manuelmontoya
Tourist
5 0 2

You can find the illegal characters with:

     grep -P "[\x80-\xFF]" ./my-file.liquid

  in my case it was the line:

<input type="checkbox" id="45n_4" value="✓" name="foo">

The check mark: 

0 Likes