Graph QL bulk Operation

keyur_choksi
Tourist
10 0 1

Hello Team,

We have an issues regarding graphQL bulk oeration (bulkOperationRunMutation).

We have tried this operation but it always shows Invalid input error.

 "code" => "BULK_MUTATION_USER_ERROR_CODE"
              "field" => null
              "message" => "Unexpected error - https://cdn.shopify.com/s/files/1/0564/2770/8615/files/stageUploadPath.json?v=1628588225 not valid for shop 56427708615, bucket bulk/"

can you ellaborate about "stagedUploadPath" this variable we are not clear what input/data this variable accepts !

Replies 15 (15)
keyur_choksi
Tourist
10 0 1

Hello @L_J_K 

We have also tried your .txt file via converting it to .jsonl.

Though it is givin us the same Unexpected file structure - expected JSONL Please see below.

{
	"data": {
		"bulkOperationRunMutation": {
			"bulkOperation": null,
			"userErrors": [{
				"code": "BULK_MUTATION_USER_ERROR_CODE",
				"field": null,
				"message": "Unexpected file structure - expected JSONL"
			}]
		}
	},
	"extensions": {
		"cost": {
			"requestedQueryCost": 10,
			"actualQueryCost": 10,
			"throttleStatus": {
				"maximumAvailable": 1000.0,
				"currentlyAvailable": 990,
				"restoreRate": 50.0
			}
		}
	}
}
keyur_choksi
Tourist
10 0 1

Hello @L_J_K 

Can you please get back for the last reply see below.

We have also tried your .txt file via converting it to .jsonl.

Though it is givin us the same Unexpected file structure - expected JSONL Please see below.

{
	"data": {
		"bulkOperationRunMutation": {
			"bulkOperation": null,
			"userErrors": [{
				"code": "BULK_MUTATION_USER_ERROR_CODE",
				"field": null,
				"message": "Unexpected file structure - expected JSONL"
			}]
		}
	},
	"extensions": {
		"cost": {
			"requestedQueryCost": 10,
			"actualQueryCost": 10,
			"throttleStatus": {
				"maximumAvailable": 1000.0,
				"currentlyAvailable": 990,
				"restoreRate": 50.0
			}
		}
	}
}
keyur_choksi
Tourist
10 0 1

Hello @L_J_K 

We have provided you the errors on almost 1-2 weeks ago and we have tried almost all your solutions though it is not succeeded.

Can you please get back ASAP for the last reply as we have urgent requirenments see below.

We have also tried your .txt file via converting it to .jsonl.

Though it is givin us the same Unexpected file structure - expected JSONL Please see below.

{
	"data": {
		"bulkOperationRunMutation": {
			"bulkOperation": null,
			"userErrors": [{
				"code": "BULK_MUTATION_USER_ERROR_CODE",
				"field": null,
				"message": "Unexpected file structure - expected JSONL"
			}]
		}
	},
	"extensions": {
		"cost": {
			"requestedQueryCost": 10,
			"actualQueryCost": 10,
			"throttleStatus": {
				"maximumAvailable": 1000.0,
				"currentlyAvailable": 990,
				"restoreRate": 50.0
			}
		}
	}
}

 

L_J_K
Shopify Staff
363 54 65

Hey @keyur_choksi 

Apologies for the delayed reply. To be clear, this is a client side issue. The error you are receiving is a client side error - this isn’t an error that can be investigated from Shopify’s side. In our logs - the client is passing invalid jsonl.  Invalid jsonl passed by the client would be exactly that - Invalid jsonl.

We have followed the tutorial step by step here, and we cannot replicate this unfortunately. The format of the jsonl file must match the GraphQL schema exactly. What you are passing when creating your Bulk Operation(documentation)  is not valid jsonl.

 

| API Support @ Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
keyur_choksi
Tourist
10 0 1

Hello @L_J_K ,
Thanks for your reply.

What do you mean by client side as we have tried same as  from documentation.
So
first we have tried all steps as per the documentation.
second we have generated same jsonl fine as per the documentation and it was not working.
third we passed same jsonl as you have provided us that is also  throwing the same invalid jsonl error.
and last you have told us that it may be due to a guzzle HTTP so we have tried via core PHP and curl though it is giving us the same error.

So how can we identify that which jsonl is valid as we have tried all jsonl which shopify provided.

Please let us know as it is quite urgent

keyur_choksi
Tourist
10 0 1

Hello @L_J_K ,
Good Morning,
Hope you are doing well !!

We have read your last email and follow this link :  https://help.shopify.com/en/questions/partners#/contact and select the new option Report an issue [BETA] to get the solution of our issue regarding "Unexpected file structure - expected JSONL".
We send email two times in this option but still we didn't get any solution in our issue, we are stuck here and waiting for the help.