Not all images imported using GraphQL

Highlighted
Tourist
10 0 2

Hi,

 

We are using the GraphQL API to create hundreds of products though an app, using the ProductCreateMutation. Randomly we don't get all the images of the products imported, but if we run the import process again then it works. This behaviour is extremely random and we cannot find any kind of pattern or problems in our side. Some clue or hint about what can be happening? Thanks!

0 Likes
Highlighted
Shopify Staff
Shopify Staff
582 70 127

Hey @arsuceno,

 

The most likely scenario is that timeouts occurred when trying to download the images, so those images weren't attached to the product. If you provide the request_id from the response headers of a call where images fail to attach, I can use our logs to confirm timeouts.  Our developers are aware of and actively working on a fix for an issue where GraphQL doesn't return the expected error messages in cases like this.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
Tourist
10 0 2

Hi,

 

I have a lot of examples from drysass.myshopify.com . In this case I even get an error response from your side (that's very unlikely):

Failed to import: 4639702-Linneda shirt. There were errors with GraphAPI request: Internal error. Looks like something went wrong on our end.
Request ID: 16f7b15e-25f5-4ef3-9a7f-174225a4cf92 (include this in support requests).

 

From your answer it seems that we are taking too long to serve the images (even if there are not errors at all), can that be the reason of the missing images problem?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
582 70 127

Hey @arsuceno,

 

Yes that's exactly correct. I checked out logs for the request_id you sent, and it looks like 2 images timed out:

 

"Image https://image.frontsystems.no/1500/0/4d607931-0e65-4a2c-8b7d-bbb8c7ec8714/2aa8db33-6281-4e54-a9d2-fae4e9d41a09.jpg failed to download. - timeout reached. Make sure file can be downloaded successfully.", 

"Image https://image.frontsystems.no/1500/0/4d607931-0e65-4a2c-8b7d-bbb8c7ec8714/8a79df75-cc61-43c0-ba62-2f5851af0a9a.jpg failed to download. - timeout reached. Make sure file can be downloaded successfully."

The internal error message you got isn't actually related to the image timeout, this is a different error related to an internal process that failed when creating the variant. Errors like this should be extremely rare like you mentioned, and in this case the recommend course of action is to retry the request. 

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes