Apps Storage Bucket Upload Returns Error Occurred While Uploading

UiPath Apps - Error upload file to storage bucket.

Issue Description: While uploading a file using storage buckets in Apps, the file fails to upload. The error might vary but typically the following errors may be seen:

  • "Error occurred while uploading"
  • "Storage Bucket Error"

Root Cause: To upload a file to a storage bucket the following happens,

  1. The app, has to get a signed URL. This request is made by the apps service. If this request fails, the HTTP response seen by the user will be a 400.
  2. The browser takes the signed URL and uses it to upload the file. If this request fails, the most probably issue is that it was a CORS issue.

Note: When gathering logs, it is important to record timestamps of when the issue happened.

  1. For most apps issues, the first thing to do is to get a HAR trace.
    1. The following KB article can be used for enabling the network trace and saving the log: How To Generate A HAR File?
    2. Enable the network trace and then reproduce the issue.
    3. Make sure to save the HAR trace, so that it can be sent to UiPath.
  2. After the HAR trace is saved, verify the network trace to see which request is failing. The request will always be in red. Locate the red request. The following is a screenshot of what the red request would look like:
  1. As can be seen in this example, two requests failed
  2. Once the request is located, it is important to pay attention to the "Status" field. It it says "CORS" make a note of that
  3. Once the request is located, click on it. After clicking on it, the display should looking something like below,
  1. Notice that the full request URL is displayed in the Red Box. This shows the full URL and lets us know which endpoint is failing. There are two requests that might fail:
    1. The request for the signed URL. This request will look something like:
  1. The request to upload the file. The request will look something like:
    • See step five for an example screenshot.
  2. The main difference between the request is that,
    • The signed URL request is to the Apps service. So in this considered example, Cloud is used and the request is to the cloud service.
    • The request to upload the file is to an On-Prem Orchestrator instance, so the request is to the On-Prem Orchestrator URL that is being used in this example.
  3. If the signed URL request failed, it most likely means that the Apps service failed to request a signed URL from Orchestrator. In that case take the following steps:
    1. Make sure the bucket still exists. Login to Orchestrator and make sure the bucket is present.
    2. If using and this is an integration with on prem Orchestrator, then:
      1. Make sure that Orchestrator is still accessible by the apps service. This can be done by creating a simple app that communicates with your on prem Orchestrator. When configuring the app, it will require us to login to Orchestrator. If that fails, then that most likely is the cause of the issue.
      2. Possible causes could be: The Orchestrator instance is no longer reachable on the public internet, or that the credentials changed.
      3. If the Orchestrator is still accessible by the Apps service, gather the Orchestrator event logs and open a ticket with UiPath.
    3. If using Automation Suite, gather a support bundle.
      1. Using the Automation Suite Support Bundle Tool
      2. In the support bundle, verify the apps service logs. These are in the support bundle under logs/uipath/apps-runtime-*
      3. It may be required to open a ticket with UiPath to understand the issue.
    4. If using with a cloud instance of Orchestrator:
  4. If the issue fails on the request to upload the bucket, most likely this is a CORS error message.
    1. In such a case, the red error in the network trace will show CORS under the status field.
    2. Additionally in the network trace debug window, at the top is a tab for the 'Console'. Select 'Console'.
    3. There should be an error message here that mentions something about a CORS issue.
  1. Take a screenshot of this if a ticket is going to be opened with UiPath Support.
  2. A CORS issue means the browser blocked the request because it might be safe to send a request to the target storage location.
  3. How this is resolved, depends on the target location
    1. For Orchestrator On-Prem with Cloud - The UiPath.Orchestrator.dll.config file needs to be updated to trust
      1. See Orchestrator DLL Config - Authorization
      2. In the Orchestrator.UiPath.dll.config (under C:\Program Files (x86)\UiPath\Orchestrator\UiPath.Orchestrator.dll.config add the key under the AppSettings section:
        • i.e. <add key="AcceptedRootUrls" value="" />
  1. For external bucket providers (Azure,Minio,S3, etc)
    • CORS/ CSP Configuration
    • If using Orchestrator on Prem with Cloud Apps, then needs to be added, along with the On-Prem Orchestrator URL.
  2. If using Automation Suite, with Orchestrator storage, gather the support bundle and open a ticket with UiPath.
  3. If the above article does not help resolve the issue open a ticket with UiPath.
    • When opening a ticket make sure to include all the information that was gathered as part of this article. (i.e. HAR trace, console logs, etc).