ENOTCONN when verifying password reset code

196 views
Skip to first unread message

Aaron Sullivan

unread,
May 23, 2018, 8:01:38 PM5/23/18
to Firebase Google Group
Hello,

I'm building password reset functionality for our iOS app. What I would like to do is when the user clicks the link in their email, the app opens to a password reset screen that validates the code.

Currently I have the %LINK% customized as a universal link for my domain, and most times this is working:

1. User clicks link
2. Since it's a universal link, iOS hands it to our app via "continue userActivity"
3. Link is parsed for oobCode, and handed off to password reset screen
4. When the screen receives this code, it calls verifyPasswordResetCode to check the validity.

However, sometimes I'm receiving the following error (logged in console):

Error Domain=FIRAuthErrorDomain Code=17020 "Network error (such as timeout, interrupted connection or unreachable host) has occurred." UserInfo={error_name=ERROR_NETWORK_REQUEST_FAILED, NSLocalizedDescription=Network error (such as timeout, interrupted connection or unreachable host) has occurred., NSUnderlyingError=0x106f9ee00 {Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={NSUnderlyingError=0x106f84920 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={_kCFStreamErrorCodeKey=57, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=https://www.googleapis.com/identitytoolkit/v3/relyingparty/resetPassword?key=[snip], NSErrorFailingURLKey=https://www.googleapis.com/identitytoolkit/v3/relyingparty/resetPassword?key=[snip], _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=57, NSLocalizedDescription=The network connection was lost.}}}


A sample of the console debug logging during this time:

processing user activity url: https://my-app.herokuapp.com/account/action?mode=resetPassword&oobCode=[snip]&apiKey=[snip]


2018-05-23 17:45:56.881895-0500 My-App[418:57475] Returning ENOTCONN because protocol has not yet been set up


2018-05-23 17:45:56.882032-0500 My-App[418:57475] TIC Read Status [8:0x106fce730]: 1:57


2018-05-23 17:45:56.882075-0500 My-App[418:57475] TIC Read Status [8:0x106fce730]: 1:57


2018-05-23 17:45:56.885281-0500 My-App[418:57475] Task <id>.<2> HTTP load failed (error code: -1005 [1:57])


2018-05-23 17:45:56.887475-0500 My-App[418:57637] Task <id>.<2> finished with error - code: -1005


"verifyPasswordResetCode" nil Optional(Error Domain=FIRAuthErrorDomain Code=17020 "Network error (such as timeout, interrupted connection or unreachable host) has occurred." UserInfo={error_name=ERROR_NETWORK_REQUEST_FAILED, NSLocalizedDescription=Network error (such as timeout, interrupted connection or unreachable host) has occurred., NSUnderlyingError=0x106f9ee00 {Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={NSUnderlyingError=0x106f84920 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={_kCFStreamErrorCodeKey=57, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=https://www.googleapis.com/identitytoolkit/v3/relyingparty/resetPassword?key=[snip], NSErrorFailingURLKey=https://www.googleapis.com/identitytoolkit/v3/relyingparty/resetPassword?key=[snip], _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=57, NSLocalizedDescription=The network connection was lost.}}})2018-05-23 17:46:00.006229-0500 My-App[418:56982] Status bar could not find cached time string image. Rendering in-process.


2018-05-23 17:46:00.006229-0500 My-App[418:56982] Status bar could not find cached time string image. Rendering in-process.


Device: iOS iPhone 5s
iOS: 11.3.1
CocoaPods: Firebase/Auth (4.6.0)

Any help would be appreciated!

Reply all
Reply to author
Forward
0 new messages