Android:Firebase登录失败密码无效或用户没有密码

2023-11-21

我正在尝试使用 firebase 创建一个带有用户个人资料的简单应用程序,但遇到了问题。注册功能运行良好,我可以在 Firebase 控制台中看到注册帐户,但登录功能运行不佳。我收到“密码无效或用户没有密码”。例外。任何人都可以帮我解决这个问题吗?我的登录方法如下所示。

 private void userLogin(){
    String email = emailText.getText().toString().trim();
    String password = passwordText.getText().toString().trim();


    if (TextUtils.isEmpty(email)){
        Toast.makeText(this,"Please enter email", Toast.LENGTH_SHORT).show();
        return;
    }
    if (TextUtils.isEmpty(password)) {
        Toast.makeText(this,"Please enter password", Toast.LENGTH_SHORT).show();
        return;
    }
    firebaseAuth.signInWithEmailAndPassword(email, password)
            .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
                @Override
                public void onComplete(@NonNull Task<AuthResult> task) {
                   if(task.isSuccessful()){
                       Toast.makeText(LogIn.this,"You are logged in", Toast.LENGTH_SHORT).show();
                   }
                   else{
                       Toast.makeText(LogIn.this,"MISTAKE", Toast.LENGTH_SHORT).show();
                       Log.d("z", "onComplete: Failed=" + task.getException().getMessage());
                   }
                }
            });
}

LogCat:

    05-13 04:49:17.944 10714-10714/? I/art: Not late-enabling -Xcheck:jni (already on)
05-13 04:49:17.944 10714-10714/? W/art: Unexpected CPU variant for X86 using defaults: x86
05-13 04:49:17.964 10714-10721/? E/art: Failed sending reply to debugger: Broken pipe
05-13 04:49:17.964 10714-10721/? I/art: Debugger is no longer active
    Starting a blocking GC Instrumentation
05-13 04:49:18.144 10714-10714/? W/System: ClassLoader referenced unknown path: /data/app/com.example.gmachine.mychat-1/lib/x86
05-13 04:49:18.231 10714-10714/? D/FirebaseAuth: Notifying id token listeners about user ( KUXl4u7sy6OdwE0P3fmCRWyHugz1 ).
05-13 04:49:18.250 10714-10714/? D/FirebaseAuth: Notifying id token listeners about user ( KUXl4u7sy6OdwE0P3fmCRWyHugz1 ).
05-13 04:49:18.258 10714-10714/? D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
05-13 04:49:18.324 10714-10714/? V/FA: Registered activity lifecycle callback
05-13 04:49:18.328 10714-10714/? I/FirebaseInitProvider: FirebaseApp initialization successful
05-13 04:49:18.333 10714-10714/? I/InstantRun: starting instant run server: is main process
05-13 04:49:18.354 10714-10738/? V/FA: Collection enabled
    App package, google app id: com.example.gmachine.mychat, 1:411464926772:android:67ab72bb5465b580
05-13 04:49:18.354 10714-10738/? I/FA: App measurement is starting up, version: 12451
    To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
05-13 04:49:18.355 10714-10738/? I/FA: To enable faster debug mode event logging run:
      adb shell setprop debug.firebase.analytics.app com.example.gmachine.mychat
05-13 04:49:18.355 10714-10738/? D/FA: Debug-level message logging enabled
05-13 04:49:18.372 10714-10738/? V/FA: Cancelling job. JobID: 67470213
05-13 04:49:18.424 10714-10714/? W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
05-13 04:49:18.430 10714-10738/? V/FA: Connecting to remote service
05-13 04:49:18.432 10714-10714/? V/FA: onActivityCreated
05-13 04:49:18.503 10714-10738/? V/FA: Connection attempt already in progress
05-13 04:49:18.590 10714-10738/? I/FA: Tag Manager is not found and thus will not be used
05-13 04:49:18.600 10714-10738/? D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_screen_class(_sc)=LogIn, firebase_screen_id(_si)=-7531630852293217533}]
05-13 04:49:18.617 10714-10738/? V/FA: Connection attempt already in progress
05-13 04:49:18.618 10714-10738/? V/FA: Connection attempt already in progress
05-13 04:49:18.622 10714-10738/? V/FA: Activity resumed, time: 28255253
05-13 04:49:18.650 10714-10714/? D/FirebaseApp: Notifying auth state listeners.
    Notified 0 auth state listeners.
