google / GoogleSignIn-iOS

Enables iOS and macOS apps to sign in with Google.
https://developers.google.com/identity/sign-in/ios
Apache License 2.0
508 stars 202 forks source link

Connection error making token request to 'https://oauth2.googleapis.com/token': The request timed out.. #100

Open tanand7 opened 2 years ago

tanand7 commented 2 years ago

Google sign in NOT working and returns connection error.

Error! Optional(Error Domain=org.openid.appauth.general Code=-5 "Connection error making token request to 'https://oauth2.googleapis.com/token': The request timed out.." UserInfo={NSLocalizedDescription=Connection error making token request to 'https://oauth2.googleapis.com/token': The request timed out.., NSUnderlyingError=0x600000634030 {Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2102, NSUnderlyingError=0x6000006392c0 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <0F0E1E47-8CBA-499F-AEE1-957F160BB706>.<2>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <0F0E1E47-8CBA-499F-AEE1-957F160BB706>.<2>"
), NSLocalizedDescription=The request timed out., NSErrorFailingURLStringKey=https://oauth2.googleapis.com/token, NSErrorFailingURLKey=https://oauth2.googleapis.com/token, _kCFStreamErrorDomainKey=4}}})

To reproduce: follow the instructions from https://developers.google.com/identity/sign-in/ios/start

[Clone the project](git clone https://github.com/google/GoogleSignIn-iOS) and run it to the device/simulator and click the sign in button.

Environment:

Xcode 13.2.1 (13C100)

Device: Simulator/Phone iOS 15.2

tanand7 commented 2 years ago

Seems to be resolved automatically

KeyurPrajapati commented 2 years ago

I am facing the same error from yesterday.

petea commented 2 years ago

Are you still able to reproduce the time out error?

KeyurPrajapati commented 2 years ago

Yes,

<3C3C466E-FF37-4146-851C-7FAD9EFD0C17>.<1> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2102, NSUnderlyingError=0x60000218d530 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <3C3C466E-FF37-4146-851C-7FAD9EFD0C17>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <3C3C466E-FF37-4146-851C-7FAD9EFD0C17>.<1>" ), NSLocalizedDescription=The request timed out., NSErrorFailingURLStringKey=https://oauth2.googleapis.com/token, NSErrorFailingURLKey=https://oauth2.googleapis.com/token, _kCFStreamErrorDomainKey=4}
rjt3662 commented 2 years ago

I'm also facing this error

finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." 
UserInfo={_kCFStreamErrorCodeKey=60, NSUnderlyingError=0x600003a739f0 
{Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" 
UserInfo={_NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en1, _kCFStreamErrorCodeKey=60, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <7E276A0C-D984-426B-BE35-1D9D851D4AED>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <7E276A0C-D984-426B-BE35-1D9D851D4AED>.<1>"
), NSLocalizedDescription=The request timed out., NSErrorFailingURLStringKey=https://oauth2.googleapis.com/token, NSErrorFailingURLKey=https://oauth2.googleapis.com/token, _kCFStreamErrorDomainKey=1}
Connection error making token request to 'https://oauth2.googleapis.com/token': The request timed out..

Does anyone got its solution?

harrymash2006 commented 2 years ago

I am also having this issue

tanand7 commented 2 years ago

This is happening randomly. Sometimes it works and sometimes it doesn't.

Another point is, it doesn't work in India region. We tested the same app at same time from US and India. People at US were able to login with google while people from India couldn't. We also tried to login with a VPN from India and it worked.

rahulpatel2311 commented 2 years ago

@petea I am also facing the same issue for 8 days. Xcode 13.2.1 (13C100) Device: Simulator/Phone iOS 15.2

Any update?

AravindBG commented 2 years ago

We are also facing the same issue for the past couple of days. It won't work for some ISPs. But work on others.

Task <2B4B8DE5-DD5A-4DEA-873E-C7312CA9E974>.<1> finished with error [-1200] Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, NSErrorPeerCertificateChainKey=( "<cert(0x12e80ce00) s: blockeddomain.asianetindia.com i: blockeddomain.asianetindia.com>" ), NSErrorClientCertificateStateKey=0, NSErrorFailingURLKey=https://oauth2.googleapis.com/token, NSErrorFailingURLStringKey=https://oauth2.googleapis.com/token, NSUnderlyingError=0x282f025e0 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x28109c960>, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, kCFStreamPropertySSLPeerCertificates=( "<cert(0x12e80ce00) s: blockeddomain.asianetindia.com i: blockeddomain.asianetindia.com>" )}}, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <2B4B8DE5-DD5A-4DEA-873E-C7312CA9E974>.<1>" ), _kCFStreamErrorCodeKey=-9802, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <2B4B8DE5-DD5A-4DEA-873E-C7312CA9E974>.<1>, NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x28109c960>, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made.} Error Connection error making token request to 'https://oauth2.googleapis.com/token': An SSL error has occurred and a secure connection to the server cannot be made.

jaspermayone commented 2 years ago

I am facing this on both the Apple Mail client and the Spark mail client.

MacOS Monterey 12.3.1 on a 2020 Macbook Pro 13"

ghost commented 2 years ago

Good afternoon, any news on this? Regards

arioch1984 commented 1 year ago

I'm also interested in this issue

jksmx commented 5 months ago

metoo