GMail connection failure

Since a couple of days my GMail accounts (2) will no longer sync in eMclient.
I tried deleting one of the accounts and recreated it, but this did not help.

Any ideas?

Errors from log:

5:48:17 xxxxxxxxxxxxx@gmail.com IMAP Synchronizing folder list
5:48:17 xxxxxxxxxxxxx@gmail.com Google Contacts Synchronizing folder list
5:48:17 xxxxxxxxxxxxx@gmail.com IMAP Synchronizing folder list
5:48:17 xxxxxxxxxxxxx@gmail.com [IMAP] MailClient.Accounts.ConnectionException: Failed opening connection to server.
—> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host…
—> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
— End of inner exception stack trace —
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
at System.Net.Security.SslStream.g__InternalFillHandshakeBufferAsync|182_0[TIOAdapter](TIOAdapter adap, ValueTask1 task, Int32 minSize) at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](TIOAdapter adapter) at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm) at MailClient.Imap.Base.Connection.<>c__DisplayClass80_0.<<ConnectAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at MailClient.Imap.Base.TransportPipe.<>c__DisplayClass34_0.<<UpgradeStreamAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at MailClient.Imap.Base.TransportPipe.UpgradeStreamAsync(Func2 callback)
at MailClient.Imap.Base.Connection.ConnectAsync(Func2 getStream, CancellationToken cancellationToken) at MailClient.Imap.Base.Connection.ConnectAsync(Func2 getStream, CancellationToken cancellationToken)
at MailClient.Protocols.Imap.ConnectionPoolEntry.ConnectInternalAsync(CancellationToken cancellationToken)
— End of inner exception stack trace —
at MailClient.Protocols.Imap.ConnectionPoolEntry.ConnectInternalAsync(CancellationToken cancellationToken)
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)
at MailClient.Protocols.Imap.ImapFolderSynchronizer.ListFoldersAsync(IListFoldersProgress progress, Folder homeFolder, CancellationToken cancellationToken)
at MailClient.Protocols.Imap.ImapFolderSynchronizer.GetFolderList(IListFoldersProgress progress, Folder homeFolder, CancellationToken cancellationToken)
at MailClient.Protocols.Common.FolderSynchronizer.<>c__DisplayClass14_1.b__0(WorkerStatus status, CancellationToken cancellationToken)
at MailClient.Protocols.Imap.ImapActionCommand.<>c__DisplayClass13_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.Storage.Synchronization.FolderSynchronizerExtensions.SynchronizeSubfoldersAsync(IFolderSynchronizer synchronizer, Folder folder, SynchronizationPriority priority, CancellationToken cancellationToken)
at MailClient.Protocols.Imap.ImapAccount.SynchronizeIntAsync(Boolean forced)
at MailClient.Protocols.Common.SynchronizableMailAccount.<>c__DisplayClass6_0.<b__0>d.MoveNext()
EnqueuedStackTrace =
at MailClient.Protocols.Common.FolderSynchronizer.EnqueueGetFolderList(Folder homeFolder, Action`1 completed)
at MailClient.Protocols.Common.FolderSynchronizer.GoOnlinePre()
at MailClient.Protocols.Imap.ImapFolderSynchronizer.GoOnlinePre()
at MailClient.Protocols.Imap.ImapAccount.GoOnlineInt()
at MailClient.Protocols.Common.AccountBase.ChangeOnlineState(Boolean online, OfflineReason offlineReason)
at MailClient.Protocols.Common.AccountBase.GoOnline()
at MailClient.Protocols.Common.AccountBase.RunIfOnline(Action actionIfOnline, Action actionIfOffline)
at MailClient.Protocols.Common.SynchronizableMailAccount.Synchronize(SynchronizationPriority priority)
at MailClient.Accounts.BindingAccountBase.Receive()
at MailClient.Accounts.AccountManager.ReceiveInternal(IAccount account)
at MailClient.Accounts.AccountManager.Receive(IAccount account)
at MailClient.Accounts.AccountManager.SendAndReceive(IAccount account)
at MailClient.UI.Forms.formMain.accountSendAndReceive_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)
at Interop.User32.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.Interop.Mso.IMsoComponentManager.FPushMessageLoop(UIntPtr dwComponentID, msoloop uReason, Void* pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(msoloop reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(msoloop reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at MailClient.Program.<>c.b__169_1()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Delegate.DynamicInvoke(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at MailClient.Common.UI.Forms.BaseForm.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)
at Xilium.CefGlue.Interop.libcef.run_message_loop()
at MailClient.Program.Main(String[] args)
GUIStatus_Exception_Reported = True
5:48:17 xxxxxxxxxxxxx@gmail.com Google Contacts Synchronizing folder ‘/Contacts’

As you have already tried removing and re-adding your Gmail account & getting connection errors, maybe related to optional eg: Firewalls / Security programs, Antivirus programs, VPN’s etc. If you have any of these optional type programs installed, try disabling them (to test) if any of them are interfering.

Failing that, try upgrading to the latest version of eM Client for PC and Mac via the version history page https://www.emclient.com/release-history . If you do upgrade to a later version of the program, backup first via “Menu / Backup”.

Lastly when you re-add the Gmail account, use the automatic wizard if you haven’t already and “click allow” near the end in your browser when Google asks for access to your Gmail account.

No new programs (anti virus / firewalls / etc…) have been configured. GMail worked fine till a couple of days ago.

Already running the latest release, installed on october 7th.
But the GMail problem was already there before the upgrade.

GMail worked fine till a couple of days ago.

As Gmail then was working fine a couple of days ago and the latest version of eM Client is not making any difference, I would look at restoring a previous eM Client backup “prior to this issue happening” via “Menu / File / Restore” if you have been doing either automatic or manual backups in EMC.

Or failing that try doing either a System Restore or Time Machine Restore (if you do those) back “prior to when this issue happened”. Whatever happened then should resolve itself.

Could be the OS or other Unknown program on your computer automatically updated and is causing the issue as there is no current issues with Gmail Servers i’m aware of & looks computer related.

I’ll pay for pro support…doing a system restore is like killing a mouse with a sledge hammer.

Same thing here. Pretty much the same day as you… Wont connect to gmail anymore, right out of the blue. Installed latest version… Havent tried re-adding the account yet, but it appears this doesnt resolve it. I’ve had to start using the browser again. Still no help on this matter?

Actually tried re-adding the gmail account and it it gets to the gmail authorization page, I enter ok or continue to grant access and it just cycles again, asks to finish on emclient, goes to gmail auth, goes back to finish on emclient, goes to gmail auth… etc etc… Wont connect… (even turned off access to less secure apps etc)

@vernonwebsites

Actually tried re-adding the gmail account and it it gets to the gmail authorization page, I enter ok or continue to grant access and it just cycles again

If you are clicking the Google “Allow” button near the end of the Gmail setup wizard in eM Client and it doesn’t accept that and just spins / cycles around, then try removing eM Client from “Third Party Apps” in your Google Security section.

Go to your Google Security (Third-party apps with account access) via your browser and “Click on eM Client” as per 1st screenshot below.

Then you will see eM Client appear twice. “Click on both instances of eM Client” & click “Remove Access” as per screenshots below. Then remove and re-add your Gmail acct in eM Client.

Sometimes as soon as you remove eM Client from your Google third party apps and go back to eM Client, the browser will flash up straight away asking to allow access again to your Google account.

Note:- If that still doesn’t work, then you have something on your computer blocking or interfering with eM Client accessing the Internet. Those can be (as already advised above) eg: optional eg: Firewalls / Security programs, Antivirus programs, VPN’s etc

https://myaccount.google.com/security

image

image

image

I already removed the third party apps (emclient) from google to see if it would just reconnect. I also turned off all my antivirus etc (i dont run a firewall, except my router) and my vpn is off,

When I click finish, it goes to google to ask for authorization, then that page dissapears and emclient is still on the page that says finish (the email account setiup)… If I click finish, it does it again… (asks for auth at google etc.)

I also get a certificate error for POP/IMAP accounts now:

Will be contacting Avast.

This is a known issue for antivirus programs. My solution is to stop them from trying to do what they are trying.

Here’s their problem:
When people make SSL or TLS (secure connections) to websites or email downloads, it is impossible to see what is being sent them. That is what is meant by secure. So the poor antivirus program cannot see the problem until it is decrypted and saved on the computer. To solve this problem, antivirus programs try and become a man in the middle, where you connect to them (inside your computer), then they send the message to the cloud contact. That way they can protect you. Some routers have attempted this as well.

The problem is, that these antivirus programs aren’t as good as our browsers or Windows and making the connections and maintaining the certificates and create vulnerabilities by doing their job poorly. My experience is they ALL create more problems than they solve and we need to turn off their SSL protection or however they label their man in the middle account between us and our email, banks, etc.

Let Windows and the antivirus attack the malware once it has hit your computer. Probably, you’ll never get any if you are a safe browser, and if something gets through, they’ll grab it once it lands. These antivirus programs aren’t any good at attacking them while in the air and just make us more vulnerable.

This may help his issue (i normally just accept the cert and it works)…

But, on my machine, I have had issues with Avast checking the emails… and have since disabled it for a long long time now.

Nothing in the middle to make issues… Emclient just wont connect…

I agree with you. Neither Avast nor AVG nor McAfee should be on any computer. However, there is also a general issue with antivirus programs inserting themselves as a man in the middle to protect us by scanning incoming and outgoing traffic and creating more security and other issues than they solve by being insecure in how they do it. So, even if you were using a better antivirus program, I’d still suggest removing email or secure online or other label they give to their traffic filtering.

I have now tried completely uninstalling avast as well as a complete reinstall of emclient. I still cant seem to get the google to auth/the email. I’ve also logged into my google account and done everything I can imagine to allow the auth to happen. Just not working anymore… Really hurting here without my emclient.

@vernonwebsites

When I click finish, it goes to google to ask for authorization, then that page dissapears and emclient is still on the page that says finish (the email account setiup)… If I click finish, it does it again… (asks for auth at google etc.

As you have now already disabled your Antivirus and VPN program and don’t run optional Firewalls, and done a clean install of eM Client & removed eM Client from your Google acct online, then might be a “browser cache issue” or “some other background program” starting up interfering with eM Client authorising at the end of the wizard.

I would next try clearing the cache from your browser. Might be a corrupted browser cache. Even try an alternate browser “as the default” in OS settings incase it’s a browser problem with the Google autho.

Failing that try disabling all (non OS) user background tasks and reboot and see if it will authorise then. If that then authorises ok in eM Client, you then enable those background tasks one at a time & reboot till you find the culprit.

Lastly try a another “Test login user profile” as might be your current computer profile has an issue.

I have been able to connect now, but had to go the old fashioned way of just manually entering in the servers etc and not using the automatic way with the auth from google etc.