Hello,
when there is an email that is recalled, the activity “Get Outlook Mail Message” is failed and no further mails could be processed.
Is there any workaround or planed bugfix?
22.10.4+Branch.support-v22.10.Sha.b4be88e3b45fb05c4bcd71885c763d4f2095f959
Source: Get Outlook Mail Messages
Message: Specified cast is not valid.
Exception Type: System.InvalidCastException
System.InvalidCastException: Specified cast is not valid. at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at Microsoft.CSharp.RuntimeBinder.ComInterop.ComRuntimeHelpers.CheckThrowException(Int32 hresult, ExcepInfo& excepInfo, UInt32 argErr, String message)
at CallSite.Target(Closure , CallSite , ComObject )
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
at UiPath.Mail.OutlookAPI.AddCategoriesToMailMessageFromOutlookDynamicItem(MailMessage mailMessage, Object item)
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3[T0,T1,T2](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at UiPath.Mail.OutlookAPI.CreateMailMessageFromOutlookDynamicItem(Object item, Boolean saveattachments, String folderpath)
at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at UiPath.Mail.OutlookAPI.GetMessages(MAPIFolder inboxFolder, Int32 count, MailFilterVariant filterVariant, EOrderByDate orderByDate, Boolean onlyUnread, Boolean markAsRead, Boolean getAttachments, CancellationToken cancellationToken)
at UiPath.Mail.OutlookAPI.GetMessages(String account, String folderMail, Int32 count, MailFilterVariant filter, EOrderByDate orderByDate, Boolean onlyUnread, Boolean markAsRead, Boolean getAttachments, CancellationToken cancellationToken)
at UiPath.Mail.Outlook.Activities.GetOutlookMailMessages.<>c__DisplayClass40_0.<GetMessages>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at UiPath.Mail.Activities.Extensions.TaskExtensions.TimeoutAfter[TResult](Task`1 task, Int32 timeoutMs)
at UiPath.Mail.Activities.GetMailActivity.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)