Problem: Cannot access my inbox.

Today when I tried to open my email inbox in eM Client, it would not open and I got the following message: “An error has occurred in the application that prevents it from continuing”.  If I restart the application, eM Client carries out a database check that takes a few minutes, and re-opens, but I still cannot access my email inbox.  If I try to open it I get the same error message again.  I can however still access my outbox and sent emails.

The ‘error details’ are set out below. The error message is very long and I have set out only the first part, but  I can send it in full if that would be of assistance.

 

I would be very grateful for help.  Thank you.

 

The ‘error details’ are as follows:

 

eM Client (7.0.27943.0)

Windows: Microsoft Windows NT 10.0.17134.0, Framework: 4.0.30319.42000

The following error has occurred:

System.InvalidCastException: Unable to cast object of type ‘System.DBNull’ to type ‘System.IComparable’.

   at MailClient.Storage.Data.DbRepository`1.FindOids(QueryCondition condition, CancellationToken cancellationToken, SortField[] sortKeys)

   at MailClient.Storage.Views.ItemCollectionView2..ctor(Folder folder, ItemCollection2 itemCollection, IUIDispatcher dispatcher, CancellationToken cancellationToken, SortField[] sortFields)

   at MailClient.Storage.Application.Folder.CreateMailView(IUIDispatcher dispatcher, CancellationToken cancellationToken, SortField[] sortFields)

   at MailClient.UI.Controls.controlMessages.MailItemBehaviour.CreateView(IViewProvider viewProvider, IUIDispatcher dispatcher, CancellationToken cancellationToken, SortField[] sortFields)

   at MailClient.UI.Controls.controlItemList`2.<>c__DisplayClass173_0.b__0(Object
)

   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)

   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()

   at System.Threading.ThreadPoolWorkQueue.Dispatch()

   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Sometimes these errors list the affected file right at the end, but it might be easy enough to fix without that.

If this account is setup as IMAP or Exchange, all you need to do is remove the account from eM Client, then add it again. Because the messages are stored on the server, the Inbox will re-sync. 

If the account is POP3, then a recent backup might be your only solution. Depending on how old the backup is, you might want to export more recent messages from the Sent folder before the restore. You would probably lose some Inbox messages unless they are still on the server.

Dear Gary,

Thank you very much for taking the trouble to reply.  On getting up this morning, it occurred to me that before doing the action you suggest, it might just be worth trying a de-installation and re-installation of eM Client (after making a copy of my profile directory “C:\Users\username\AppData\Roaming\eM Client”).  I did this and, to my surprise and delight, it has solved the problem.