stagedUploadsCreate error on a specific store

Good morning everyone,

I am experiencing an issue when I try to run a mutation after a stagedUploadsCreate step.

The error is the following:

{
    "_logLevel": "info",
    "msg": "data",
    "data": {
        "bulkOperationRunMutation": {
            "bulkOperation": null,
            "userErrors": [
                {
                    "message": "The JSONL file could not be found. Try uploading the file again, and check that you've entered the URL correctly for the stagedUploadPath mutation argument.",
                    "field": null,
                    "code": "NO_SUCH_FILE",
                    "__typename": "BulkMutationUserError"
                }
            ],
            "__typename": "BulkOperationRunMutationPayload"
        }
    },
    "_tags": [
        "log",
        "info"
    ]
}

but when I look at the logs of the stagedUploadsCreate step, the file seems to exist

{
    "_logLevel": "info",
    "msg": "data",
    "data": {
        "stagedUploadsCreate": {
            "userErrors": [],
            "stagedTargets": [
                {
                    "url": "https://shopify-staged-uploads.storage.googleapis.com/",
                    "resourceUrl": null,
                    "parameters": [
                        {
                            "name": "Content-Type",
                            "value": "text/jsonl",
                            "__typename": "StagedUploadParameter"
                        },
                        {
                            "name": "success_action_status",
                            "value": "201",
                            "__typename": "StagedUploadParameter"
                        },
                        {
                            "name": "acl",
                            "value": "private",
                            "__typename": "StagedUploadParameter"
                        },
                        {
                            "name": "key",
                            "value": "tmp/62403641563/bulk/8ea51374-d78e-4d1a-a41c-a51012994718/update-file.jsonl",
                            "__typename": "StagedUploadParameter"
                        },
                        {
                            "name": "x-goog-date",
                            "value": "20230713T070206Z",
                            "__typename": "StagedUploadParameter"
                        },
                        {
                            "name": "x-goog-credential",
                            "value": "merchant-assets@shopify-tiers.iam.gserviceaccount.com/20230713/auto/storage/goog4_request",
                            "__typename": "StagedUploadParameter"
                        },
                        {
                            "name": "x-goog-algorithm",
                            "value": "GOOG4-RSA-SHA256",
                            "__typename": "StagedUploadParameter"
                        },
                        {
                            "name": "x-goog-signature",
                            "value": "64e8578ef88effbca24b18ffad79841c651b54857152b106bbbaa31ead311239d8ed232d7116413b80936a82d71b0acfba953ffa93a5dbb79d2cbd189b928f3a530b2ed00679f2d43c8695077049c8076e601e961211558f3b02e4fbbc206b9357e28da8ef25dcb77f81203907b2c79106f1c427f58e6660c5ce26c7a1c2b6ca5b970b73daac3beb5f0b2c294a21eb647df3a96212882fb7ebfb628651518c408f4809ed0739ff32c4b03b47a948160f1dee205d4ecd766dd17815ce5e31b81cd11b3f5176689b8fda57cbc16b73544e154518430d4bfe014410206064670e603d17f5b8900ff1f3e5aa7b1bc1ee5628fb94255c4251eacbb169e1194daa3099",
                            "__typename": "StagedUploadParameter"
                        },
                        {
                            "name": "policy",
                            "value": "eyJjb25kaXRpb25zIjpbeyJDb250ZW50LVR5cGUiOiJ0ZXh0XC9qc29ubCJ9LHsic3VjY2Vzc19hY3Rpb25fc3RhdHVzIjoiMjAxIn0seyJhY2wiOiJwcml2YXRlIn0sWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsMSwyMDk3MTUyMF0seyJidWNrZXQiOiJzaG9waWZ5LXN0YWdlZC11cGxvYWRzIn0seyJrZXkiOiJ0bXBcLzYyNDAzNjQxNTYzXC9idWxrXC84ZWE1MTM3NC1kNzhlLTRkMWEtYTQxYy1hNTEwMTI5OTQ3MThcL3VwZGF0ZS1maWxlLmpzb25sIn0seyJ4LWdvb2ctZGF0ZSI6IjIwMjMwNzEzVDA3MDIwNloifSx7IngtZ29vZy1jcmVkZW50aWFsIjoibWVyY2hhbnQtYXNzZXRzQHNob3BpZnktdGllcnMuaWFtLmdzZXJ2aWNlYWNjb3VudC5jb21cLzIwMjMwNzEzXC9hdXRvXC9zdG9yYWdlXC9nb29nNF9yZXF1ZXN0In0seyJ4LWdvb2ctYWxnb3JpdGhtIjoiR09PRzQtUlNBLVNIQTI1NiJ9XSwiZXhwaXJhdGlvbiI6IjIwMjMtMDctMTRUMDc6MDI6MDZaIn0=",
                            "__typename": "StagedUploadParameter"
                        }
                    ],
                    "__typename": "StagedMediaUploadTarget"
                }
            ],
            "__typename": "StagedUploadsCreatePayload"
        }
    },
    "_tags": [
        "log",
        "info"
    ]
}