05-13 04:49:18.651 10714-10714/? D/FirebaseApp: Notifying auth state listeners.
    Notified 0 auth state listeners.
05-13 04:49:18.736 10714-10743/? I/OpenGLRenderer: Initialized EGL, version 1.4
05-13 04:49:18.736 10714-10743/? D/OpenGLRenderer: Swap behavior 1
05-13 04:49:18.737 10714-10743/? W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
05-13 04:49:18.737 10714-10743/? D/OpenGLRenderer: Swap behavior 0
05-13 04:49:18.758 10714-10743/? D/EGL_emulation: eglCreateContext: 0xa9b858a0: maj 2 min 0 rcv 2
05-13 04:49:18.818 10714-10743/? D/EGL_emulation: eglMakeCurrent: 0xa9b858a0: ver 2 0 (tinfo 0x8c54b1d0)
05-13 04:49:18.858 10714-10714/? W/art: Before Android 4.1, method int android.support.v7.widget.DropDownListView.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
05-13 04:49:18.866 10714-10743/? D/EGL_emulation: eglMakeCurrent: 0xa9b858a0: ver 2 0 (tinfo 0x8c54b1d0)
05-13 04:49:18.991 10714-10738/com.example.gmachine.mychat D/FA: Connected to remote service
05-13 04:49:18.991 10714-10738/com.example.gmachine.mychat V/FA: Processing queued up service tasks: 4
05-13 04:49:24.124 10714-10738/com.example.gmachine.mychat V/FA: Inactivity, disconnecting from the service
05-13 04:49:28.720 10714-10719/com.example.gmachine.mychat I/art: Do partial code cache collection, code=27KB, data=29KB
05-13 04:49:28.722 10714-10719/com.example.gmachine.mychat I/art: After code cache collection, code=27KB, data=29KB
    Increasing code cache capacity to 128KB
05-13 04:49:30.937 10714-10714/com.example.gmachine.mychat W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
05-13 04:49:33.192 10714-10719/com.example.gmachine.mychat I/art: Do partial code cache collection, code=62KB, data=55KB
    After code cache collection, code=62KB, data=55KB
    Increasing code cache capacity to 256KB
05-13 04:49:34.038 10714-10714/com.example.gmachine.mychat W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
05-13 04:49:38.664 10714-10714/com.example.gmachine.mychat W/System: ClassLoader referenced unknown path: /system/priv-app/PrebuiltGmsCore/lib/x86
05-13 04:49:38.664 10714-10714/com.example.gmachine.mychat D/ApplicationLoaders: ignored Vulkan layer search path /system/priv-app/PrebuiltGmsCore/lib/x86:/system/fake-libs:/system/priv-app/PrebuiltGmsCore/PrebuiltGmsCore.apk!/lib/x86:/system/lib:/vendor/lib for namespace 0xa9d54090
05-13 04:49:38.695 10714-10714/com.example.gmachine.mychat W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
05-13 04:49:38.695 10714-10714/com.example.gmachine.mychat W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzal@1b80aea
05-13 04:49:38.717 10714-10988/com.example.gmachine.mychat W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
05-13 04:49:38.723 10714-10988/com.example.gmachine.mychat I/FirebaseAuth: [FirebaseAuth:] Loading module via FirebaseOptions.
    [FirebaseAuth:] Preparing to create service connection to gms implementation
