logicapps icon indicating copy to clipboard operation
logicapps copied to clipboard

Logic App Standard Blob Storage Built-In Connector (In-App) does not support `UTF-8 with BOM` files

Open pacodelacruz opened this issue 1 year ago • 0 comments

Describe the Bug

When using the Blob Storage Built-In connector and uploading files saved with UTF-8 with BOM encoding, the connector does not work.

  • The Azure Blob trigger does not initiate the workflow when files with UTF-8 with BOM encoding are added to the corresponding container. Given that the trigger just does not initiate, but no error is returned, this exception is very hard to troubleshoot.
  • The Azure Blob read action returns an error when reading files with UTF-8 with BOM encoding. The returned error is:
{
  "code": "ServiceProviderActionFailed",
  "message": "The service provider action failed with error code 'InternalServerError' and error message 'Unexpected character encountered while parsing value: . Path '', line 0, position 0.'."
}

Given that some editors support this encoding, and that in some cases, this is the default encoding, please add support to this encoding in the connector. It worth noting that the managed blob connector v2 is able to process files with this encoding without any issues.

If adding support for this encoding was not possible, please provide better exception errors, so developers and operators can troubleshoot accordingly. While this is fixed, please update the documentation to state this limitation. Thanks!

Plan Type

Standard

Steps to Reproduce the Bug or Issue

  1. Create a JSON file with UTF-8 with BOM encoding
  2. Create a Storage account and a blob container
  3. Create a Logic App with Blob Storage Built-in trigger and configure the container path accordingly
  4. Upload the JSON file with UTF-8 with BOM encoding to the container
  5. Wait for the workflow to be triggered. No trigger is initiated. No error is returned.
  6. Open the same JSON file and save it as UTF-8 without BOM,
  7. Upload the JSON file with UTF-8 encoding to the container
  8. Wait for the workflow to be triggered. The trigger works as expected.

Furthermore, when uploading more than 10 files with UTF-8 with BOM encoding to the blob container, I faced some responsiveness issues with my Logic App as if the trigger is having issues with the internal exceptions that are not bubbled up and the retry mechanism.

For the action issue:

  1. Create a JSON file with UTF-8 with BOM encoding
  2. Create a Storage account and a blob container
  3. Create a Logic App with recurrent trigger and Blob Storage Built-in read blob action and configure the container path accordingly
  4. Upload the JSON file with UTF-8 with BOM encoding to the container
  5. Run the workflow.
  6. Review the error. This will be as described above.
  7. Upload the JSON file with UTF-8 encoding to the container
  8. Run the workflow. The workflow works as expected.

Workflow JSON

No response

Screenshots or Videos

This is a screenshot for the Read Blob action error when reading a file withUTF-8 with BOM encoding

image

Additional context

No response

pacodelacruz avatar Aug 24 '24 05:08 pacodelacruz