ios – Firebase 3.2.0 – 创建用户的内部错误

ios – Firebase 3.2.0 – 创建用户的内部错误,第1张

概述我刚刚使用Firebase 3.2.0启动了一个新项目( Swift 2.2; iOS 9; Xcode 7.3.1),并在输入无效的电子邮件和弱密码时,在我的授权/注册过程中遇到以下错误: NSError Error Domain=FIRAuthErrorDomain Code=17999 "An internal error has occurred, print and inspect t 我刚刚使用Firebase 3.2.0启动了一个新项目( Swift 2.2; iOS 9; Xcode 7.3.1),并在输入无效的电子邮件和弱密码时,在我的授权/注册过程中遇到以下错误:

NSError

Error Domain=FIRAuthErrorDomain Code=17999 "An internal error has occurred,print and inspect the error details for more information." UserInfo={error_name=ERROR_INTERNAL_ERROR,NSUnderlyingError=0x7c0549a0 {Error Domain=FIRAuthInternalErrorDomain Code=3 "(null)" UserInfo={FIRAuthErrorUserInfoDeserializedResponseKey=<CFBasicHash 0x7c04bd90 [0x1a701f8]>{type = immutable dict,count = 3,entrIEs =>0 : <CFString 0x7c0fb0c0 [0x1a701f8]>{contents = "errors"} = <CFArray 0x7c0713a0 [0x1a701f8]>{type = immutable,count = 1,values = (0 : <CFBasicHash 0x7c0fac00 [0x1a701f8]>{type = immutable dict,entrIEs =>0 : <CFString 0x7c051080 [0x1a701f8]>{contents = "reason"} = <CFString 0x7c0553f0 [0x1a701f8]>{contents = "invalID"}1 : <CFString 0x7c055f30 [0x1a701f8]>{contents = "message"} = <CFString 0x7c061580 [0x1a701f8]>{contents = "INVALID_EMAIL"}2 : <CFString 0x7c054fd0 [0x1a701f8]>{contents = "domain"} = <CFString 0x7c060290 [0x1a701f8]>{contents = "global"}})}1 : <CFString 0x7c05aae0 [0x1a701f8]>{contents = "code"} = <CFNumber 0x7c073010 [0x1a701f8]>{value = +400,type = kcfNumberSInt64Type}2 : <CFString 0x7c067e70 [0x1a701f8]>{contents = "message"} = <CFString 0x7c0543a0 [0x1a701f8]>{contents = "INVALID_EMAIL"}}}},NSLocalizedDescription=An internal error has occurred,print and inspect the error details for more information.}

……我的代码如下……

AuthVIEwController.swift

if let email = emailFIEld.text where email != "",let password = passwordFIEld.text where   password != "" {FIRAuth.auth()?.signInWithEmail(email,password: password) { (user,error) in    if let error = error {            if let errorCode = FIRAuthErrorCode(rawValue: error.code) {                switch errorCode {                case .ErrorCodeNetworkError:                    print("A network error occurred")                case .ErrorCodeUserNotFound:                    print("ATTEMPTING TO CREATE USER")                    FIRAuth.auth()?.createuserWithEmail(email,error) in                        if let error = error {                            if let errCode = FIRAuthErrorCode(rawValue: error.code) {                                switch errCode {                                case .ErrorCodeInvalIDEmail:                                    print("invalID email")                                case .ErrorCodeWeakPassword:                                    self.insertErrorLabel("Password is consIDered weak (< 6 characters). Try again")                                default:                                    print("Create User Error: \(error)")                                }                            }                        } else {                            // create a user in the database...                        }                    }                case .ErrorCodeUserTokenExpired:                ....

执行命中signInWithEmail()中的.ErrorCodeUserNotFound案例.然后它在createuserWithEmail()中遇到默认情况.

从文档看来,似乎在createuserWithEmail()函数中有一个INVALID_EMAIL错误键可用,但是,它似乎抛出了一个内部错误,而不是遇到InvalIDEmail错误情况.

三个问题:

>我是否有一个可接受的流程,signIn失败导致createuser?
>错误的实际原因是什么?
>我该如何解决?

提前致谢.

解决方法 为了将来参考,我针对上述错误提出了一个错误,Firebase / Google已经确认将在下一版SDK中解决. 总结

以上是内存溢出为你收集整理的ios – Firebase 3.2.0 – 创建用户的内部错误全部内容,希望文章能够帮你解决ios – Firebase 3.2.0 – 创建用户的内部错误所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1062296.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存