问题
I'm testing login authentication in swift using firebase and getting errors get output frames failed, state 8196. This is the Log which I get
2018-11-19 11:14:42.259565+0530 Loginpage[9509:563668] - <AppMeasurement>[I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
2018-11-19 11:14:42.285775+0530 Loginpage[9509:563581] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
2018-11-19 11:14:42.398664+0530 Loginpage[9509:563677] 5.12.0 - [Firebase/Analytics][I-ACS023007] Analytics v.50300000 started
2018-11-19 11:14:42.398946+0530 Loginpage[9509:563677] 5.12.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled
2018-11-19 11:14:42.875018+0530 Loginpage[9509:563677] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x7fe0c1a01780] get output frames failed, state 8196
2018-11-19 11:14:42.875221+0530 Loginpage[9509:563677] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x7fe0c1a01780] get output frames failed, state 8196
2018-11-19 11:14:42.875850+0530 Loginpage[9509:563677] TIC Read Status [1:0x0]: 1:57
2018-11-19 11:14:42.876003+0530 Loginpage[9509:563677] TIC Read Status [1:0x0]: 1:57
2018-11-19 11:14:47.237996+0530 Loginpage[9509:563581] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/kanagarajunatesan/Library/Developer/CoreSimulator/Devices/05C5E353-956C-43E9-AD48-5B1AD759ECC5/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2018-11-19 11:14:47.239077+0530 Loginpage[9509:563581] [MC] Reading from private effective user settings.
2018-11-19 11:14:52.620636+0530 Loginpage[9509:563668] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C2.1:2][0x7fe0bed28ef0] get output frames failed, state 8196
2018-11-19 11:14:52.620812+0530 Loginpage[9509:563668] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C2.1:2][0x7fe0bed28ef0] get output frames failed, state 8196
2018-11-19 11:14:52.621483+0530 Loginpage[9509:563668] TIC Read Status [2:0x0]: 1:57
2018-11-19 11:14:52.621723+0530 Loginpage[9509:563668] TIC Read Status [2:0x0]: 1:57
回答1:
I just assume you might use an if statement in the closure. The if statement could be like this
@IBAction func logInPressed(_ sender: AnyObject) {
Auth.auth().signIn(withEmail: emailTextfield.text!, password: passwordTextfield.text!) { (user, error) in
if error == nil {
print("Sucessfully loged in!")
self.performSegue(withIdentifier: "goToUserDetailVC", sender: self)
}
else {
print("Cannot log in the user")
}
}
}
In this method, I choose an e-mail registration and if there is no error (error == nil) it will goes to the where the segue leads.
I got the same error code in my first try. Then I realize I create the if statement wrong (error != nil). The problem in my code and why I got failed state 8196 was the if statement and this is how I solved it. I hope it helps someone else.
来源:https://stackoverflow.com/questions/53369026/im-testing-login-authentication-in-swift-using-firebase-and-getting-errors-get