what could be the issue ?

Thank you in advance

Gianluca

Hey @gcannata-bc ! Thanks for sharing those details!

Taking a look at the above request, it looks like you’re getting the error on the bulkOperationRunMutation . The error message suggests that the JSONL file could not be found. This could potentially be due to missing the form step to upload the file. The form step request is what returns the staged uploads URL, which should be included in your bulk mutation.

Following this document contains all of the necessary steps, and there’s also a great CURL example that you can use as a template to make sure your JSONL file is uploaded properly.

Hope this help!

  • Kyle G.

It still does not work.

There are the steps I follow:

  1. mutation stagedUploadsCreate

QUERY

mutation stageUploadsCreate($input: [StagedUploadInput!]!) {
    stagedUploadsCreate(input: $input) {
        userErrors {
            field
            message
        }
        stagedTargets {
            url
            resourceUrl
            parameters {
                name
                value
            }
        }
    }
}

VARIABLES

{
    "input": {
        "resource": "BULK_MUTATION_VARIABLES",
        "filename": "/tmp/update-file.jsonl",
        "mimeType": "text/jsonl",
        "httpMethod": "POST"
    }
}

RESPONSE

{
    "data": {
        "stagedUploadsCreate": {
            "userErrors": [],
            "stagedTargets": [
                {
                    "url": "https://shopify-staged-uploads.storage.googleapis.com/",
                    "resourceUrl": null,
                    "parameters": [
                        {
                            "name": "Content-Type",
                            "value": "text/jsonl"
                        },
                        {
                            "name": "success_action_status",
                            "value": "201"
                        },
                        {
                            "name": "acl",
                            "value": "private"
                        },
                        {
                            "name": "key",
                            "value": "tmp/62403641563/bulk/764a0bb2-fc43-41b7-8f72-3889353a0f1a/update-file.jsonl"
                        },
                        {
                            "name": "x-goog-date",
                            "value": "20230717T110221Z"
                        },
                        {
                            "name": "x-goog-credential",
                            "value": "merchant-assets@shopify-tiers.iam.gserviceaccount.com/20230717/auto/storage/goog4_request"
                        },
                        {
                            "name": "x-goog-algorithm",
                            "value": "GOOG4-RSA-SHA256"
                        },
                        {
                            "name": "x-goog-signature",
                            "value": "3e8ba998fd292edc6685e216e8d18c3acec0a9af92607497dafef260184c1246f4106157c9ef3e01e0b82b08e12922f428f2bc4792f73de1d85ca5fe2155e505cbb1c4e65d230fffe483e05af73480df403b9e7641cc8ae3f08cb6ba73dcae9b330d84de21bd528c9ebb359cb38ceb57c5abe1ef198ba1867f7b68549d57208da2c6dbea5b2677f1551e8aedfee6d20580eb8aa53f236085da94a5d8a7ec4015b7db928eae3f80399621a769c3849e0e1f09dfae645b33a842fdb4b02d6c1066aec514fe7fcfea8088f5d72ca7d5606439e84ab69c360de729bfba58ef40b056affd06cf200f72a155421a1a2ff39592a33f69dcdd619b486480751ac206ef24"
                        },
                        {
                            "name": "policy",
                            "value": "eyJjb25kaXRpb25zIjpbeyJDb250ZW50LVR5cGUiOiJ0ZXh0XC9qc29ubCJ9LHsic3VjY2Vzc19hY3Rpb25fc3RhdHVzIjoiMjAxIn0seyJhY2wiOiJwcml2YXRlIn0sWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsMSwyMDk3MTUyMF0seyJidWNrZXQiOiJzaG9waWZ5LXN0YWdlZC11cGxvYWRzIn0seyJrZXkiOiJ0bXBcLzYyNDAzNjQxNTYzXC9idWxrXC83NjRhMGJiMi1mYzQzLTQxYjctOGY3Mi0zODg5MzUzYTBmMWFcL3VwZGF0ZS1maWxlLmpzb25sIn0seyJ4LWdvb2ctZGF0ZSI6IjIwMjMwNzE3VDExMDIyMVoifSx7IngtZ29vZy1jcmVkZW50aWFsIjoibWVyY2hhbnQtYXNzZXRzQHNob3BpZnktdGllcnMuaWFtLmdzZXJ2aWNlYWNjb3VudC5jb21cLzIwMjMwNzE3XC9hdXRvXC9zdG9yYWdlXC9nb29nNF9yZXF1ZXN0In0seyJ4LWdvb2ctYWxnb3JpdGhtIjoiR09PRzQtUlNBLVNIQTI1NiJ9XSwiZXhwaXJhdGlvbiI6IjIwMjMtMDctMThUMTE6MDI6MjFaIn0="
                        }
                    ]
                }
            ]
        }
    },
    "extensions": {
        "cost": {
            "requestedQueryCost": 11,
            "actualQueryCost": 11,
            "throttleStatus": {
                "maximumAvailable": 10000.0,
                "currentlyAvailable": 9989,
                "restoreRate": 500.0
            }
        }
    }
}
  1. bulkOperationRunMutation

