Get Outlook Mail Messages: The operation has timed out. - KB

When an automation executes Get Outlook Mail Messages, a timeout error is thrown.

“Get Outlook Mail Messages: The operation has timed out.”

 

Issue Overview

 

When an automation executes Get Outlook Mail Messages, a timeout error is thrown.

“Get Outlook Mail Messages: The operation has timed out.”

 

 

Root Cause

 

The outlook activities have a default timeout of thirty seconds. If this is not enough time for the activity to execute, this error message will be thrown.

The timeout is a generic timeout and not related to a specific operation that the activity is performing. Usually this means the timeout needs to be increased, or the number of messages that are retrieved needs to be reduced.

 

 

Resolution

 

1.       Go to Get Outlook Mail Messages activity in the automation

2.       Select the activity and go to the properties pane.

3.       Do one of the following:

a.       Set the “TimeoutMS” value to something greater than 30000. The needed value depends on the number of emails that are being retrieved. Try increasing the value by 30000 each time until the error message goes away.

b.       Reduce the number in the “Top” property. For example, if it is set to “1000” try lowering that value. This might require re-working the automation. For example, if the Robot needs to retrieve 100 emails, but it can only retrieve 50 emails before hitting the timeout, there will need to be logic in the automation that helps the Robot loop threw the emails until they are all read.

4.       If the issue happens on an unattended bot, it could be that the Outlook profile has not been setup up. Login to the Robot machine as the Robot user and open Outlook. This will verify that it is setup.

3.       If the Robot is running on a high density machine, it could be that the server was setup to use User Disk Profiles. To check this login to the machine as the Robot account and go to "C:\Users". If two profile folders exist for the user and one is mounted as a volume, this is probably the issue.

a.       To get more info about User Disk Profiles, see: https://techcommunity.microsoft.com/t5/enterprise-mobility-security/easier-user-data-management-with-user-profile-disks-in-windows/ba-p/247555

b.       Speak to your admin about disabling this feature. The Robots RDP connection is entirely local. It uses a loopback connection and does not pass through a connection broker. This means that when the Robot executes, the User Disk Profile does not get loaded. Most likely this configuration is not needed by the Robot. After the User Disk Profile is removed, verify with your admin that the relevant registry keys were cleaned up. Also restart the Robot service. If this feature cannot be disabled, open a ticket with UiPath.