gmail, revisited
Moderator: athenian200
-
UCyborg
- Astronaut

- Posts: 541
- Joined: 2019-01-10, 09:37
- Location: Slovenia
Re: gmail, revisited
Is it just me, or is OAuth2 completely broken now? Going by test profile that uses Thunderbird's OAuth2 credentials. I get an error that it can't connect to imap.gmail.com. Settings weren't changed since 2024 when it worked.
-
athenian200
- Contributing developer

- Posts: 1619
- Joined: 2018-10-28, 19:56
- Location: Georgia
Re: gmail, revisited
If it is, it probably just means I need to update the OAuth2 code, since it may be a bit of a moving target being a Google standard.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind
-
Bilbo47
- Lunatic

- Posts: 361
- Joined: 2017-11-18, 04:24
Re: gmail, revisited
Re a topic from upthread: Recently starting using Epyrus against two large (80,000 to 90,000 messages) Gmail accounts with many folders. Also began letting EP process several accounts at the same time, from both fast and slow servers. All seems okay under normal usage; job one was to delete old/spurious messages. Factors include:
- EP is multithreaded, or at least performs+behaves as such
- Gmail as a server supports more than one connection per account, which means it can host more than one simultaneously active and long-running IMAP command
If EP gives a command and does not receive a response quickly enough, it may proceed as if no response is pending, and issue following commands.
Gmail's responses may take longer with larger accounts.
So I can see how EP's losing track of messages could be because Gmail's non-response looks like "no folders", for example.
Is there a timeout setting that could be increased, either client-wide or per-account?
Sometimes I get going too fast for the server to keep up, and EP's local copy of the IMAP data-structure gets out of sync, and/or the UI is stale. Could be moving/copying/deleting messages/folders, and sometimes the server seems to just quit partway through a long-running operation. The partial success is not visible until after closing and re-opening EP, when it re-downloads IMAP data. (Re-subscribing to a folder is a partial fix, especially for servers that are even slower than Gmail.) Then have to re-do the operation from where the server left off. Operation would be moving/renaming a folder which contains a bunch of sub-folders.
This category of problem could be partially from that Gmail is not at all a standard IMAP server; it only presents an IMAP-like layer over its native backend, which could be imperfect, especially with timing around long operations.
- EP is multithreaded, or at least performs+behaves as such
- Gmail as a server supports more than one connection per account, which means it can host more than one simultaneously active and long-running IMAP command
If EP gives a command and does not receive a response quickly enough, it may proceed as if no response is pending, and issue following commands.
Gmail's responses may take longer with larger accounts.
So I can see how EP's losing track of messages could be because Gmail's non-response looks like "no folders", for example.
Is there a timeout setting that could be increased, either client-wide or per-account?
Sometimes I get going too fast for the server to keep up, and EP's local copy of the IMAP data-structure gets out of sync, and/or the UI is stale. Could be moving/copying/deleting messages/folders, and sometimes the server seems to just quit partway through a long-running operation. The partial success is not visible until after closing and re-opening EP, when it re-downloads IMAP data. (Re-subscribing to a folder is a partial fix, especially for servers that are even slower than Gmail.) Then have to re-do the operation from where the server left off. Operation would be moving/renaming a folder which contains a bunch of sub-folders.
This category of problem could be partially from that Gmail is not at all a standard IMAP server; it only presents an IMAP-like layer over its native backend, which could be imperfect, especially with timing around long operations.
-
back2themoon
- Knows the dark side

- Posts: 3006
- Joined: 2012-08-19, 20:32
Re: gmail, revisited
If you are going to use OAuth2, then you will have to keep up with Thunderbird's (?) updates on it. I am pretty sure whatever issues arise with OAuth2 and Epyrus are because of:athenian200 wrote: ↑2025-09-06, 09:55If it is, it probably just means I need to update the OAuth2 code, since it may be a bit of a moving target being a Google standard.
a) OAuth2 being crappy in its own right.
b) Google, Yahoo and whoever else implements it keep tweaking it to their own tastes.
And that is why Normal password authentication will always behave better. I've confirmed this situation many times over the years and finally deemed OAuth2 as currently unusable in Epyrus, at least for me (sync failures, folder issues and other minor but annoying stuff).
-
UCyborg
- Astronaut

- Posts: 541
- Joined: 2019-01-10, 09:37
- Location: Slovenia
Re: gmail, revisited
@back2themoon
I agree. It was just a test profile I setup mostly out of curiosity. I rarely use personal mail and don't have any serious mail client setup on my main computer, tend to just check it through web interface every once in a while. Workplace is another story.
The software I'm dealing with there, it has the ability to notify about some things via mail. Sometime ago they added ability to use Google's OAuth besides the normal password method. It's bullshit, you have to go to that Google console web page or whatever to generate that key, where you get JSON file you can import into software and then it works.
And some customers have been asking if we can implement Microsoft's version of this nonsense! Personally, I'd prefer to delete all OAuth code we already have and tell everyone to fuck off and find a normal mail provider.
I agree. It was just a test profile I setup mostly out of curiosity. I rarely use personal mail and don't have any serious mail client setup on my main computer, tend to just check it through web interface every once in a while. Workplace is another story.
The software I'm dealing with there, it has the ability to notify about some things via mail. Sometime ago they added ability to use Google's OAuth besides the normal password method. It's bullshit, you have to go to that Google console web page or whatever to generate that key, where you get JSON file you can import into software and then it works.
And some customers have been asking if we can implement Microsoft's version of this nonsense! Personally, I'd prefer to delete all OAuth code we already have and tell everyone to fuck off and find a normal mail provider.