In the past few weeks something apparently has changed with xcode/Apple which is causing our iOS regression tests to hang on authentication using Firebase.
Googling the interleaved log error Error enumerating all transactions: Error Domain=ASDErrorDomain Code=509 "No active account" UserInfo={NSLocalizedDescription=No active account} seems to be related to "Store Kit".
The authentication method works perfectly fine when running the app - this only occurs in our regression tests.
Error enumerating unfinished transactions: Error Domain=ASDErrorDomain Code=509 "No active account" UserInfo={NSLocalizedDescription=No active account}
[OlyPro.AuthController][logout()]
Error enumerating all transactions: Error Domain=ASDErrorDomain Code=509 "No active account" UserInfo={NSLocalizedDescription=No active account}
[OlyPro.AuthController][email_login(vc:email:password:)]
$$$ + waiting for login to complete + $$$
$$$ + waiting for login to complete + $$$
func email_login(vc: UIViewController?, email: String, password: String) {
os_log("[%s][%s]", log: .default, type: .debug, String(describing: self), #function)
Auth.auth().signIn(withEmail: email, password: password) {(authResult, error) in
os_log("[%s][%s] signIn", log: .default, type: .debug, String(describing: self), #function)
if let user = authResult?.user {
NotificationCenter.default.post(name: .loginComplete, object: nil, userInfo: nil)
os_log("[%s][%s] * signIn success %@ *", log: .default, type: .debug, String(describing: self), #function, user)
if vc != nil {
vc!.performSegue(withIdentifier: "email_login_segue", sender: self)
}
} else {
NotificationCenter.default.post(name: .loginFailed, object: nil, userInfo: nil)
os_log("[%s][%s] * signIn fail :: %@", log: .default, type: .error, String(describing: self), #function, String(describing: error))
if vc != nil {
let dialogMessage = UIAlertController(title: "Attention", message: error?.localizedDescription, preferredStyle: .alert)
let ok = UIAlertAction(title: "OK", style: .default, handler: { (action) -> Void in
os_log("[%s][%s] Ok button tapped", log: .default, type: .debug, String(describing: self), #function)
})
dialogMessage.addAction(ok)
vc!.present(dialogMessage, animated: true, completion: nil)
}
}
}