Internal Server Error on bulkOperationRunMutation

leeeee
Tourist
4 0 1

HI. I was trying bulkOperationRunMutation. It returned error as below

{
  "errors": [
    {
      "message": "Internal error. Looks like something went wrong on our end.\nRequest ID: 0511cdaa-9010-4989-8637-c01ca3ccac46 (include this in support requests).",
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "requestId": "0511cdaa-9010-4989-8637-c01ca3ccac46"
      }
    }
  ]
}

Before this, I made my first success on this bulk update without any trouble. 

my query when I got this error:

mutation {
  bulkOperationRunMutation(
    mutation: "mutation call($input: ProductInput!) { productUpdate(input: $input) { product {id title variants(first: 10) {edges {node {id title inventoryQuantity }}}} userErrors { message field } } }",
    stagedUploadPath: "tmp/38045089923/bulk/3410f17e-e752-4c4e-85c2-2ca6a49dcab9/bulkMutation") {
    bulkOperation {
      id
      url
      status
    }
    userErrors {
      message
      field
    }
  }
}

 

0 Likes
leeeee
Tourist
4 0 1

Me again.

I kinda figured out what makes this error. It was the length of the data. I tried removing the character of the descriptionHtml one by one, and finally got the threshold. 

But I still don't know the exact numbers of characters which causes internal error. 
It can be whole jsonl length, or just a data.

Does anyone know what's going on on Shopify's end?

 

UPDATE

oh, I thought I found out the reason like above, but it wasn't. I found my jsonl of the product had metafields array of null, "metafields:[]".

I resolved metafields to be attached correctly, and now errors are gone. 

 

UPDATE 2

null metafields weren't the issue... Some products, which I could upload fine using bulk mutation, turned out to be failed when I just removed some characters, not adding.
I'm lost. Wish I could debug deeper.

0 Likes
awwdam
Shopify Staff
Shopify Staff
137 13 10

Hey @leeeee - just wanted to touch base here with you quickly to see if you are still facing issues with this functionality? If so would you be able to share a more recent response, either the error like in this post, or an x-request-id header if you are logging these? I would happy to take a closer look, and pass on any insights I can - Cheers. 

awwdam | 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

0 Likes
leeeee
Tourist
4 0 1

Hi @awwdam  , thank you for your reply.

Yes, I'm still facing the issue. It's not all the time though. And it seems to depend on the contents inside of the jsonl. Once I changed the descriptionHtml (reduced / added some characters ) and it passed.
I can't figure out the core reason.

Here's the latest request and its response

{ "query" : "mutation {
  bulkOperationRunMutation(
    mutation: \"\"\"
    mutation call($input: ProductInput!) { productUpdate(input: $input) {product {id variants(first: 25){edges { node { id sku title } }}} userErrors { field message }}
    }\"\"\",
    stagedUploadPath: \"tmp/38045089923/bulk/4ad3f7a1-6c02-4614-9daa-b2495c6f4aa8/bulkMutation_20210813175926\") {
    bulkOperation {
      id
      url
      status
    }
    userErrors {
      message
      field
    }
  }
}"}

 

{
	"errors" : 
	[
		{
			"extensions" : 
			{
				"code" : "INTERNAL_SERVER_ERROR",
				"requestId" : "467c5e1e-8634-4c11-a97c-aa53e0738497"
			},
			"message" : "Internal error. Looks like something went wrong on our end.\nRequest ID: 467c5e1e-8634-4c11-a97c-aa53e0738497 (include this in support requests)."
		}
	]
}

 

0 Likes
awwdam
Shopify Staff
Shopify Staff
137 13 10

Hey @leeeee,

Thanks again for sharing more info, and for your patience waiting on my reply here. I took quite some time to dig in from a few directions, and couldn't find anything specifically out of the ordinary.

I can say that this type of "INTERNAL_SERVER_ERROR" is to be expected, and something we have documented specifically for bulkOperationsRunMutation. This indicates when an operation couldn't be completed, and the next step would be running this operation again, or building in a programatic retry into your app based on this possible outcome - here are some insights on managing operation failures. 

- Cheers!

awwdam | 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

0 Likes