Text/jsonl not valid for shop - Graphql bulkOperationRunMutation error

My Graphql Bulk bulkOperationRunMutation mutations were running properly for over a year - but since a few days have been failing with this error.


userErrors=[#<OpenStruct message="Unexpected error - text/jsonl not valid for shop 59716042918, bucket bulk/", field=nil>]>>

Just wondering if anyone else facing this? I updated the version to 2022-07 & and have a feeling it is causing this error. Strangely it was working with this new version also when I tested it earlier - but realized its been failing for a few days.

Any help will be apprciated.

Thank you!

Arjun

GOing to debug. Happening across all bulk operations using bulkOperationRunMutation - and across two different apps.

This was caused because I hardcoded something before and the order of the parameters returns changed.

Before it was

stagedUploadPath: staged_upload_result.params.first.value

Which assumed that the the first item in the array would always have the key:value pair. It used to be like this, but the order was changed.

So, now changing it to use find:

staged_upload_result.params.find {|p| p.name == "key" }.value gives me the right url.

THis is fixed!