这是什么意思?
FIRAuthErrorDomain Code=17020
我正试图在iOS上的FireBase应用中以用户身份加入。我在 Firabase 控制台上启用了电子邮件身份验证方法,并创建了一个用户。
以下是完整错误:
Error Domain=FIRAuthErrorDomain Code=17020 "Network error (such as timeout, interrupted connection or unreachable host) has occurred." UserInfo={NSUnderlyingError=0x134fadd30 {Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: ->, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9806, NSErrorPeerCertificateChainKey=<CFArray - [-]>{type = immutable, count = 3, values = (
0 : <cert(-) s: *.googleapis.com i: Google Internet Authority G2>
1 : <cert(-) s: Google Internet Authority G2 i: GeoTrust Global CA>
2 : <cert(-) s: GeoTrust Global CA i: Equifax Secure Certificate Authority>
)}, NSUnderlyingError=- {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: ->, _kCFNetworkCFStreamSSLErrorOriginalValue=-9806, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9806, kCFStreamPropertySSLPeerCertificates=<CFArray 0x134d7e240 [0x1a0880b68]>{type = immutable, count = 3, values = (
0 : <cert(-) s: *.googleapis.com i: Google Internet Authority G2>
1 : <cert(-) s: Google Internet Authority G2 i: GeoTrust Global CA>
2 : <cert(-) s: GeoTrust Global CA i: Equifax Secure Certificate Authority>
)}}}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=-, NSErrorFailingURLStringKey=https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=-, NSErrorClientCertificateStateKey=0}}, error_name=ERROR_NETWORK_REQUEST_FAILED, NSLocalizedDescription=Network error (such as timeout, interrupted connection or unreachable host) has occurred.}
可能是什么原因?
我在连接到Wi-Fi的iOS设备上运行此功能。
这是生成此错误的代码(免责声明:我从Firebase示例中获取此代码):
- (IBAction)didTapEmailLogin:(id)sender {
[self showSpinner:^{
[[FIRAuth auth] signInWithEmail:_emailField.text
password:_passwordField.text
completion:^(FIRUser *user, NSError *error) {
[self hideSpinner:^{
if (error) {
[self showMessagePrompt:error.localizedDescription];
return;
}
[[[_ref child:@"users"] child:user.uid]
observeEventType:FIRDataEventTypeValue
withBlock:^(FIRDataSnapshot * _Nonnull snapshot) {
if (![snapshot exists]) {
[self promptForNewUserName:user];
} else {
//[self performSegueWithIdentifier:@"signIn" sender:nil];
}
}];
}];
}];
}];
}