05-13 04:49:39.351 10714-10714/com.example.gmachine.mychat D/z: onComplete: Failed=The password is invalid or the user does not have a password.
05-13 04:49:39.493 10714-10743/com.example.gmachine.mychat D/EGL_emulation: eglMakeCurrent: 0xa9b858a0: ver 2 0 (tinfo 0x8c54b1d0)
05-13 04:49:39.529 10714-10743/com.example.gmachine.mychat D/EGL_emulation: eglMakeCurrent: 0xa9b858a0: ver 2 0 (tinfo 0x8c54b1d0)
05-13 04:54:38.844 10714-10988/com.example.gmachine.mychat I/FirebaseAuth: [FirebaseAuth:] Loading module via FirebaseOptions.
    [FirebaseAuth:] Preparing to create service connection to gms implementation
05-13 05:02:01.317 10714-10739/com.example.gmachine.mychat W/System: ClassLoader referenced unknown path: /data/data/com.example.gmachine.mychat/lib
05-13 05:02:01.346 10714-19878/com.example.gmachine.mychat V/FA: Recording user engagement, ms: 762757
05-13 05:02:01.347 10714-19878/com.example.gmachine.mychat V/FA: Connecting to remote service
05-13 05:02:01.348 10714-19878/com.example.gmachine.mychat V/FA: Activity paused, time: 29018004
05-13 05:02:01.408 10714-10743/com.example.gmachine.mychat D/EGL_emulation: eglMakeCurrent: 0xa9b858a0: ver 2 0 (tinfo 0x8c54b1d0)
05-13 05:02:01.416 10714-19878/com.example.gmachine.mychat D/FA: Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=762757, firebase_screen_class(_sc)=LogIn, firebase_screen_id(_si)=-7531630852293217533}]
05-13 05:02:01.535 10714-10714/com.example.gmachine.mychat V/FA: onActivityCreated
05-13 05:02:01.538 10714-19878/com.example.gmachine.mychat V/FA: Connection attempt already in progress
05-13 05:02:01.663 10714-19878/com.example.gmachine.mychat V/FA: Connection attempt already in progress
    Activity resumed, time: 29018325
05-13 05:02:02.308 10714-19878/com.example.gmachine.mychat D/FA: Connected to remote service
05-13 05:02:02.308 10714-19878/com.example.gmachine.mychat V/FA: Processing queued up service tasks: 3
05-13 05:02:02.310 10714-10714/com.example.gmachine.mychat I/Choreographer: Skipped 33 frames!  The application may be doing too much work on its main thread.
05-13 05:02:02.317 10714-10743/com.example.gmachine.mychat D/EGL_emulation: eglMakeCurrent: 0xa9b858a0: ver 2 0 (tinfo 0x8c54b1d0)
05-13 05:02:02.380 10714-10743/com.example.gmachine.mychat D/EGL_emulation: eglMakeCurrent: 0xa9b858a0: ver 2 0 (tinfo 0x8c54b1d0)
05-13 05:02:02.393 10714-10743/com.example.gmachine.mychat D/EGL_emulation: eglMakeCurrent: 0xa9b858a0: ver 2 0 (tinfo 0x8c54b1d0)
05-13 05:02:07.340 10714-19878/com.example.gmachine.mychat V/FA: Inactivity, disconnecting from the service
05-13 05:02:11.505 10714-10743/com.example.gmachine.mychat D/EGL_emulation: eglMakeCurrent: 0xa9b858a0: ver 2 0 (tinfo 0x8c54b1d0)
05-13 05:02:11.772 10714-10743/com.example.gmachine.mychat D/EGL_emulation: eglMakeCurrent: 0xa9b858a0: ver 2 0 (tinfo 0x8c54b1d0)
05-13 05:02:13.726 10714-10743/com.example.gmachine.mychat D/EGL_emulation: eglMakeCurrent: 0xa9b858a0: ver 2 0 (tinfo 0x8c54b1d0)
05-13 05:02:14.138 10714-10743/com.example.gmachine.mychat D/EGL_emulation: eglMakeCurrent: 0xa9b858a0: ver 2 0 (tinfo 0x8c54b1d0)
05-13 05:02:29.855 10714-10714/com.example.gmachine.mychat W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
05-13 05:02:29.940 10714-10743/com.example.gmachine.mychat D/EGL_emulation: eglMakeCurrent: 0xa9b858a0: ver 2 0 (tinfo 0x8c54b1d0)
05-13 05:02:30.353 10714-10743/com.example.gmachine.mychat D/EGL_emulation: eglMakeCurrent: 0xa9b858a0: ver 2 0 (tinfo 0x8c54b1d0)
05-13 05:02:33.796 10714-10714/com.example.gmachine.mychat W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzal@1b80aea
05-13 05:02:33.797 10714-10988/com.example.gmachine.mychat W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
05-13 05:02:33.797 10714-10988/com.example.gmachine.mychat I/FirebaseAuth: [FirebaseAuth:] Loading module via FirebaseOptions.
    [FirebaseAuth:] Preparing to create service connection to gms implementation
