Bulk operation returns internal server error

Highlighted
Shopify Partner
13 0 4

This works fine: 

'''
        mutation {
            bulkOperationRunQuery(
                query:"""
                    {
                        orders(
                            sortKey: CREATED_AT,
                            query: "processed_at:>=2020-01-01' processed_at:<=2020-01-02' test:false"
                        ) {
                            edges {
                                node {
                                    id
                                    customer {
                                         orders{
                                            edges {
                                                node{
                                                 createdAt
                                                 id
                                                }
                                              }
                                            }
                                         }
                                    lineItems {
                                        edges {
                                            node {
                                                id
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                """
            ) {
                bulkOperation {
                    id
                    status
                }
                userErrors {
                    field
                    message
                }
            }
        }'''

 

This does not:

'''
        mutation {
            bulkOperationRunQuery(
                query:"""
                    {
                        orders(
                            sortKey: CREATED_AT,
                            query: "processed_at:>='2020-01-01' processed_at:<='2020-01-02' test:false"
                        ) {
                            edges {
                                node {
                                    id
                                    customer {
                                         orders{
                                            edges {
                                                node{
                                                 createdAt
                                                 id
                                                }
                                              }
                                            }
                                         }
                                }
                            }
                        }
                    }
                """
            ) {
                bulkOperation {
                    id
                    status
                }
                userErrors {
                    field
                    message
                }
            }
        }'''

 
It returns: 

{'id': 'gid://shopify/BulkOperation/86454599782', 'status': 'FAILED', 'errorCode': 
'INTERNAL_SERVER_ERROR', 'createdAt': '2020-09-23T10:01:46Z', 'completedAt': None, 
'objectCount': '0', 'fileSize': None, 'url': None, 'partialDataUrl': None}

So it seems like we need to include line items in the query to get it working, which seems odd.

 

Any tips or is this a bug?

Best regards,
Developers at Funnel

1 Like
Highlighted
Shopify Staff
Shopify Staff
176 21 27

Hey @Funnel 

Can you grab the request id response header or the bulk query ID for the query that is throwing the server error?

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

1 Like
Highlighted
Shopify Partner
13 0 4

Hey @Kevin_A!

bulk query id:

{'id': 'gid://shopify/BulkOperation/86454599782', 'status': 'FAILED', 'errorCode': 
'INTERNAL_SERVER_ERROR', 'createdAt': '2020-09-23T10:01:46Z', 'completedAt': None, 
'objectCount': '0', 'fileSize': None, 'url': None, 'partialDataUrl': None}

 

0 Likes
Shopify Partner
13 0 4

Hey @Kevin_A 

Any news regarding this?

/Antonio 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
176 21 27

Hey @Funnel 

Your issue is being looked at by our dev team. I will be monitoring the situation and updating you as new information comes to light. 

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

1 Like
Highlighted
Shopify Expert
1 0 0

Hi @Kevin_A 

We are having the same issue:

{"errorCode":"INTERNAL_SERVER_ERROR","completedAt":null,"url":null,"partialDataUrl":null,"id":"gid://shopify/BulkOperation/129712488584","fileSize":null,"status":"FAILED","objectCount":"28040","createdAt":"2020-09-28T21:14:04Z"} 

 

This is from a simple query:

  collections {
    edges {
      node {
        id
        storefrontId
        title
        handle
      }
    }
  }

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
176 21 27

Hey @DotDev 

I can run the query you posted without issue so it is likely an unrelated issue to the OPs. In your case it may be due to something like a timeout, so I would suggest opening a new post and including the bulk operation ID. 

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

1 Like
Highlighted
Shopify Partner
13 0 4

HI @Kevin_A

Any news?

1 Like
Highlighted
Shopify Staff
Shopify Staff
176 21 27

Hey @Funnel 

No updates yet. I will update this post once there is movement on the issue. 

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

0 Likes