Community Discussions and Support
Problem accessing Gmail using OAUTH2

Until today (29th Oct) my Pegasus Mail (v4.81 public beta of Jan 2023) configuration has functioned perfectly when accessing my several Gmail accounts using the OAUTH2 capability that David introduced into PMail, but as of this morning every attempt to access any of my accounts on Gmail's POP3 server results in an 'Invalid credentials' error.


Included below is a sanitised version of the error message I get when I try to access the Gmail mailbox for one of my usernames; I've hidden my IP address and also the lengthy string which is presumably associated with the OAUTH2 dialogue.


14:19:59.845: --- 29 Oct 2023, 14:19:59.845 ---
14:19:59.845: Connect to 'pop.gmail.com', timeout 90 seconds, flags 16842753.
14:20:00.879: [] Setting SNI hostname to 'pop.gmail.com'
14:20:01.011: [
] SSL/TLS session established
14:20:01.011: [] TLS_AES_256_GCM_SHA384, TLSv1.3, Kx=any, Au=any, Enc=AESGCM(256), Mac=AEAD
14:20:01.011: [
] Peer's certificate name is '/CN=pop.gmail.com'.
14:20:01.027: >> +OK Gpop ready for requests from xx.xxx.xx.xxx k17mb79212604wrz
14:20:01.049: << AUTH XOAUTH2
[Snipped]
14:20:01.828: << STAT
14:20:01.881: >> -ERR [AUTH] Invalid credentials.


Is anyone else experiencing issues with accessing Gmail today? I definitely haven't changed anything in my PMail configuration so can only surmise that something has happened at the Gmail end...


Thanks in advance for any guidance and advice


--
Martin


Until today (29th Oct) my Pegasus Mail (v4.81 public beta of Jan 2023) configuration has functioned perfectly when accessing my several Gmail accounts using the OAUTH2 capability that David introduced into PMail, but as of this morning every attempt to access any of my accounts on Gmail&#039;s POP3 server results in an &#039;Invalid credentials&#039; error. Included below is a sanitised version of the error message I get when I try to access the Gmail mailbox for one of my usernames; I&#039;ve hidden my IP address and also the lengthy string which is presumably associated with the OAUTH2 dialogue. 14:19:59.845: --- 29 Oct 2023, 14:19:59.845 --- 14:19:59.845: Connect to &#039;pop.gmail.com&#039;, timeout 90 seconds, flags 16842753. 14:20:00.879: [*] Setting SNI hostname to &#039;pop.gmail.com&#039; 14:20:01.011: [*] SSL/TLS session established 14:20:01.011: [*] TLS_AES_256_GCM_SHA384, TLSv1.3, Kx=any, Au=any, Enc=AESGCM(256), Mac=AEAD 14:20:01.011: [*] Peer&#039;s certificate name is &#039;/CN=pop.gmail.com&#039;. 14:20:01.027: &gt;&gt; +OK Gpop ready for requests from xx.xxx.xx.xxx k17mb79212604wrz 14:20:01.049: &lt;&lt; AUTH XOAUTH2 [Snipped] 14:20:01.828: &lt;&lt; STAT 14:20:01.881: &gt;&gt; -ERR [AUTH] Invalid credentials. Is anyone else experiencing issues with accessing Gmail today? I definitely haven&#039;t changed anything in my PMail configuration so can only surmise that something has happened at the Gmail end... Thanks in advance for any guidance and advice -- Martin

I am not having any problem with POP3 checks of my Gmail account via OAUTH2.


The Gmail configurator in Pegasus Mail has a "Revalidate" button. The help file makes reference to using it if you get an error message indicating that your access needs to be re-established. I don't know what such an error would look like nor do I know exactly what the the button does behind the scenes. I would first make sure that you can login to the Gmail web interface. If that works I would then try the 'Revalidate' button. Lastly would be to use the 'Delete profile' button and then recreate it.


I am not having any problem with POP3 checks of my Gmail account via OAUTH2. The Gmail configurator in Pegasus Mail has a &quot;Revalidate&quot; button. The help file makes reference to using it if you get an error message indicating that your access needs to be re-established. I don&#039;t know what such an error would look like nor do I know exactly what the the button does behind the scenes. I would first make sure that you can login to the Gmail web interface. If that works I would then try the &#039;Revalidate&#039; button. Lastly would be to use the &#039;Delete profile&#039; button and then recreate it.

Hello Brian, many thanks for your reply to my original posting.


I had already verified that web access to my several Gmail accounts worked correctly, and the Gmail app on my iPhone was also still working correctly, so the usernames and passwords as used in PMail were obviously still valid.


