How to investigate & fix EMC / Gmail synchronisation error in operations log

How do I investigate & fix a repeated error occurring in the synch operation for an IMAP gmail account – it appears to be related to Google settings?

The log seems to suggest this is related to synching EMC tags and Gmail labels… can someone with the technical knowledge explain the log? It’s not fixing itself as it keeps occurring with every synch.

Log says: "An error occurred [Google Settings] …

The log at the time of the error has more detail as below:

11:27:02 XXX @gmail.com Google Calendar Synchronizing folder list
11:27:02 [email protected] [Google Settings] MailClient.Storage.Application.OperationException
—> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 19: ‘UNIQUE constraint failed: Categories.name’.
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteScalar()
at MailClient.Storage.Data.DbCommandExtensions.ExecuteScalarClearParams(IDbCommand command)
at MailClient.Storage.Category.Data.DbCategoryRepository.Store(ICategoryRepositoryItem item)
at MailClient.Storage.Data.DbRepository1.Add[ST](Object senderContext, IEnumerable1 items)
at MailClient.RepositoryExtensions.Add[T,ST](IRepository1 repository, IEnumerable1 items)
at MailClient.Categories.CategoryExtensions.Add(DbRepository1 repository, IEnumerable1 items, IAccountWithCategoriesManagement managementAccount)+MoveNext()
at MailClient.Categories.Common.CategoriesSynchronizer.<>c__DisplayClass49_0.<b__2>d.MoveNext()
— End of stack trace from previous location —
at MailClient.Protocols.Common.RequestIssuer.<>c__DisplayClass12_0.b__0(WorkerStatus ws, CancellationToken ct)
at MailClient.Protocols.Gdata.GenericGapiCommand.Execute(WorkerStatus status)
— End of inner exception stack trace —
at MailClient.Protocols.Gdata.GenericGapiCommand.Execute(WorkerStatus status)
at MailClient.Commands.Command.Process(WorkerStatus status)
EnqueuedStackTrace =
at MailClient.Categories.Common.CategoriesSynchronizer.<>c__DisplayClass49_0.b__0()
at MailClient.Protocols.Common.AccountBase.RunIfOnline[T](Func1 actionIfOnline, Func1 actionIfOffline)
at MailClient.Categories.Common.CategoriesSynchronizer.EnqueueSynchronize(CancellationToken cancellationToken)
at MailClient.Categories.Common.CategoriesSynchronizer.SynchronizeAsync(CancellationToken cancellationToken)
at MailClient.Protocols.Gdata.GdataSettingsAccount.SynchronizeAsync(CancellationToken cancellationToken)
at MailClient.Protocols.Gdata.GdataSettingsAccount.b__25_0()
at MailClient.Protocols.Common.AccountBase.RunIfOnline[T](Func1 actionIfOnline, Func1 actionIfOffline)
at MailClient.Protocols.Gdata.GdataSettingsAccount.Synchronize(SynchronizationPriority priority)
at MailClient.Accounts.BindingAccountBase.Receive()
at MailClient.Accounts.AccountManager.ReceiveAllInternal(Boolean checkIncludeInGlobalOperations)
at MailClient.Accounts.AccountManager.SendAndReceiveAll(Boolean checkIncludeInGlobalOperations)
at MailClient.Program.<>c.b__277_0(Task _)
at System.Threading.Tasks.ContinuationTaskFromTask.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)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
at System.Threading.Tasks.Task.ExecuteEntryUnsafe(Thread threadPoolThread)
at System.Threading.Tasks.Task.ExecuteFromThreadPool(Thread threadPoolThread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
GUIStatus_Exception_Reported = True
11:27:03 [email protected] Google Calendar Synchronizing folder ‘/Calendar’

Also seeing similar errors:

16:01:07 [email protected] Google Settings Synchronizing tags
16:01:07 [email protected] [Google Settings] MailClient.Storage.Application.OperationException
—> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 19: ‘UNIQUE constraint failed: Categories.name’.
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteScalar()
at MailClient.Storage.Data.DbCommandExtensions.ExecuteScalarClearParams(IDbCommand command)
at MailClient.Storage.Category.Data.DbCategoryRepository.Store(ICategoryRepositoryItem item)
at MailClient.Storage.Data.DbRepository1.Add[ST](Object senderContext, IEnumerable1 items)
at MailClient.RepositoryExtensions.Add[T,ST](IRepository1 repository, IEnumerable1 items)
at MailClient.Categories.CategoryExtensions.Add(DbRepository1 repository, IEnumerable1 items, IAccountWithCategoriesManagement managementAccount)+MoveNext()
at MailClient.Categories.Common.CategoriesSynchronizer.<>c__DisplayClass49_0.<b__2>d.MoveNext()
— End of stack trace from previous location —
at MailClient.Protocols.Common.RequestIssuer.<>c__DisplayClass12_0.b__0(WorkerStatus ws, CancellationToken ct)
at MailClient.Protocols.Gdata.GenericGapiCommand.Execute(WorkerStatus status)
— End of inner exception stack trace —
at MailClient.Protocols.Gdata.GenericGapiCommand.Execute(WorkerStatus status)
at MailClient.Commands.Command.Process(WorkerStatus status)
EnqueuedStackTrace =
at MailClient.Categories.Common.CategoriesSynchronizer.<>c__DisplayClass49_0.b__0()
at MailClient.Protocols.Common.AccountBase.RunIfOnline[T](Func1 actionIfOnline, Func1 actionIfOffline)
at MailClient.Categories.Common.CategoriesSynchronizer.EnqueueSynchronize(CancellationToken cancellationToken)
at MailClient.Categories.Common.CategoriesSynchronizer.SynchronizeAsync(CancellationToken cancellationToken)
at MailClient.Protocols.Gdata.GdataSettingsAccount.SynchronizeAsync(CancellationToken cancellationToken)
at MailClient.Protocols.Gdata.GdataSettingsAccount.b__25_0()
at MailClient.Protocols.Common.AccountBase.RunIfOnline[T](Func1 actionIfOnline, Func1 actionIfOffline)
at MailClient.Protocols.Gdata.GdataSettingsAccount.Synchronize(SynchronizationPriority priority)
at MailClient.Accounts.BindingAccountBase.Receive()
at MailClient.Accounts.AccountManager.ReceiveAllInternal(Boolean checkIncludeInGlobalOperations)
at MailClient.Accounts.AccountManager.SendAndReceiveAll(Boolean checkIncludeInGlobalOperations)
at MailClient.Program.<>c.b__277_0(Task _)
at System.Threading.Tasks.ContinuationTaskFromTask.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)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
at System.Threading.Tasks.Task.ExecuteEntryUnsafe(Thread threadPoolThread)
at System.Threading.Tasks.Task.ExecuteFromThreadPool(Thread threadPoolThread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
GUIStatus_Exception_Reported = True

Anybody able to have a look?

Hi, didn’t get a technical answer to why all this messaging, but I did find discrepancies comparing the EmC tags with my Gmail account labels (after I did start by creating some of my own) I thought that the synchronisation would fix these inconsistencies, but a bit of manual effort seemed to help. Note: that if you look into EMC tags submenu, via the main menu you’ll see that there are local and web/Gmail versions of the “tags”. I thought they would be the same, but differences do I arise it seems.

Don’t remember now if the operation errors only stopped after my manual intervention, but after a few synchronisation attempts and some manual editing of tags in the EMC client and Gmail labels via the Gmail web browser, once tags and labels were aligned, the operation errors stopped. I think, but am not sure that EMC couldn’t actually manage the differences, so needed some help to resolve.

If anyone can provide a more complete technical explanation so much the better!