emClient 9 and 10 beta - Error - failed to OAuth to Google account and Outlook.com

Hi, when i try to add my google account to emClient, it failed when to open website to authorize google account (i click on button allow on google website and emClient do nothing)

this error raised:

MailClient.AuthorizationRequiredException: Authorization required
AccountId = 45dec6bd-f5d7-4f4a-80cf-0516fd1595e6
AccountName =
GUIStatus_Exception_Reported = True
09:28:04 [IMAP] MailClient.Accounts.AuthenticationAbortedException: Autentifikácia ukončená
at MailClient.Protocols.Imap.ConnectionPoolEntry.g__ThrowPasswordNotSetReacquireCredentialsFailed|51_1()
at MailClient.Protocols.Imap.ConnectionPoolEntry.<>c__DisplayClass51_0.b__0()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__273_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 MailClient.Protocols.Imap.ConnectionPoolEntry.ConnectInternalAsync(CancellationToken cancellationToken)
at MailClient.Protocols.Imap.ConnectionPool.AcquireConnectionAsync(Folder mailFolder, Boolean noSelect)
at MailClient.Protocols.Imap.ConnectionContext.CreateContextAsync(ImapAccount account, Folder folder, Boolean noSelect)
at MailClient.Protocols.Imap.ImapMailSynchronizer.<>c__DisplayClass27_0.<g__CreateConnectionContextAsync|0>d.MoveNext()
— End of stack trace from previous location —
at MailClient.Protocols.Imap.ImapMailSynchronizer.SynchronizeMessagesAsync(IItemSynchronizeContext1 synchronizeContext, Folder folder, Boolean fast, CancellationToken cancellationToken) at MailClient.Protocols.Imap.ImapMailSynchronizer.Synchronize(IItemSynchronizeContext1 synchronizeContext, Folder folder, CancellationToken cancellationToken)
at MailClient.Protocols.Common.ItemSynchronizer2.<>c__DisplayClass40_2.<EnqueueSynchronize>b__6(WorkerStatus status, CancellationToken ct) at MailClient.Protocols.Imap.ImapActionCommand.<>c__DisplayClass11_0.<.ctor>b__0(WorkerStatus ws, CancellationToken ct) at MailClient.Protocols.Imap.ImapActionCommand.ExecuteInternalSync(WorkerStatus status) at MailClient.Protocols.Imap.ImapActionCommand.Execute(WorkerStatus status) at MailClient.Commands.Command.Process(WorkerStatus status) --- End of stack trace from previous location --- at MailClient.Protocols.Imap.ImapAccount.SynchronizeIntAsync(Boolean forced) at MailClient.Protocols.Common.SynchronizableMailAccount.<>c__DisplayClass7_0.<<SynchronizeAsync>b__0>d.MoveNext() RunInPlace = False EnqueuedStackTrace = at MailClient.Protocols.Common.ItemSynchronizer2.<>c__DisplayClass40_0.b__0()
at MailClient.Protocols.Common.AccountBase.RunIfOnline(Action actionIfOnline, Action actionIfOffline)
at MailClient.Protocols.Common.ItemSynchronizer2.Synchronize(Folder folder, SynchronizationPriority priority, Action1 completed)
at MailClient.Storage.Application.ItemCollection2.Synchronize(SynchronizationPriority priority, Action1 completed, Boolean fromUI)
at MailClient.Storage.Application.ItemCollection2.SynchronizeAsync(Boolean forced, Boolean fromUI) at MailClient.Storage.Application.Folder.SynchronizeAsync(Boolean forced, Boolean fromUI) at MailClient.Protocols.Imap.ImapAccount.SynchronizeIntAsync(Boolean forced) at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) at MailClient.Protocols.Imap.ImapAccount.SynchronizeIntAsync(Boolean forced) at MailClient.Protocols.Common.SynchronizableMailAccount.<>c__DisplayClass7_0.<<SynchronizeAsync>b__0>d.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) at MailClient.Protocols.Common.SynchronizableMailAccount.<>c__DisplayClass7_0.<SynchronizeAsync>b__0() at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__273_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.ExecuteFromThreadPool(Thread threadPoolThread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
at System.Threading.Thread.StartCallback()
GUIStatus_Exception_Reported = True

Hope to help to fix this. Thanks

I have “the same” problem with emClient for Android, can’t OAUTH with outlook.com and gmail.com.

version of emClient for Windows is: eM Client 10.0.1495-beta+627efd5a84

version of emClient for Android is: 10.0.1586-beta

Try to back to version 9, the same problem, outlook and gmail OATh not work ;-(

As eM Client V9 and V10 and your Android eM Client V10 are doing the same thing, could be something either running on the devices locally or could be something at your server account end or could be the browser.

So first try setting another browser as default and then reboot and see if that makes any difference. Also try clearing your browser cache fully as well.

Next try removing any old eM Client tokens from your Google and Microsoft accounts (if you have any already there), and then try clicking allow again in the browser and see if that makes any difference.

Also if you have any Optionally installed Firewalls / Security programs, or Optionally installed Antivirus programs or VPNs, try completely disabling those to test and see if that makes any difference.

Apart from that, might be your Computer OS possibly needs an update or a later OS. Do you have Windows or Mac and what OS version you running ?.

Also what Ver Droid OS are you running as well ?

Hi,

thanks for your advices

i try multiple things:

change my Vivaldi to Edge as default brower, clear cache in Edge
remove app access in gmail a outlook web-mail

uninstall emclient and delete all folders and databases

my windows 11 is up to date, no antivirus
my Android 14 is up to date, no antivirus (tried on my Wifi and cellular network)

results:
only what is now succesfull is version 9 on my Windows 11 pc (version 10 cant get oauth from outlook com and gmail com - android and pc)

it looks there are some interferences, it looks like the outlook com/gmail com do not understand that there is emClient 9, emClient 10 and emClient for Android

Now i have successfull added emClient (9) to gmail.com and outlook.com, in PC on Windows 11 it is work, but when i tried add my mail accounts on the Android it is not work, but emClient is allowed app in webmails :wink: but OAUTH do not work

i try other things and i let you now results.

Thanks

emclient bug

Problem is the permissions when adding the accounts, are sending to wrong links. Then the em client dont recognizes the oauth redirects. And we enter a loop for new auth again.

Problem reproduced on em client 9 and em client 10 beta. Only browser that i was able to find out the issue was on firefox. lack of information in edge, chrome and opera. tested the 3.

@Komayo

Problem is the permissions when adding the accounts, are sending to wrong links. Then the em client dont recognizes the oauth redirects. And we enter a loop for new auth again.

When you say “adding the accounts are sending to the wrong links”, can you elaborate on what wrong links you are seeing ?

As your screenshot looks correct where the browser is asking you to “allow eM Client access to your Google accout” at the end of the wizard with the link http://accounts.google.com. You normally place a check in that box and click “Open link” which will then return to eM Client and your Google account mail, calendar and contacts etc will load.

Its the incoming address wrong, not the outgoing one.
in this case from google to emclient, but the emclient adress is wrong misspelled. As you notice in my SS you can see its com.emclient.mailclient.
because of this situation the real emclient address never receives a incoming oauth redirect from google adress. So it never finishs the process and we go to beginning loop. So basically the permission we give on with the allow button, is doing nothing.

@Komayo

As you notice in my SS you can see its com.emclient.mailclient.
because of this situation the real emclient address never receives a incoming oauth redirect from google adress. So it never finishs the process and we go to beginning loop.

You are only giving permission to eM Client to access the link http://accounts.google.com . The words on the banner should have nothing to do in my view with the OAuth part from using V9 and V10.

Every version of eM Client V9 i’ve tested always authenticated fine with that same Google url link. The latest version 9 is 9.2.2157 for Windows and 9.2.2230 for Mac from the release history page.

Also on the latest eM Client with Gmail the OAuth screens “look different now as in the below”. So you might have an older version of eM Client. What version of eM Client are you using ?

Example adding a Gmail account via the automatic email wizard using Chrome browser and eg: V10.0.1495 for Mac. At the end of the wizard the following OAuth screens appear.

V10.0.1495, my screens are like yours.
but the loop starts after we hit allow. No return to emclient.

@Komayo

V10.0.1495, my screens are like yours.
but the loop starts after we hit allow. No return to emclient.

If that happens “with any web browser as default”, then that usually means there is probably something running in the background interfering in some way with the authentication part closing or your browser cache or data part is corrupted in some way.

I can’t fault that with Win 10,11 or Mac Sonoma on a clean OS install using eg: Chrome or Edge browsers.

When I click Allow, the browser window closes within approx 3-5 secs and go back to eM Client.

Suggest to try “completely clearing your browser’s cache, cookies , plugins etc” and even try “clearing your OS temp files” and try again.

Apart from that “go online to your Google and Microsoft accounts security / allow third party programs” and “remove all eM Client tokens”. Then close your web browser and try again.

Lastly if still a problem, “try disabling all non OS user related tasks on startup” and reboot and try again as could be an eg: Optionally installed firewall / security program or Optionally installed Antivirus program or some other user background program causing it etc.

The strangest behaviour is of all my 5 gmail accounts, i can add 4 to emclient, only this one not working.
so i hardly doubt is any os or browser issue. Otherwise couldnt add the other 4 accounts.
Any more ideas?

@Komayo

The strangest behaviour is of all my 5 gmail accounts, i can add 4 to emclient, only this one not working

If it’s only one Gmail account that won’t authenticate, then sounds like a Google account issue. I would contact Google technical support and advise.

Could be the way the account is setup on there end.