Uploading CSS file (Asset API) from Heroku succeeds, but same file hosted on Render.com causes 422

patrickb
Shopify Expert
47 0 11

Hi.


I have two identical CSS files I am uploading via the Shopify asset API.

 

Shopify allows the first (hosted on Heroku) to be uploaded successfully.

 

But when trying the second (hosted on Render.com), it complains and gives a 422 with the following error:
'https://app.getrecipekit.com/app_extensions/development_app_extension/assets/recipekit.css is not a valid file.'

 

What can I do here? Most of the response headers are the same, no big encoding differences or anything.


Here are the two files:

Heroku (which works): https://my.recipekit.app/app_extensions/development_app_extension/assets/recipekit.css

Render (422 error): https://app.getrecipekit.com/app_extensions/development_app_extension/assets/recipekit.css

 

Any ideas here?

Recipe Kit - Easy, beautiful & SEO friendly recipe cards on your Shopify blog posts - https://apps.shopify.com/recipe-kit
Wait.li - Product Waiting Lists for Shopify - https://apps.shopify.com/product-waiting-lists
Replies 4 (4)

Alan
Shopify Staff
129 15 24

Hey @patrickb - thanks for getting in touch. I took a quick look at those .css files you shared and I definitely see what you mean, they're both formatted similarly. I can't see why one would upload and the other wouldn't - very odd. 

 

Would you be able to share a Request ID (X-Request-Id) from the response header for one of the failed calls where you received the 422 error? Using that I can take a look at the original body of the request in our logs here as well as some other metadata that could help us diagnose what might be happening here. 

 

Hope to hear from you soon - thanks for bringing this up to us, definitely an odd situation for sure based on what I can see at the moment. 

 

Cheers

Alan | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

patrickb
Shopify Expert
47 0 11

Hi Alan!

 

4dc5896e-b4eb-45d6-b28e-fb8c20261df2 is the request id for the failing file.

 

Let me know! Thanks so much.

Recipe Kit - Easy, beautiful & SEO friendly recipe cards on your Shopify blog posts - https://apps.shopify.com/recipe-kit
Wait.li - Product Waiting Lists for Shopify - https://apps.shopify.com/product-waiting-lists
patrickb
Shopify Expert
47 0 11

Hi @Alan any update on this? This is breaking functionality in my app.

Recipe Kit - Easy, beautiful & SEO friendly recipe cards on your Shopify blog posts - https://apps.shopify.com/recipe-kit
Wait.li - Product Waiting Lists for Shopify - https://apps.shopify.com/product-waiting-lists
Alan
Shopify Staff
129 15 24

Hey Patrick - thanks for sharing that request ID and for your patience here. I was able to take a look at the logs on our end and verified that the 422 error was appearing there as well, very odd. Some additional information I was able to retrieve on our end is that the file appeared to contain some invalid characters as well, but generally, that shouldn't prevent the file from being uploaded. 

 

I was also able to do some further looking into in my testing environment and encountered a similar issue with a standard CSS template file returning that "invalid file/invalid character" error when I made a Put Request through the REST Admin API to upload that basic CSS template file. 

 

Would you be able to share the full request body of the Put request you're making along with the response ID you previously shared in an email through our "Report an Issue" form? Since we may need to dig into some more sensitive information (like store details, etc.), it would be best to reach out there so that we can take a deeper look at this with you. 

 

Hope to hear from you soon!

Alan | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog