Insights Installer CommandExecutor Throws 401 Error In The Logs During CustomizeBrandingCommand

How to handle when Insights Installer CommandExecutor throws a 401 error in the logs during CustomizeBrandingCommand ?

Issue Description: During the Insights installation, the install fails near the end of execution. Checking the logs of the CommandExecutor, an error is seen saying:

CustomizeBrandingCommand|Failed to setup client|System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).

Troubleshooting Steps:

  1. Whenever an install fails the first logs to check are in %localappdata%\Temp\*. Typically the logs to check are:
    • UiPathInsightsInstaller_XXXXX_CommandExecutor.log
    • Sisense_XXXXXX.log (there will be two of these, one for the initial install and one for the rollback. We would want to see the initial install)
  2. In the Sisense_XXXXX.log search for the string "]e". This can be used to find any errors. See if the error shows any more information.
    • The following error can be ignored: e000: WARNING: Coudn't get websiteProtocol from Discovery. Will try again after installation.
    • The following error typically could be resolved by step 4. But it could also be a network configuration iss
      • e000: WarmupIIS error:
        System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:14996
  3. Try executing the following command from the command prompt.
    • netsh http show iplisten
  4. The above command typically returns an empty list. If it does not return an empty list then make sure that the list includes 127.0.0.1 and the IP address of the machine.
    • To add it, execute the following command: netsh http show iplisten ipaddress=127.0.0.1
    • Or just delete the everything which would allow everything: netsh http delete ipaddress=<ip address>
      • Each ip address would need to be deleted
  5. If the issue is not resolved by the above steps, please open a ticket and share the logs with UiPath and capture the route table for the machine.
    • To capture the route table, from the command line execute: route print
    • There should be the following entry: 127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
  6. The next step would be to verify that the issue is with the loop back connection to the application. Typically wireshark or fiddler would need to be used to resolve the issue.