QUERY

mutation bulkOperationRunMutation($mutation: String!, $path: String!) {
    bulkOperationRunMutation(mutation: $mutation, stagedUploadPath: $path) {
        bulkOperation {
            id
        }
        userErrors {
            message
            field
            code
        }
    }
}

VARIABLES

{
    "mutation": "mutation productUpdate($input: ProductInput!) { productUpdate(input: $input) { product { id handle } userErrors { message field } } }",
    "path": "tmp/62102274248/bulk/5ff7ce37-2046-4f6a-a186-0f4e52c09f4b/update-file.jsonl"
}

RESPONSE

{
    "data": {
        "bulkOperationRunMutation": {
            "bulkOperation": null,
            "userErrors": [
                {
                    "message": "The JSONL file could not be found. Try uploading the file again, and check that you've entered the URL correctly for the stagedUploadPath mutation argument.",
                    "field": null,
                    "code": "NO_SUCH_FILE"
                }
            ]
        }
    },
    "extensions": {
        "cost": {
            "requestedQueryCost": 10,
            "actualQueryCost": 10,
            "throttleStatus": {
                "maximumAvailable": 10000.0,
                "currentlyAvailable": 9990,
                "restoreRate": 500.0
            }
        }
    }
}

Gianluca

Hey @gcannata-bc ,

Can you confirm the order that you are completing this in - it looks like you are potentially missing the ‘upload the JSONL file to Shopify’ step.

Steps should be:

Should you be following these steps correctly, you may want to contact our Partner Specialists from the ‘Support’ tab in your partner dashboard where you can provide the technical details and we can look at this further.

Hope that helps!