I then remembered (shortly before seeing your message!) that there was a Gmail configurator in PMail so I looked at it and then tried the 'Revalidate' function in the configurator for one of my Gmail accounts and sure enough it worked, so I've now gone through and successfully revalidated PMail's access to each of my Gmail accounts.


Quite why PMail's previous ability to successfully access my Gmail accounts should suddenly start throwing up errors is anyone's guess, but I wonder if it might be because I had originally set up PMail's OAUTH2 access to Gmail with an earlier beta version of David's software - I had used the w32-481-b7.exe (pre-release 2) version back in early December 2022. Perhaps there was some sort of expiry on the OAUTH2 information that Gmail provided back to PMail when I did the configuration at that time.


Anyway, normal PMail service has happily now been restored... :-)


--
Martin


Hello Brian, many thanks for your reply to my original posting. I had already verified that web access to my several Gmail accounts worked correctly, and the Gmail app on my iPhone was also still working correctly, so the usernames and passwords as used in PMail were obviously still valid. I then remembered (shortly before seeing your message!) that there was a Gmail configurator in PMail so I looked at it and then tried the &#039;Revalidate&#039; function in the configurator for one of my Gmail accounts and sure enough it worked, so I&#039;ve now gone through and successfully revalidated PMail&#039;s access to each of my Gmail accounts. Quite why PMail&#039;s previous ability to successfully access my Gmail accounts should suddenly start throwing up errors is anyone&#039;s guess, but I wonder if it might be because I had originally set up PMail&#039;s OAUTH2 access to Gmail with an earlier beta version of David&#039;s software - I had used the w32-481-b7.exe (pre-release 2) version back in early December 2022. Perhaps there was some sort of expiry on the OAUTH2 information that Gmail provided back to PMail when I did the configuration at that time. Anyway, normal PMail service has happily now been restored... :-) -- Martin

I'm glad you have it working.


It the failure did not start occurring immediately after a PMail upgrade then I doubt that was the cause.


It will be interesting to see if other early Gmail OAUTH2 adopters start experiencing failures that require revalidation.


I&#039;m glad you have it working. It the failure did not start occurring immediately after a PMail upgrade then I doubt that was the cause. It will be interesting to see if other early Gmail OAUTH2 adopters start experiencing failures that require revalidation.

Expereienced the same issue this morning. Working fine before last night - this morning recevied the same "Invalid credentials" error on all 3 gmail accounts I have configured on all three computers. Did the revalidate for all three gmail accounts on one computer and it resolved the issue. Then checked on a second computer and I had to do the revalidate process on it to make it work, and then on a 3rd computer. All working fine right now. Thought it may have something to do with the time change until I saw this thread, so guess not.


Expereienced the same issue this morning. Working fine before last night - this morning recevied the same &quot;Invalid credentials&quot; error on all 3 gmail accounts I have configured on all three computers. Did the revalidate for all three gmail accounts on one computer and it resolved the issue. Then checked on a second computer and I had to do the revalidate process on it to make it work, and then on a 3rd computer. All working fine right now. Thought it may have something to do with the time change until I saw this thread, so guess not.

This happened to me this morning as well. A Revalidate fixed it.


I am starting to think that Google is forcing a revalidate on some sort of schedule or trigger. I have two Gmail accounts one of which I still authenticate with an app password. Google may be incentivizing me to switch my OAUTH2 one back to an app password.


Edit: I just did some digging to see if I could identify the timing of this required revalidate. I was surprised to see that the new OAUTH2 profile had not replaced the original one. The original is date stamped 3/5/2023, the new on is 11/5/2023. So, for me it was precisely 8 months.


If you are curious, the OAUTH2 profile files are in an \OAUTH2 subdirectory of you mailbox directory. The files have a .OA2 extension.


This happened to me this morning as well. A Revalidate fixed it. I am starting to think that Google is forcing a revalidate on some sort of schedule or trigger. I have two Gmail accounts one of which I still authenticate with an app password. Google may be incentivizing me to switch my OAUTH2 one back to an app password. Edit: I just did some digging to see if I could identify the timing of this required revalidate. I was surprised to see that the new OAUTH2 profile had not replaced the original one. The original is date stamped 3/5/2023, the new on is 11/5/2023. So, for me it was precisely 8 months. If you are curious, the OAUTH2 profile files are in an \OAUTH2 subdirectory of you mailbox directory. The files have a .OA2 extension.
edited Nov 5 '23 at 2:23 pm

For me the last validation was on Aug 4th, and the new one was Aug 5th, so 3 months. Seems like the old one expired after 3 months.


For me the last validation was on Aug 4th, and the new one was Aug 5th, so 3 months. Seems like the old one expired after 3 months.
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft