Gmail stops working after a while

Delta Chat version


Expected behavior

I set up Gmail as provider with OAuth autoconfigure. It works. I would expect it to continue working.

Actual behavior

After a while, DeltaChat stops working with error “Could not connect to IMAP-server (Error #6)”.

It works again if I clear app data and set up everything again from the beginning.

Steps to reproduce the problem

  1. Set up Gmail account with OAuth2 simplified setup.
  2. Send and receive chat messages.

hello @bluebirch, welcome to the forum :tada:
I don’t know what is going on there, but while this bug is solved you could enable less secure apps in your google account settings:
this way you can disable OAuth in Delta Chat.
Also I recommend to report this issue on github rather than here: Sign in to GitHub · GitHub
and if possible provide the full log there.
Thanks, for reporting this!!!

I don’t know what’s going on either, but after playing around a while, it seems that Gmail just refuses connections from the client after a while. If I change my network (for example turn off WiFi), DeltaChat reconnects and it works again. It behaves as if there was some kind of throttling mechanism on the Gmail side, but that doesn’t really make sense: other IMAP clients work just fine and I can’t imagine DeltaChat is more active over IMAP than other mail clients?

It’s not the authentication with OAuth2, that one works. There are just temporary service failures where Gmail servers no longer accepts connections. And that can be helped by switching networks. Doesn’t make any sense at all to me.

"You can only use 15 IMAP connections per account. If you have many email clients getting messages from Gmail at the same time, you may see the “Too many simultaneous connections” error.

If you use multiple email clients or devices for the same Gmail account, try closing or signing out of some."

Maybe I should shut down my other IMAP clients and see if that helps…

1 Like

Google currently wants us to verify that we’re real until then they limit how many people can login with oauth2 in deltachat.
But your problem seems unrelated to that one as you can still login via oauth2.

I haven’t had this problem since I shut down my other IMAP clients, so I guess there’s some restriction or throttling on behalf of Google that caused this error.