Prefetch failed on 9.2.2038.0

Hey there, not a crashing issue but there is an exception being thrown when I access O365 exchange online mail sometimes. I wanted to include the dump here in case it helps someone. It never happened prior to 9.2.2038.0 - I changed out my email address and domain.

8:55:57 AM [email protected] [Exchange Web Services] MailClient.Storage.Application.OperationException: Prefetch failed
            ---> Microsoft.Exchange.WebServices.Data.ServiceRequestException: The request failed. The operation was canceled.
            ---> System.Net.WebException: The operation was canceled.
            ---> System.Threading.Tasks.TaskCanceledException: The operation was canceled.
            ---> System.IO.IOException: Unable to read data from the transport connection: The I/O operation has been aborted because of either a thread exit or an application request..
            ---> System.Net.Sockets.SocketException (995): The I/O operation has been aborted because of either a thread exit or an application request.
              --- End of inner exception stack trace ---
              at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
              at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
              at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](TIOAdapter adapter)
              at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](TIOAdapter adapter, Memory`1 buffer)
              at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
              --- End of inner exception stack trace ---
              at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)
              at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
              at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.GetResponse(CancellationToken token)
              --- End of inner exception stack trace ---
              at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.GetResponse(CancellationToken token)
              at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.GetResponse()
              at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
              --- End of inner exception stack trace ---
              at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
              at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request)
              at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
              at MailClient.Protocols.Exchange.ExchangeMailSynchronizer.GetItemContentInternal(Folder folder, IMailRepositoryItem item, IStoredMimePart basePart, String partName)
              at MailClient.Protocols.Exchange.ExchangeMailSynchronizer.PrefetchItems(IPrefetchProgress progress, Folder folder, IEnumerable`1 items, PrefetchType prefetchType, CancellationToken cancellationToken)
              --- End of inner exception stack trace ---
              at MailClient.Protocols.Exchange.ExchangeMailSynchronizer.PrefetchItems(IPrefetchProgress progress, Folder folder, IEnumerable`1 items, PrefetchType prefetchType, CancellationToken cancellationToken)
              at MailClient.Protocols.Common.ItemSynchronizer`2.<>c__DisplayClass43_0.<EnqueuePrefetch>b__2(WorkerStatus status, CancellationToken cancellationToken1)
              at MailClient.Protocols.Exchange.ExchangeGenericCommand.Execute(WorkerStatus status)
              at MailClient.Commands.Command.Process(WorkerStatus status)
             QueueIgnore = True
             EnqueuedStackTrace =
                  at MailClient.Protocols.Common.ItemSynchronizer`2.<>c__DisplayClass43_0.<EnqueuePrefetch>b__0()
                  at MailClient.Protocols.Common.AccountBase.RunIfOnline(Action actionIfOnline, Action actionIfOffline)
                  at MailClient.Protocols.Common.ItemSynchronizer`2.EnqueuePrefetch(Folder folder, IEnumerable`1 items, Int32 countEstimate, Int32 initialProgress, PrefetchType prefetchType, SynchronizationPriority priority, CancellationToken cancellationToken, Action`1 completed)
                  at MailClient.Protocols.Common.ItemSynchronizer`2.<>c__DisplayClass40_2.<EnqueueSynchronize>b__6(WorkerStatus status, CancellationToken ct)
                  at MailClient.Protocols.Exchange.ExchangeGenericCommand.Execute(WorkerStatus status)
                  at MailClient.Commands.Command.Process(WorkerStatus status)
                  at MailClient.Commands.DefaultSynchronizationQueue.ThreadWorker(Object threadData)
                  at System.Threading.Thread.StartHelper.Callback(Object state)
                  at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
                  at System.Threading.Thread.StartCallback()
             GUIStatus_Exception_Reported = True

This is a server error.

It means that there is some issue syncing items for offline use. It doesn’t affect normal use of eM Client though, but be aware that if you use the offline option (like when on a flight or otherwise when a network connection is not available) you may not have all the message contents and attachments synced.

I mentioned this in another post here.

Thanks for the quick reply Gary - it may be a server error but it’s raised and thrown as an exception vs. being handled gracefully by emclient. Wrapping the call in an exception handler would allow EMC to gracefully ignore and not to a stack dump/crash and not show red exclamations for me to look at every day. It’s not a big deal but did just start happening after 9.2.2038.0 which I thought might mean a missing try/catch block.

Yes, because it is a server error that you should be aware of.

Fortunately, if you don’t want to see error popups, you can disable them in Menu > Settings > General > Operation Window. Just untick the option to show the window when an error occurs.

It is a server error, so nothing to do with the version of eM Client you are using. It is possible you had not set eM Client for offline use in a previous version, in which case you wouldn’t have had this server issue.

The client isn’t crashing, but it’s giving me this error.

9:30:18 AM user@account [Exchange Web Services] MailClient.Storage.Application.OperationException: Prefetch failed
—> System.TimeoutException: The request timed out.
—> System.Threading.Tasks.TaskCanceledException: TaskCanceledException_ctor_DefaultMessage
at Foundation.NSUrlSessionHandler.NSUrlSessionDataTaskStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
Exception_EndOfInnerExceptionStack
at Foundation.NSUrlSessionHandler.NSUrlSessionDataTaskStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
at System.IO.Stream.g__Core|29_0(Stream source, Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
at System.Net.Http.HttpContent.LoadIntoBufferAsyncCore(Task serializeToStreamTask, MemoryStream tempBuffer)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.GetResponse(CancellationToken token)
at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.GetResponse()
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request)
at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest1.Execute() at MailClient.Protocols.Exchange.ExchangeMailSynchronizer.GetItemContentInternal(Folder folder, IMailRepositoryItem item, IStoredMimePart basePart, String partName) at MailClient.Protocols.Exchange.ExchangeMailSynchronizer.PrefetchItems(IPrefetchProgress progress, Folder folder, IEnumerable1 items, PrefetchType prefetchType, CancellationToken cancellationToken)
Exception_EndOfInnerExceptionStack
at MailClient.Protocols.Exchange.ExchangeMailSynchronizer.PrefetchItems(IPrefetchProgress progress, Folder folder, IEnumerable1 items, PrefetchType prefetchType, CancellationToken cancellationToken) at MailClient.Protocols.Common.ItemSynchronizer2.<>c__DisplayClass43_0.b__2(WorkerStatus status, CancellationToken cancellationToken1)
at MailClient.Protocols.Exchange.ExchangeGenericCommand.Execute(WorkerStatus status)
at MailClient.Commands.Command.Process(WorkerStatus status)
QueueIgnore = True
EnqueuedStackTrace =
at MailClient.Protocols.Common.ItemSynchronizer2.<>c__DisplayClass43_0.<EnqueuePrefetch>b__0() at MailClient.Protocols.Common.AccountBase.RunIfOnline(Action actionIfOnline, Action actionIfOffline) at MailClient.Protocols.Common.ItemSynchronizer2.EnqueuePrefetch(Folder folder, IEnumerable1 items, Int32 countEstimate, Int32 initialProgress, PrefetchType prefetchType, SynchronizationPriority priority, CancellationToken cancellationToken, Action1 completed)
at MailClient.Protocols.Common.ItemSynchronizer2.<>c__DisplayClass40_2.<EnqueueSynchronize>b__6(WorkerStatus status, CancellationToken ct) at MailClient.Protocols.Exchange.ExchangeGenericCommand.Execute(WorkerStatus status) at MailClient.Commands.Command.Process(WorkerStatus status) at MailClient.Commands.DefaultSynchronizationQueue.ThreadWorker(Object threadData) at System.Threading.Thread.StartHelper.Callback(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Thread.StartCallback() GUIStatus_Exception_Reported = True 9:30:22 AM user@account [Exchange Web Services] MailClient.Storage.Application.OperationException: Prefetch failed ---> MailClient.Storage.Application.Mail.NotDownloadedException: Message was not completely downloaded and thus no operations can be performed on it. at MailClient.Protocols.Exchange.ExchangeMailSynchronizer.GetItemContentInternal(Folder folder, IMailRepositoryItem item, IStoredMimePart basePart, String partName) at MailClient.Protocols.Exchange.ExchangeMailSynchronizer.PrefetchItems(IPrefetchProgress progress, Folder folder, IEnumerable1 items, PrefetchType prefetchType, CancellationToken cancellationToken)
Exception_EndOfInnerExceptionStack
at MailClient.Protocols.Exchange.ExchangeMailSynchronizer.PrefetchItems(IPrefetchProgress progress, Folder folder, IEnumerable1 items, PrefetchType prefetchType, CancellationToken cancellationToken) at MailClient.Protocols.Common.ItemSynchronizer2.<>c__DisplayClass43_0.b__2(WorkerStatus status, CancellationToken cancellationToken1)
at MailClient.Protocols.Exchange.ExchangeGenericCommand.Execute(WorkerStatus status)
at MailClient.Commands.Command.Process(WorkerStatus status)
QueueIgnore = True
EnqueuedStackTrace =
at MailClient.Protocols.Common.ItemSynchronizer2.<>c__DisplayClass43_0.<EnqueuePrefetch>b__0() at MailClient.Protocols.Common.AccountBase.RunIfOnline(Action actionIfOnline, Action actionIfOffline) at MailClient.Protocols.Common.ItemSynchronizer2.EnqueuePrefetch(Folder folder, IEnumerable1 items, Int32 countEstimate, Int32 initialProgress, PrefetchType prefetchType, SynchronizationPriority priority, CancellationToken cancellationToken, Action1 completed)
at MailClient.Protocols.Common.ItemSynchronizer`2.<>c__DisplayClass40_2.b__6(WorkerStatus status, CancellationToken ct)
at MailClient.Protocols.Exchange.ExchangeGenericCommand.Execute(WorkerStatus status)
at MailClient.Commands.Command.Process(WorkerStatus status)
at MailClient.Commands.DefaultSynchronizationQueue.ThreadWorker(Object threadData)
at System.Threading.Thread.StartHelper.Callback(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Thread.StartCallback()
GUIStatus_Exception_Reported = True

This is a server error that I’m getting with Microsoft’s M365. I understand your contention that I should be aware of the server error. What should I do with this information? Does it mean that there is a message in the mailbox that should be deleted because it can’t be fetched? (Mail.app is crashing on me from time-to-time; this may be the reason.)

You could contact the email provider and tell them.

Not necessarily, as that would normally give a different type of error. It just means because of some server error, your messages can’t be synced for offline use. If you click on a message while you are connected to the Internet, it will load correctly.

As a 30 year+ windows stack developer I know that stack dumps are the last phase of an uncaught error. I would think EMC would build in a prefetch sink to catch this one and allow it to be gracefully handled if possible or at least not generate exception processing. But that said, its just an annoyance now but there’s not anything I can do about it.

2 Likes

‘Contact the email provider and tell them’… can you guess what Microsoft says? ‘Contact the application developers.’

I also use M365 as my email provider and am getting this error. At least a graceful way of handling it would be better than an error every time I open eM Client, but trying to track down what the actual problem is would be more helpful.

2 Likes

The problem is an error on the Exchange server. You will need to contact the email provider and ask them to fix this.

I get the same error on ONE of my workstations. The other two are perfectly fine accessing the same account and set up the same way, :confused:

1 Like