firebase-ios-sdk
firebase-ios-sdk copied to clipboard
Firebase authentication,AuthErrorCode.internalError (Swift)
Description
Firebase authentication, AuthErrorCode.internalError section works even if the iOS password is entered incorrectly or incompletely.
func loginFirebase(self: UIViewController,email:String,password:String, completion: @escaping (_ success: Int) -> Void) {
let auth = Auth.auth()
auth.signIn(withEmail: email, password: password) { result, error in
if error != nil {
if let nsError = error as? NSError {
/*
let userInfo = nsError.userInfo
if let desc = userInfo["NSLocalizedDescription"] as? String {
print("gelenveri:" + "\(userInfo)")
Tools().alertToast(self: self, message: desc)
}*/
switch AuthErrorCode(_nsError: nsError) {
case AuthErrorCode.invalidEmail :
let desc = "Email yanlış. Email Adresi'nizi [email protected] gibi giriniz."
Tools().alertToast(self: self, message: desc)
case AuthErrorCode.tooManyRequests :
let desc = "Birçok başarısız giriş denemesi nedeniyle bu hesaba erişim geçici olarak devre dışı bırakıldı. Şifrenizi sıfırlayarak hemen geri yükleyebilir veya daha sonra tekrar deneyebilirsiniz."
Tools().alertToast(self: self, message: desc)
case AuthErrorCode.internalError :
let desc = "Dahili bir hata oluştu veya Şifreniz yanlış"
Tools().alertToast(self: self, message: desc)
case AuthErrorCode.wrongPassword :
let desc = "Şifreniz yanlış"
Tools().alertToast(self: self, message: desc)
case AuthErrorCode.emailAlreadyInUse :
let desc = "E-posta adresi zaten başka bir hesap tarafından kullanılıyor."
Tools().alertToast(self: self, message: desc)
case AuthErrorCode.userDisabled :
let desc = "Olağandışı etkinlik nedeniyle bu cihazdan gelen tüm istekleri engelledik. Daha sonra tekrar deneyin. [ Birçok başarısız oturum açma girişimi nedeniyle bu hesaba erişim geçici olarak devre dışı bırakıldı. Şifrenizi sıfırlayarak hemen geri yükleyebilir veya daha sonra tekrar deneyebilirsiniz. ]"
Tools().alertToast(self: self, message: desc)
case AuthErrorCode.userNotFound :
let desc = "Kullanıcı Kaydı Yok."
Tools().alertToast(self: self, message: desc)
default:
let desc = "Bilinmeyen hata: \(error?.localizedDescription ?? "Bilinmeyen Hata")"
Tools().alertToast(self: self, message: desc)
}
}
}else {
Tools().alertToast(self: self, message: "Üye girişi başarılı.")
completion(1)
}
}
}
Reproducing the issue
No response
Firebase SDK Version
10.16.0
Xcode Version
15
Installation Method
Swift Package Manager
Firebase Product(s)
Authentication
Targeted Platforms
iOS
Relevant Log Output
2023-10-30 14:21:35.079972+0300 AppAuthTest[1581:243485] [] nw_path_necp_check_for_updates Failed to copy updated result (22)
2023-10-30 14:21:35.547241+0300 AppAuthTest[1581:243497] 10.16.0 - [FirebaseAnalytics][I-ACS031006] View controller already tracked. Class, ID: Login, -901160994167725533
2023-10-30 14:21:35.547315+0300 AppAuthTest[1581:243497] 10.16.0 - [FirebaseAnalytics][I-ACS031006] View controller already tracked. Class, ID: Login, -901160994167725533
2023-10-30 14:21:35.547333+0300 AppAuthTest[1581:243497] 10.16.0 - [FirebaseAnalytics][I-ACS031006] View controller already tracked. Class, ID: Login, -901160994167725533
2023-10-30 14:21:35.547348+0300 AppAuthTest[1581:243497] 10.16.0 - [FirebaseAnalytics][I-ACS031006] View controller already tracked. Class, ID: Login, -901160994167725533
2023-10-30 14:21:35.547531+0300 AppAuthTest[1581:243497] 10.16.0 - [FirebaseAnalytics][I-ACS031006] View controller already tracked. Class, ID: Login, -901160994167725533
2023-10-30 14:21:35.956195+0300 AppAuthTest[1581:243665] 10.16.0 - [FirebaseAnalytics][I-ACS031010] Tracking view controller. Class, ID: UIAlertController, -901160994167725532
2023-10-30 14:21:35.959781+0300 AppAuthTest[1581:243665] 10.16.0 - [FirebaseAnalytics][I-ACS002003] Engagement timer canceled
2023-10-30 14:21:35.959864+0300 AppAuthTest[1581:243665] 10.16.0 - [FirebaseAnalytics][I-ACS002002] Engagement timer scheduled to fire in approx. (s): 3600
2023-10-30 14:21:35.961293+0300 AppAuthTest[1581:243665] 10.16.0 - [FirebaseAnalytics][I-ACS023051] Logging event: origin, name, params: auto, user_engagement (_e), {
engagement_time_msec (_et) = 35220;
ga_event_origin (_o) = auto;
ga_screen_class (_sc) = Login;
ga_screen_id (_si) = -901160994167725533;
}
2023-10-30 14:21:35.962142+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS023073] Debug mode is enabled. Marking event as debug and real-time. Event name, parameters: user_engagement (_e), {
engagement_time_msec (_et) = 35220;
ga_debug (_dbg) = 1;
ga_event_origin (_o) = auto;
ga_realtime (_r) = 1;
ga_screen_class (_sc) = Login;
ga_screen_id (_si) = -901160994167725533;
}
2023-10-30 14:21:35.998750+0300 AppAuthTest[1581:243665] 10.16.0 - [FirebaseAnalytics][I-ACS023072] Event logged. Event name, event params: user_engagement (_e), {
engagement_time_msec (_et) = 35220;
ga_debug (_dbg) = 1;
ga_event_origin (_o) = auto;
ga_realtime (_r) = 1;
ga_screen_class (_sc) = Login;
ga_screen_id (_si) = -901160994167725533;
}
2023-10-30 14:21:36.002651+0300 AppAuthTest[1581:243665] 10.16.0 - [FirebaseAnalytics][I-ACS002002] Measurement timer scheduled to fire in approx. (s): 0.9541420936584473
2023-10-30 14:21:36.004100+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS023051] Logging event: origin, name, params: auto, screen_view (_vs), {
ga_event_origin (_o) = auto;
ga_previous_class (_pc) = Login;
ga_previous_id (_pi) = -901160994167725533;
ga_screen_class (_sc) = UIAlertController;
ga_screen_id (_si) = -901160994167725532;
}
2023-10-30 14:21:36.005236+0300 AppAuthTest[1581:243485] 10.16.0 - [FirebaseAnalytics][I-ACS023073] Debug mode is enabled. Marking event as debug and real-time. Event name, parameters: screen_view (_vs), {
ga_debug (_dbg) = 1;
ga_event_origin (_o) = auto;
ga_previous_class (_pc) = Login;
ga_previous_id (_pi) = -901160994167725533;
ga_realtime (_r) = 1;
ga_screen_class (_sc) = UIAlertController;
ga_screen_id (_si) = -901160994167725532;
}
2023-10-30 14:21:36.011806+0300 AppAuthTest[1581:243485] 10.16.0 - [FirebaseAnalytics][I-ACS023072] Event logged. Event name, event params: screen_view (_vs), {
ga_debug (_dbg) = 1;
ga_event_origin (_o) = auto;
ga_previous_class (_pc) = Login;
ga_previous_id (_pi) = -901160994167725533;
ga_realtime (_r) = 1;
ga_screen_class (_sc) = UIAlertController;
ga_screen_id (_si) = -901160994167725532;
}
2023-10-30 14:21:36.996665+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS002001] Measurement timer fired
2023-10-30 14:21:36.996763+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS002003] Measurement timer canceled
2023-10-30 14:21:36.999805+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS023105] Event is not subject to real-time event count daily limit. Marking an event as real-time. Event name, parameters: user_engagement (_e), {
engagement_time_msec (_et) = 35220;
ga_debug (_dbg) = 1;
ga_event_origin (_o) = auto;
ga_realtime (_r) = 1;
ga_screen_class (_sc) = Login;
ga_screen_id (_si) = -901160994167725533;
}
2023-10-30 14:21:37.000214+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS023105] Event is not subject to real-time event count daily limit. Marking an event as real-time. Event name, parameters: screen_view (_vs), {
ga_debug (_dbg) = 1;
ga_event_origin (_o) = auto;
ga_previous_class (_pc) = Login;
ga_previous_id (_pi) = -901160994167725533;
ga_realtime (_r) = 1;
ga_screen_class (_sc) = UIAlertController;
ga_screen_id (_si) = -901160994167725532;
}
2023-10-30 14:21:37.010967+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS023087] User property set. Name, value: lifetime_user_engagement (_lte), 35221
2023-10-30 14:21:37.011582+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS023087] User property set. Name, value: session_user_engagement (_se), 35221
2023-10-30 14:21:37.015606+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS012018] Saving bundle. size (bytes): 513
2023-10-30 14:21:37.015984+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS023116] Bundle added to the upload queue. BundleID, timestamp (ms): 3, 1698664895959
2023-10-30 14:21:37.042366+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS023039] Measurement data sent to network. Timestamp (ms), data: 1698664897041, <APMPBMeasurementBatch: 0x2829f6910>
2023-10-30 14:21:37.048728+0300 AppAuthTest[1581:243497] 10.16.0 - [FirebaseAnalytics][I-ACS900000] Uploading data. Host: https://app-measurement.com/a
2023-10-30 14:21:37.202817+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS901006] Received SSL challenge for host. Host: https://app-measurement.com/a
2023-10-30 14:21:37.333893+0300 AppAuthTest[1581:243497] 10.16.0 - [FirebaseAnalytics][I-ACS023044] Successful upload. Got network response. Code, size: 204, 0
2023-10-30 14:21:37.336881+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS002002] Measurement timer scheduled to fire in approx. (s): -0.3776779174804688
2023-10-30 14:21:37.349857+0300 AppAuthTest[1581:243497] 10.16.0 - [FirebaseAnalytics][I-ACS002003] Measurement timer canceled
2023-10-30 14:21:37.553068+0300 AppAuthTest[1581:243665] 10.16.0 - [FirebaseAnalytics][I-ACS031006] View controller already tracked. Class, ID: UIAlertController, -901160994167725532
2023-10-30 14:21:37.578611+0300 AppAuthTest[1581:243666] 10.16.0 - [FirebaseAnalytics][I-ACS031006] View controller already tracked. Class, ID: UIAlertController, -901160994167725532
2023-10-30 14:21:37.578677+0300 AppAuthTest[1581:243666] 10.16.0 - [FirebaseAnalytics][I-ACS031006] View controller already tracked. Class, ID: UIAlertController, -901160994167725532
2023-10-30 14:21:37.579948+0300 AppAuthTest[1581:243666] 10.16.0 - [FirebaseAnalytics][I-ACS031006] View controller already tracked. Class, ID: UIAlertController, -901160994167725532
2023-10-30 14:21:37.580319+0300 AppAuthTest[1581:243666] 10.16.0 - [FirebaseAnalytics][I-ACS031006] View controller already tracked. Class, ID: UIAlertController, -901160994167725532
2023-10-30 14:21:37.580370+0300 AppAuthTest[1581:243666] 10.16.0 - [FirebaseAnalytics][I-ACS031006] View controller already tracked. Class, ID: UIAlertController, -901160994167725532
2023-10-30 14:21:37.580536+0300 AppAuthTest[1581:243666] 10.16.0 - [FirebaseAnalytics][I-ACS031006] View controller already tracked. Class, ID: UIAlertController, -901160994167725532
2023-10-30 14:21:37.999810+0300 AppAuthTest[1581:243497] 10.16.0 - [FirebaseAnalytics][I-ACS031010] Tracking view controller. Class, ID: Login, -901160994167725533
2023-10-30 14:21:37.999885+0300 AppAuthTest[1581:243497] 10.16.0 - [FirebaseAnalytics][I-ACS002003] Engagement timer canceled
2023-10-30 14:21:37.999903+0300 AppAuthTest[1581:243497] 10.16.0 - [FirebaseAnalytics][I-ACS002002] Engagement timer scheduled to fire in approx. (s): 3600
2023-10-30 14:21:38.000995+0300 AppAuthTest[1581:243497] 10.16.0 - [FirebaseAnalytics][I-ACS023051] Logging event: origin, name, params: auto, user_engagement (_e), {
engagement_time_msec (_et) = 2040;
ga_event_origin (_o) = auto;
ga_screen_class (_sc) = UIAlertController;
ga_screen_id (_si) = -901160994167725532;
}
2023-10-30 14:21:38.001547+0300 AppAuthTest[1581:243497] 10.16.0 - [FirebaseAnalytics][I-ACS023073] Debug mode is enabled. Marking event as debug and real-time. Event name, parameters: user_engagement (_e), {
engagement_time_msec (_et) = 2040;
ga_debug (_dbg) = 1;
ga_event_origin (_o) = auto;
ga_realtime (_r) = 1;
ga_screen_class (_sc) = UIAlertController;
ga_screen_id (_si) = -901160994167725532;
}
2023-10-30 14:21:38.015538+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS023072] Event logged. Event name, event params: user_engagement (_e), {
engagement_time_msec (_et) = 2040;
ga_debug (_dbg) = 1;
ga_event_origin (_o) = auto;
ga_realtime (_r) = 1;
ga_screen_class (_sc) = UIAlertController;
ga_screen_id (_si) = -901160994167725532;
}
2023-10-30 14:21:38.019825+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS002002] Measurement timer scheduled to fire in approx. (s): 0.9770990610122681
2023-10-30 14:21:38.020515+0300 AppAuthTest[1581:243665] 10.16.0 - [FirebaseAnalytics][I-ACS023051] Logging event: origin, name, params: auto, screen_view (_vs), {
ga_event_origin (_o) = auto;
ga_previous_class (_pc) = UIAlertController;
ga_previous_id (_pi) = -901160994167725532;
ga_screen_class (_sc) = Login;
ga_screen_id (_si) = -901160994167725533;
}
2023-10-30 14:21:38.021154+0300 AppAuthTest[1581:243665] 10.16.0 - [FirebaseAnalytics][I-ACS023073] Debug mode is enabled. Marking event as debug and real-time. Event name, parameters: screen_view (_vs), {
ga_debug (_dbg) = 1;
ga_event_origin (_o) = auto;
ga_previous_class (_pc) = UIAlertController;
ga_previous_id (_pi) = -901160994167725532;
ga_realtime (_r) = 1;
ga_screen_class (_sc) = Login;
ga_screen_id (_si) = -901160994167725533;
}
2023-10-30 14:21:38.029772+0300 AppAuthTest[1581:243665] 10.16.0 - [FirebaseAnalytics][I-ACS023072] Event logged. Event name, event params: screen_view (_vs), {
ga_debug (_dbg) = 1;
ga_event_origin (_o) = auto;
ga_previous_class (_pc) = UIAlertController;
ga_previous_id (_pi) = -901160994167725532;
ga_realtime (_r) = 1;
ga_screen_class (_sc) = Login;
ga_screen_id (_si) = -901160994167725533;
}
2023-10-30 14:21:39.046563+0300 AppAuthTest[1581:243665] 10.16.0 - [FirebaseAnalytics][I-ACS002001] Measurement timer fired
2023-10-30 14:21:39.046826+0300 AppAuthTest[1581:243665] 10.16.0 - [FirebaseAnalytics][I-ACS002003] Measurement timer canceled
2023-10-30 14:21:39.049490+0300 AppAuthTest[1581:243665] 10.16.0 - [FirebaseAnalytics][I-ACS023105] Event is not subject to real-time event count daily limit. Marking an event as real-time. Event name, parameters: user_engagement (_e), {
engagement_time_msec (_et) = 2040;
ga_debug (_dbg) = 1;
ga_event_origin (_o) = auto;
ga_realtime (_r) = 1;
ga_screen_class (_sc) = UIAlertController;
ga_screen_id (_si) = -901160994167725532;
}
2023-10-30 14:21:39.049638+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS023105] Event is not subject to real-time event count daily limit. Marking an event as real-time. Event name, parameters: screen_view (_vs), {
ga_debug (_dbg) = 1;
ga_event_origin (_o) = auto;
ga_previous_class (_pc) = UIAlertController;
ga_previous_id (_pi) = -901160994167725532;
ga_realtime (_r) = 1;
ga_screen_class (_sc) = Login;
ga_screen_id (_si) = -901160994167725533;
}
2023-10-30 14:21:39.060475+0300 AppAuthTest[1581:243665] 10.16.0 - [FirebaseAnalytics][I-ACS023087] User property set. Name, value: lifetime_user_engagement (_lte), 37261
2023-10-30 14:21:39.060840+0300 AppAuthTest[1581:243665] 10.16.0 - [FirebaseAnalytics][I-ACS023087] User property set. Name, value: session_user_engagement (_se), 37261
2023-10-30 14:21:39.065866+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS012018] Saving bundle. size (bytes): 511
2023-10-30 14:21:39.085103+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS023116] Bundle added to the upload queue. BundleID, timestamp (ms): 4, 1698664897998
2023-10-30 14:21:39.129326+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS023039] Measurement data sent to network. Timestamp (ms), data: 1698664899128, <APMPBMeasurementBatch: 0x2829f2ac0>
2023-10-30 14:21:39.132597+0300 AppAuthTest[1581:243666] 10.16.0 - [FirebaseAnalytics][I-ACS900000] Uploading data. Host: https://app-measurement.com/a
2023-10-30 14:21:39.266362+0300 AppAuthTest[1581:243467] 10.16.0 - [FirebaseAnalytics][I-ACS901006] Received SSL challenge for host. Host: https://app-measurement.com/a
2023-10-30 14:21:39.396543+0300 AppAuthTest[1581:243665] 10.16.0 - [FirebaseAnalytics][I-ACS023044] Successful upload. Got network response. Code, size: 204, 0
2023-10-30 14:21:39.400586+0300 AppAuthTest[1581:243497] 10.16.0 - [FirebaseAnalytics][I-ACS002002] Measurement timer scheduled to fire in approx. (s): -0.4023940563201904
2023-10-30 14:21:39.413997+0300 AppAuthTest[1581:243497] 10.16.0 - [FirebaseAnalytics][I-ACS002003] Measurement timer canceled
If using Swift Package Manager, the project's Package.resolved
Expand Package.resolved
snippet
Replace this line with the contents of your Package.resolved.
If using CocoaPods, the project's Podfile.lock
Expand Podfile.lock
snippet
Replace this line with the contents of your Podfile.lock!
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Thanks for reporting, @H0neyHunter. I was able to reproduce the issue, and this seems to be related to #11886. With this, you may check this page for the workaround.
Hi, thanks for reporting this issue. This will be fixed in an upcoming release. cc: @renkelvin
@renkelvin Was this fixed in 10.18.0 in #11925?