Our Poller bots getting faulted , assistance required

Dear All,

We have poller bot scheduled to be run on every 10 minutes.

image

Ochestrator logs as below .

Log Message as below
Poller execution started
Successfully initialized configurations on machine with primary screen resolution: 1920 x 1080
Killing Only Current User process(es): excel, excel.exe.
Extending Config Known Folders: DownloadFolderPath, InProgressFolderPath and InProgressDayFolderPath
Extending Config Assets
Getting O365 unread IDs from folder ‘PGM’
"Get Email List - Without using SharedMailBox: An unspecified error has occurred.
in Apps\O365\O365_GetUnreadIDsFromFolder.xaml
at GetEmailListConnections ““Get Email List - Without using SharedMailBox””
at Sequence ““GetO365UnreadIDsFromFolder””
at O365_GetUnreadIDsFromFolder ““O365_GetUnreadIDsFromFolder””
"
"GetO365UnreadIDsFromFolder.xaml - Invoke Workflow File: An unspecified error has occurred.
in Framework\PollPendingEventsFromSource.xaml
at InvokeWorkflowFile ““GetO365UnreadIDsFromFolder.xaml - Invoke Workflow File””
at Sequence ““Poll O365 mailbox and build the PendingEvents dictionary””
at Switch`1 ““Switch EventSource - Getting pending event object ids””
at Sequence ““PollPendingEventsFromSource””
at PollPendingEventsFromSource ““PollPendingEventsFromSource””
"
“An unspecified error has occurred. | Inner exception: Code: tooManyRetries
Message: More than 3 retries encountered while sending the request.”

Intermittently it is getting faulted with below error message.

{“Code”:“Robot”,“Title”:“Failed due to a System Exception”,“Detail”:“System.Activities.Statements.WorkflowTerminatedException: Failed due to a System Exception\r\n —> UiPath.MicrosoftOffice365.Office365Exception: An unspecified error has occurred.\r\n —> UiPath.MicrosoftOffice365.Office365InternalException: Code: tooManyRetries\r\nMessage: More than 3 retries encountered while sending the request.\r\n\r\n —> Microsoft.Graph.ServiceException: Code: tooManyRetries\r\nMessage: More than 3 retries encountered while sending the request.\r\n\r\n at Microsoft.Graph.RetryHandler.SendRetryAsync(HttpResponseMessage response, CancellationToken cancellationToken)\r\n at Microsoft.Graph.RetryHandler.SendAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken)\r\n at Microsoft.Graph.CompressionHandler.SendAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken)\r\n at Microsoft.Graph.AuthenticationHandler.SendAsync(HttpRequestMessage httpRequestMessage, CancellationToken cancellationToken)\r\n at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)\r\n at Microsoft.Graph.SimpleHttpProvider.SendRequestAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)\r\n at Microsoft.Graph.SimpleHttpProvider.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)\r\n at Microsoft.Graph.BaseRequest.SendRequestAsync(Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)\r\n at Microsoft.Graph.BaseRequest.SendAsync[T](Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)\r\n at Microsoft.Graph.MailFolderRequest.GetAsync(CancellationToken cancellationToken)\r\n at UiPath.Shared.Services.Graph.Mail.Extensions.GraphServiceClientExtensions.GetMailFolderFromIdAsync(IUserRequestBuilder account, String folderId, CancellationToken ct)\r\n at UiPath.MicrosoftOffice365.Mail.Utilities.IterableOffice365MessageProvider.GetEnumerator()\r\n at UiPath.MicrosoftOffice365.Mail.Filters.GraphFolderMailWrapper.GetEnumerator()\r\n at System.Collections.Generic.List1..ctor(IEnumerable1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)\r\n at UiPath.MicrosoftOffice365.Activities.Mail.GetEmailListConnections.<>c__DisplayClass46_0.<SafeExecuteAsync>b__4()\r\n at UiPath.Productivity.Retry.Retry.GetWithTimeout[T](Func1 action, TimeSpan retryTimeout, CancellationToken cancellationToken)\r\n at UiPath.MicrosoftOffice365.Activities.Mail.GetEmailListConnections.SafeExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)\r\n at UiPath.MicrosoftOffice365.Activities.BaseLeafConnectionServiceActivityWithoutBindings.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)\r\n — End of inner exception stack trace —\r\n at Microsoft.Graph.RetryHandler.SendRetryAsync(HttpResponseMessage response, CancellationToken cancellationToken)\r\n at Microsoft.Graph.RetryHandler.SendAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken)\r\n at Microsoft.Graph.CompressionHandler.SendAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken)\r\n at Microsoft.Graph.AuthenticationHandler.SendAsync(HttpRequestMessage httpRequestMessage, CancellationToken cancellationToken)\r\n at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)\r\n at Microsoft.Graph.SimpleHttpProvider.SendRequestAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)\r\n at Microsoft.Graph.SimpleHttpProvider.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)\r\n at Microsoft.Graph.BaseRequest.SendRequestAsync(Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)\r\n at Microsoft.Graph.BaseRequest.SendAsync[T](Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)\r\n at Microsoft.Graph.MailFolderRequest.GetAsync(CancellationToken cancellationToken)\r\n at UiPath.Shared.Services.Graph.Mail.Extensions.GraphServiceClientExtensions.GetMailFolderFromIdAsync(IUserRequestBuilder account, String folderId, CancellationToken ct)\r\n at UiPath.MicrosoftOffice365.Mail.Utilities.IterableOffice365MessageProvider.GetEnumerator()\r\n at UiPath.MicrosoftOffice365.Mail.Filters.GraphFolderMailWrapper.GetEnumerator()\r\n at System.Collections.Generic.List1..ctor(IEnumerable1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)\r\n at UiPath.MicrosoftOffice365.Activities.Mail.GetEmailListConnections.<>c__DisplayClass46_0.<SafeExecuteAsync>b__4()\r\n at UiPath.Productivity.Retry.Retry.GetWithTimeout[T](Func1 action, TimeSpan retryTimeout, CancellationToken cancellationToken)\r\n at UiPath.MicrosoftOffice365.Activities.Mail.GetEmailListConnections.SafeExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)\r\n at UiPath.MicrosoftOffice365.Activities.BaseLeafConnectionServiceActivityWithoutBindings.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)\r\n — End of inner exception stack trace —\r\n at UiPath.MicrosoftOffice365.Activities.BaseLeafConnectionServiceActivityWithoutBindings.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)\r\n at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)\r\n at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)\r\n at UiPath.Shared.Activities.ContinuableAsyncCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)\r\n at UiPath.MicrosoftOffice365.Activities.Office365BaseClientActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)\r\n at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)\r\n— End of stack trace from previous location —\r\n at UiPath.Executor.Core.Runners.BaseRunner.EndExecute(IAsyncResult result) in D:\a\1\s\Robot\UiPath.Executor.Core\Runners\BaseRunner.cs:line 56\r\n at UiPath.Executor.Core.Runners.WorkflowInProcessRunner.EndExecute(IAsyncResult result) in D:\a\1\s\Robot\UiPath.Executor.Core\Runners\WorkflowInProcessRunner.cs:line 121\r\n at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)\r\n at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)\r\n— End of stack trace from previous location —\r\n at UiPath.Executor.Core.Runners.BaseRunner.EndExecute(IAsyncResult result) in D:\a\1\s\Robot\UiPath.Executor.Core\Runners\BaseRunner.cs:line 56\r\n at UiPath.Executor.Core.Runners.WorkflowInProcessRunner.EndExecute(IAsyncResult result) in D:\a\1\s\Robot\UiPath.Executor.Core\Runners\WorkflowInProcessRunner.cs:line 121\r\n at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)\r\n at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)\r\n — End of inner exception stack trace —\r\n at Microsoft.Graph.RetryHandler.SendRetryAsync(HttpResponseMessage response, CancellationToken cancellationToken)\r\n at Microsoft.Graph.RetryHandler.SendAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken)\r\n at Microsoft.Graph.CompressionHandler.SendAsync(HttpRequestMessage httpRequest, CancellationToken cancellationToken)\r\n at Microsoft.Graph.AuthenticationHandler.SendAsync(HttpRequestMessage httpRequestMessage, CancellationToken cancellationToken)\r\n at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)\r\n at Microsoft.Graph.SimpleHttpProvider.SendRequestAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)\r\n at Microsoft.Graph.SimpleHttpProvider.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)\r\n at Microsoft.Graph.BaseRequest.SendRequestAsync(Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)\r\n at Microsoft.Graph.BaseRequest.SendAsync[T](Object serializableObject, CancellationToken cancellationToken, HttpCompletionOption completionOption)\r\n at Microsoft.Graph.MailFolderRequest.GetAsync(CancellationToken cancellationToken)\r\n at UiPath.Shared.Services.Graph.Mail.Extensions.GraphServiceClientExtensions.GetMailFolderFromIdAsync(IUserRequestBuilder account, String folderId, CancellationToken ct)\r\n at UiPath.MicrosoftOffice365.Mail.Utilities.IterableOffice365MessageProvider.GetEnumerator()\r\n at UiPath.MicrosoftOffice365.Mail.Filters.GraphFolderMailWrapper.GetEnumerator()\r\n at System.Collections.Generic.List1..ctor(IEnumerable1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)\r\n at UiPath.MicrosoftOffice365.Activities.Mail.GetEmailListConnections.<>c__DisplayClass46_0.<SafeExecuteAsync>b__4()\r\n at UiPath.Productivity.Retry.Retry.GetWithTimeout[T](Func1 action, TimeSpan retryTimeout, CancellationToken cancellationToken)\r\n at UiPath.MicrosoftOffice365.Activities.Mail.GetEmailListConnections.SafeExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)\r\n at UiPath.MicrosoftOffice365.Activities.BaseLeafConnectionServiceActivityWithoutBindings.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)”,“Category”:null,“Status”:null}

@manasrlenka25 @Nithinkrishna @Anil_G @ashokkarale @UiPath_Community

@Pavan_Mamadapur

check below points,

Check the connection of activity to outlook. And Check Whether you configured correct robot account or not.

Check the load of emails, it too many emails you may get this exception, put some filter conditions and try to read less emails.

Update you office 365 package and see whether it is working.

Happy Automation

Hi @Pavan_Mamadapur
Pls try this:

  • Reconnect O365 - test connection
  • Validate folder name
  • Add retry + exception handling
  • Update UiPath.MicrosoftOffice365.Activities package

Happy Automation

@Pavan_Mamadapur

  1. If you know the conditions of what you need then instead of polling every 10 mins to check emails you can directly use orchestrator event triggers which triggers based on email arrival directly
  2. If you dont want option 1 but to solve the issue, If this is not happening always and you are seeing intermittently then better surround it with retry scope with a delay of atleast 10 seconds

cheers

Hi @Pavan_Mamadapur , I believe you are using regular office 365 scope not the integration service, we uses office 365 scope and activities, I have seen those kind of errors especially when the office 365 azure token/secret expires, in our environment, azure token/secret expires every 6 months, we have to renew it. not sure if you already checked that if not i would start with azure office 365 secret first

Check for high mailbox volume, API throttling limits, network connectivity, and the Office 365 package version. Adding retry logic with delays, reducing polling frequency, and updating to the latest Microsoft Office 365 activities package may help resolve the issue.