How to troubleshoot the download via CLI of an IXP Unstructured Docs project

How to Troubleshoot the "Failed to Download Document" Error When Downloading an IXP Unstructured Docs Project?

Issue Description:

During migration of an IXP Unstructured Documents project from one tenant to another, downloading the project via CLI using the re -c <context-name> package download <project>/<dataset> --file <filename>.zip command may fail with one of the following errors:

  • Failed to download document: An unknown error has occurred: Failed to read buffer request or response body error: error reading a body from connection: end of file before message length reached.

or

  • Failed to download document: An unknown error has occurred: An existing connection was forcibly closed by the remote host.

    Observed Behavior:

    Projects containing a small number of documents (4–10) download successfully. Projects containing a large number of documents fail partway through the transfer with either of the errors mentioned above. The failure point and the error displayed may vary between runs of the same command.

    Listing and authentication commands such as re get datasets and re get current-user complete successfully against the same context, confirming that the endpoint and API token are valid.

    Root Cause:

    The issue is caused by a corporate proxy or network security component terminating the connection during the project download.

    The IXP CLI tool (re) does not use the Windows system proxy settings. Unless an HTTP proxy is explicitly configured using the --proxy option, the CLI connects directly to cloud.uipath.com. The direct connection may then be subject to limits enforced by the corporate network, such as connection duration or transfer limits.

    Resolution:

    Configure the CLI to route requests through the corporate proxy. Two approaches are available.

    Option 1: Add the proxy to the context (recommended):

    Adding a context with a name that already exists updates the existing context rather than creating a new one. The following command adds the proxy while preserving the endpoint and token already stored:

    re config add --name <context-name> --proxy http://proxy.example:8080

    The proxy is stored per context. A migration uses two contexts, one for the source tenant and one for the destination tenant, and the setting must be applied to each independently. The destination context does not inherit the value from the source context.

    Confirm each context holds the setting:

    re config ls

    Option 2: Pass the proxy on each command

    Global flags override context settings and must precede the sub-command.

    Download:

    re -c <source-context-name> --proxy http://proxy.example:8080 package download <project>/<dataset> --file myproject.zip

    Upload:

    re -c <destination-context-name> --proxy http://proxy.example:8080 package upload myproject.zip --name new_project_name

    Notes

    • The proxy applies to both download and upload. An upload transfers comparable volume and fails in the same way if the proxy is not configured on the destination context.
    • The <project>/<dataset> value is the qualified API name shown in the Name column of re get datasets, not the project title displayed in the IXP interface.
    • Obtain the proxy address from the network team, or from Internet Options → Connections → LAN Settings on the workstation. Where LAN Settings specifies an automatic configuration script rather than an explicit address, the proxy host and port must be obtained from the network team.

    If the issue persists after completing the above steps, raise a UiPath Support ticket and include the following:

    • Verbose log of the failing command, captured using the -v flag
    • Proxy or network security application logs from the network team, covering the time of the failed run
    • Wireshark trace collected during a failed run

    For steps on how to collect a Wireshark trace, refer to the following KB article: Knowledge: How To Get A Wireshark Trace?