05-13 05:02:34.840 10714-10714/com.example.gmachine.mychat D/z: onComplete: Failed=The password is invalid or the user does not have a password.
05-13 05:02:34.889 10714-10743/com.example.gmachine.mychat D/EGL_emulation: eglMakeCurrent: 0xa9b858a0: ver 2 0 (tinfo 0x8c54b1d0)
05-13 05:02:34.913 10714-10743/com.example.gmachine.mychat D/EGL_emulation: eglMakeCurrent: 0xa9b858a0: ver 2 0 (tinfo 0x8c54b1d0)
05-13 05:07:33.860 10714-10988/com.example.gmachine.mychat I/FirebaseAuth: [FirebaseAuth:] Loading module via FirebaseOptions.
    [FirebaseAuth:] Preparing to create service connection to gms implementation

我遇到了同样的问题,后来才意识到我使用了错误的资源 ID 初始化了密码字段。确保这些是正确的

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Android:Firebase登录失败密码无效或用户没有密码 的相关文章

随机推荐

  • Visual Studio:重新启用“构建失败,运行上次成功?”对话框

    当构建失败时 VS 会弹出一个选项来运行上次成功的构建 有人在我的机器上单击了 是 和 不再显示此对话框 现在我仍坚持该设置 我怎样才能重置它 流程如下Visual Studio 2010及以上 但与以前的版本应该类似 在菜单栏上转到 To
  • 使用 Update 且 Upsert 为 true 时未设置默认值

    我为用户提供以下模型 var UserSchema new mongoose Schema name String dob Date sex String photo String email type String index uniqu
  • boost::interprocess::shared_ptr 线程安全(和进程间安全)吗?

    我想在线程之间共享数据 并在最后一个用户使用完数据后自动删除数据 大多数时候 这似乎有效 使用boost interprocess shared ptr in a boost fixed managed shared memory段 但并非
  • 使用@Preauthorize和@@ControllerAdvice自定义错误消息

    我们正在使用 spring 和 spring security 3 2 最近我们正在向 RestAPI 添加注释 PreAuthorize 之前它是基于 URL 的 PreAuthorize hasPermission salesorder
  • 将 getdate() 转换为 int

    当我运行以下查询时 select convert int getdate 我得到结果 41238 1 row s affected 有谁知道这是什么意思 这是我想的天数1 1 1900 sql server 保留从那时起的天数 尝试将该数字
  • 使用 Go 解析带有尾随逗号的 JSON 数组和映射元素时出现运行时错误

    Go 领域的主要主题专家之一 Dave Cheney 写道 当使用复合文字初始化变量时 Go 要求复合文字的每一行都以逗号结尾 甚至是声明的最后一行 这就是结果分号规则 然而 当我尝试将这个美丽的规则应用于 JSON 文本时 解析器似乎并不
  • 防止 HTML 表单操作被更改

    我的页面上有一个表单 用户可以在其中输入信用卡数据 是否可以在 HTML 中将表单的操作标记为常量 以防止恶意 JavaScript 更改表单的操作属性 我可以想象 XSS 攻击会更改表单 URL 使用户将其秘密数据发布到攻击者的站点 是否
  • 点击时隐藏 Twitter Bootstrap 导航折叠

    这不是一个子菜单下拉菜单 类别是 li 类 如图所示 通过从响应式菜单中选择一个类别 模板只是 一页 我想在点击时自动隐藏导航折叠 也可以漫步用作导航 因为模板只有一个 页 我寻求一个不影响它的解决方案 这里是HTML代码 菜单 div c
  • 使用 Apache 服务器运行 Silverlight(Linux 下)

    我需要将 Silverlight 2 0 应用程序部署到 Apache 服务器 但它是在 Linux 下 这可能吗 我的意思是 我需要在服务器中安装 Net 3 5 以及可以执行 Asp Net 的网站吗 谢谢你的帮助 如果 apache
  • defrecord 构造函数中未强制执行类型提示

    我使用创建了一个类型defrecord带有字段的类型提示 然而 我发现这些类型提示在构造函数中没有强制执行 我可以用它们做一些奇怪的事情 例如 请看下面的代码片段 user gt defrecord Person String name I
  • RegExp 去除 HTML 注释

    寻找匹配和替换的正则表达式序列 最好是 PHP 但并不重要 来改变这一点 开始和结束只是需要保留的随机文本 IN fkdshfks khh fdsfsk div class codetop CODE AutoIt div div class
  • Android 闹钟 UI

    我试图弄清楚 Android 闹钟应用程序的 UI 是如何设计的 这似乎正在使用 Holo 黑暗主题 包含的屏幕截图是创建 编辑警报Activity屏幕 它看起来类似于安卓设置 有这种情况吗 因为 打开闹钟 和 振动 行看起来像Chexbo
  • 如何向此 ASP.NET DropDownList 控件添加默认的“选择”选项?

    我是一名新的 ASP NET 开发人员 我正在尝试学习 Linq To Entities 我正在尝试将 DropDownList 与 Linq 语句绑定 以检索状态实体中的状态列表 一切正常 但是 我现在尝试将 选择 选项添加到 DropD
  • Ace Editor 可以在一个页面中支持多个代码编辑器吗?

    我正在寻求实现一个网络应用程序 该应用程序具有 编码竞赛 风格的界面 在一个屏幕上有 2 个不同的代码编辑器 一个将是只读的 另一个将是活动的并允许用户进行编辑 我目前正在使用 Ace Editor 我发现它非常棒且易于使用 然而 这是我的
  • 如何找到列表的所有子序列?

    我正在尝试学习如何列表理解 并且正在尝试找出一种方法来查找列表的所有子序列 但我不太确定如何去做 有人可以帮助我吗 如果您想访问此功能 您可以使用subsequences函数位于Data List subsequences 1 2 3 gt
  • 无法向 weblogic 队列发送消息

    我正在尝试将字符串消息发送到在 weblogic 服务器中创建的 JMS 队列中 我正在使用 Eclipse ide 当我运行 Web 应用程序时 出现以下错误 并且 tomcat 服务器关闭 错误是 javax naming Commun
  • 如何将midi时间线转换为应该播放的实际时间线

    我已经研究这个主题有一段时间了 但仍然没有弄清楚 我使用 midas3 库 Midi actionscript3 将 midi 导入到 flash 我在时间线上得到了每个笔记项目 我得到分度值 192 所有 GET TEMPO 元素都等于
  • Asp.Net 获取屏幕宽度

    如何在 Asp net C 项目中获取服务器端的屏幕宽度 将其放在您的表格上
  • 如何用sympy判断一个函数是否连续?

    我需要定义一个函数来检查输入函数在 sympy 的某个点是否连续 我用关键字 连续性 搜索了 sympy 文档 但没有现有的函数 我想也许我应该考虑限制一下 但我不知道该怎么做 def check continuity f var a tr
  • Android:Firebase登录失败密码无效或用户没有密码

    我正在尝试使用 firebase 创建一个带有用户个人资料的简单应用程序 但遇到了问题 注册功能运行良好 我可以在 Firebase 控制台中看到注册帐户 但登录功能运行不佳 我收到 密码无效或用户没有密码 例外 任何人都可以帮我解决这个问