Assest API SCSS file

Excursionist
18 1 0

I am trying to upload scss.liquid file using api. it gets uploaded to theme successfully but when try to load it it gives error regarding MIME type. 


"because its MIME type ('text/plain') is not a supported stylesheet MIME type"

 

When i open its public url in browser i got -> "Failed to compile SCSS file".

 

When i go to theme -> edit code and save that particular file without making any changes it gets loaded successfully and works perfectly fine.

 

 Any Suggestions would be great on this.

0 Likes
Shopify Partner
390 12 36

Hey there,

 

Could it be the encoding of the file an issue? So then when you open it in the Shopify's code editor and save it, the encoding is corrected?

CTO, Co-founder of nemo.ai
0 Likes
Excursionist
18 1 0

I have already added encoding 

Please see my gist for the same files. 

 

https://gist.github.com/little-isaac/df59ad5cf0f3240388fe242adeab071a

0 Likes
Shopify Staff
Shopify Staff
973 6 130

Hey @milindpatel,

 

Would you be able to try creating the asset and send me the X-Request-Id from the response headers? That with the gist you provided should give me a clearer picture of what's going on.

 

Cheers.

0 Likes
Excursionist
18 1 0

1bfcf1ef-e14f-4457-8610-e547b956abc9
This is the request id.

 

I have also added full headers in gist  https://gist.github.com/little-isaac/df59ad5cf0f3240388fe242adeab071a

You can check it as well.

 

Thank you.

0 Likes
Excursionist
18 1 0

@Alex @SSvinarciuc Any Update on this? It's been long time. 

0 Likes
Shopify Staff
Shopify Staff
973 6 130

Hey @milindpatel,

 

Sorry for the wait. Have you tried removing the `@charset` expression from the top of the file? I'm not very well versed in themes, but there definitely seems to be some kind of encoding issue on our end which I can see in my logs (we're expecting something on our end to be a byte string but it's UTF-8 instead). That doesn't mean you need to set another charset necessarily, so just try without that for now.

 

Cheers.

0 Likes
Excursionist
18 1 0

Hey @Alex,

 

Sorry for delay reply i got few emergency task in list.


d0f060de-2e78-4369-9440-b2a3573e12aa
request Id - wihtout charset result are still same. 

 

Charset thing is suggested by one of my friend.


You can check updated headers.

0 Likes
Excursionist
18 1 0

Hey @Alex

Let's Solve this ASAP as we are waiting to launch our newly features in store.

If it has any alternate solution to upload scss file then it will be great.

 

Thank you.

0 Likes
Shopify Staff
Shopify Staff
973 6 130

Sorry for the delay. I'm not having too much luck on my end determining the exact cause of the issue. Would you mind providing me with a gist of the raw request you're making? Something I could use to replicate myself would be most ideal in this case if possible.

 

Cheers.

0 Likes