BulkOperation - Internal Server Error

Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
624 102 119

Hi everyone,

 

I have investigated into the errors you have been seeing, and here are my findings:

 

@Yaro_Trot :

 

You need enclose the date time value in your `query: "updated_at:>X" argument with single quotes. So update your Bulk Operations query from this:

 

query:"""
    {
      inventoryItems(query: "updated_at:>2020-04-04 00:00:00"){

to this:

query:"""
    {
      inventoryItems(query: "updated_at:>'2020-04-04 00:00:00'"){

and your errors should go away.

 

@kpusmo ,

 

From looking through our internal logs, it appears this Bulk Operation request fails with the message of "Variable id of type ID! was provided invalid value". This is a strange error that I have not encountered before. I would first recommend removing the instances of "gid: id" from your query and replacing them with just "id" as I believe this may be interfering with how Shopify is querying the data. If this does not improve the query, I would check to see if the store has a Product or Variant set-up incorrectly with either an invalid or a null ID.

 

@PankajAswal ,

 

From looking through our internal logs, it looks like this Bulk Operation request failed due to a performance issue on Shopify's back end. We have made some fixes on our end just recently, so you simply just re-try this request at a later time and it should work.

 

Let me know if you have any questions, comments, or concerns. 

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

0 Likes
Highlighted
New Member
6 0 0

Hi @hassain,

Changing

gid: id

to simple id in products helped. All other ids remained aliased to gid and it works. Thank you very much for your help.

 

Cheers

0 Likes
Highlighted
Shopify Partner
12 0 2

Hi. I'm also getting the Internal server error in bulk operations, but on Orders queries:

https://community.shopify.com/c/Shopify-APIs-SDKs/GraphQL-API-orders-import-error-INTERNAL-SERVER-ER...

0 Likes
Highlighted
New Member
2 0 0

Hi @hassain 

tried again but no luck .

 

Shopify Dev Store

RESPONSE :

[errorCode] => INTERNAL_SERVER_ERROR
[createdAt] => 2020-05-06T14:19:19Z

[objectCount] => 31512

 

X-Request-ID : 3bc76275-8f1a-4517-a942-9da3c454ea36

-------------------------------------------------------------------------------

tried on paid store as well

Shopify Professional Store

RESPONSE :

[errorCode] => INTERNAL_SERVER_ERROR
[createdAt] => 2020-05-06T14:44:51Z

[objectCount] => 19142

 

X-Request-ID : 066e74c9-8e04-4e9c-9e57-d4f12f62d292

---------------------------------------------------------------------------

 

Please check as we are waiting to push bulk api into our production ,

Thanks

0 Likes
Highlighted
New Member
1 0 0

Hey @hassain,

 

we get an Internal Server Error shortly after executing the BulkOperation to query all collections at ultrabasic-com.myshopify.com.

Here is the log of the operation:
--
{
id: 'gid://shopify/BulkOperation/305889402',
status: 'FAILED',
errorCode: 'INTERNAL_SERVER_ERROR',
createdAt: '2020-05-22T16:23:27Z',
completedAt: null,
objectCount: '7529682',
fileSize: null,
url: null,
partialDataUrl: null
}
--

The same with another attempt gid://shopify/BulkOperation/302153850.

Please tell us how we can execute this operation successfully.

 

Kinds regards,

Ultrabasic Team

0 Likes
Highlighted
New Member
1 0 0

Hello @hassain,

 

We are receiving this error for past two weeks.

Example query ID: gid://shopify/BulkOperation/8263794739

Query document:

{
  orders(query: "updated_at:>'2020-02-06T13:21:06Z' AND updated_at:<='2020-02-13T13:21:06Z'") {
    edges {
      node {
        id
        createdAt
        updatedAt
        discountCode
        tags
        customer {
          id
        }
        lineItems {
          edges {
            node {
              id
              product {
                id
              }
              variant {
                id
              }
            }
          }
        }
        totalPriceSet {
          shopMoney {
            amount
          }
        }
      }
    }
  }
}

The store in questions has 100k+ orders on that week (imported during migration, so they are on the same day)

 

Previously we were able to successfully run this query without pagination implemented on our side, but 2 weeks ago something changed.

Regards,
Evgeny

0 Likes
Highlighted
New Member
5 0 0

Hi @hassain , I'm also getting this error when I try to do a bulk request on orders. This is my mutation:

mutation {
  bulkOperationRunQuery(
  query: """
	{
    orders{
        edges {
            node {
                id
                name
                email
                phone
                createdAt
                updatedAt
                closedAt
                processedAt
                cancelledAt
                customer {
                    id
                }
                billingAddress {
                    id
                }
                shippingAddress {
                    id
                }
                currencyCode
                totalPriceSet {
                    shopMoney {
                    amount
                    }
                }
                subtotalPriceSet {
                    shopMoney {
                    amount
                    }
                }
                totalDiscountsSet {
                    shopMoney {
                    amount
                    }
                }
                totalTaxSet {
                    shopMoney {
                    amount
                    }
                }
                displayFinancialStatus
                displayFulfillmentStatus
                note
                cancelReason
                discountCode
        
                lineItems {
                    edges {
                        node {
                            id
                            name
                            product {
                                id
                            }
                            variantTitle
                            variant {
                                id
                            }
                            sku
                            vendor
                            quantity
                            unfulfilledQuantity
                            fulfillableQuantity
                            refundableQuantity
                            discountedTotalSet {
                                shopMoney {
                                    amount
                                }
                            }
                            originalTotalSet {
                                shopMoney {
                                    amount
                                }
                            }
                            totalDiscountSet {
                                shopMoney {
                                    amount
                                }
                            }
                            unfulfilledDiscountedTotalSet {
                                shopMoney {
                                    amount
                                }
                            }
                            unfulfilledOriginalTotalSet {
                                shopMoney {
                                    amount
                                }
                            }

                            fulfillmentStatus            
                            fulfillmentService {
                                serviceName
                            }
                        }
                    }
                }
                customerLocale
                tags
                confirmed
            }
        }
    }
}
"""
) {
    bulkOperation {
      id
      status
    }
    userErrors {
      field
      message
     }}}

I get an 

INTERNAL_SERVER_ERROR

when I try to retrieve the data a few minutes later.

0 Likes