質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Firebase Authentication

Firebase Authenticationは、Firebaseを利用したユーザーの認証機能です。バックエンドサービス、SDK、アプリでのユーザー認証に使用できるUIライブラリが用意されています。

Android

Androidは、Google社が開発したスマートフォンやタブレットなど携帯端末向けのプラットフォームです。 カーネル・ミドルウェア・ユーザーインターフェイス・ウェブブラウザ・電話帳などのアプリケーションやソフトウェアをひとつにまとめて構成。 カーネル・ライブラリ・ランタイムはほとんどがC言語/C++、アプリケーションなどはJavaSEのサブセットとAndroid環境で書かれています。

Kotlin

Kotlinは、ジェットブレインズ社のアンドリー・ブレスラフ、ドミトリー・ジェメロフが開発した、 静的型付けのオブジェクト指向プログラミング言語です。

Q&A

解決済

1回答

1153閲覧

Firebase auth Twitter 認証できない

arashiyama

総合スコア33

Firebase Authentication

Firebase Authenticationは、Firebaseを利用したユーザーの認証機能です。バックエンドサービス、SDK、アプリでのユーザー認証に使用できるUIライブラリが用意されています。

Android

Androidは、Google社が開発したスマートフォンやタブレットなど携帯端末向けのプラットフォームです。 カーネル・ミドルウェア・ユーザーインターフェイス・ウェブブラウザ・電話帳などのアプリケーションやソフトウェアをひとつにまとめて構成。 カーネル・ライブラリ・ランタイムはほとんどがC言語/C++、アプリケーションなどはJavaSEのサブセットとAndroid環境で書かれています。

Kotlin

Kotlinは、ジェットブレインズ社のアンドリー・ブレスラフ、ドミトリー・ジェメロフが開発した、 静的型付けのオブジェクト指向プログラミング言語です。

0グッド

0クリップ

投稿2022/07/28 13:20

前提

firebase auth を使用してTwitterの認証を行っていました。
ある程度アプリが完成したため一度アンインストールして再ビルドしたらfirebase authのTwitter認証が通らなくなりました。

発生している問題・エラーメッセージ

以下エラーは認証ボタンを押した瞬間に出力されました。

W/zzfi: encountered a potentially transient KeyStore error, will wait and retry javax.crypto.AEADBadTagException at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:517) at javax.crypto.Cipher.doFinal(Cipher.java:2113) at com.google.android.gms.internal.firebase-auth-api.zzfi.zzd(com.google.firebase:firebase-auth@@21.0.6:7) at com.google.android.gms.internal.firebase-auth-api.zzfi.zza(com.google.firebase:firebase-auth@@21.0.6:1) at com.google.android.gms.internal.firebase-auth-api.zzbg.zzh(com.google.firebase:firebase-auth@@21.0.6:4) at com.google.android.gms.internal.firebase-auth-api.zzff.zzi(com.google.firebase:firebase-auth@@21.0.6:1) at com.google.android.gms.internal.firebase-auth-api.zzff.zzg(com.google.firebase:firebase-auth@@21.0.6:2) at com.google.firebase.auth.internal.zzk.<init>(com.google.firebase:firebase-auth@@21.0.6:6) at com.google.firebase.auth.internal.zzk.zza(com.google.firebase:firebase-auth@@21.0.6:2) at com.google.firebase.auth.internal.GenericIdpActivity.zzg(com.google.firebase:firebase-auth@@21.0.6:24) at com.google.firebase.auth.internal.GenericIdpActivity.zzb(com.google.firebase:firebase-auth@@21.0.6:3) at com.google.android.gms.internal.firebase-auth-api.zztw.<init>(com.google.firebase:firebase-auth@@21.0.6:14) at com.google.firebase.auth.internal.GenericIdpActivity.onResume(com.google.firebase:firebase-auth@@21.0.6:53) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1457) at android.app.Activity.performResume(Activity.java:8134) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4449) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4491) at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2072) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7720) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:627) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952) Caused by: android.security.KeyStoreException: Signature/MAC verification failed at android.security.KeyStore.getKeyStoreException(KeyStore.java:1301) at android.security.keystore.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:186) at android.security.keystore.AndroidKeyStoreAuthenticatedAESCipherSpi$BufferAllOutputUntilDoFinalStreamer.doFinal(AndroidKeyStoreAuthenticatedAESCipherSpi.java:373) at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:506) at javax.crypto.Cipher.doFinal(Cipher.java:2113)  at com.google.android.gms.internal.firebase-auth-api.zzfi.zzd(com.google.firebase:firebase-auth@@21.0.6:7)  at com.google.android.gms.internal.firebase-auth-api.zzfi.zza(com.google.firebase:firebase-auth@@21.0.6:1)  at com.google.android.gms.internal.firebase-auth-api.zzbg.zzh(com.google.firebase:firebase-auth@@21.0.6:4)  at com.google.android.gms.internal.firebase-auth-api.zzff.zzi(com.google.firebase:firebase-auth@@21.0.6:1)  at com.google.android.gms.internal.firebase-auth-api.zzff.zzg(com.google.firebase:firebase-auth@@21.0.6:2)  at com.google.firebase.auth.internal.zzk.<init>(com.google.firebase:firebase-auth@@21.0.6:6)  at com.google.firebase.auth.internal.zzk.zza(com.google.firebase:firebase-auth@@21.0.6:2)  at com.google.firebase.auth.internal.GenericIdpActivity.zzg(com.google.firebase:firebase-auth@@21.0.6:24)  at com.google.firebase.auth.internal.GenericIdpActivity.zzb(com.google.firebase:firebase-auth@@21.0.6:3)  at com.google.android.gms.internal.firebase-auth-api.zztw.<init>(com.google.firebase:firebase-auth@@21.0.6:14)  at com.google.firebase.auth.internal.GenericIdpActivity.onResume(com.google.firebase:firebase-auth@@21.0.6:53)  at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1457)  at android.app.Activity.performResume(Activity.java:8134)  at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4449)  at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4491)  at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)  at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)  at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2072)  at android.os.Handler.dispatchMessage(Handler.java:106)  at android.os.Looper.loop(Looper.java:223)  at android.app.ActivityThread.main(ActivityThread.java:7720)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:627)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)  W/zzfh: cannot decrypt keyset: javax.crypto.AEADBadTagException at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:517) at javax.crypto.Cipher.doFinal(Cipher.java:2113) at com.google.android.gms.internal.firebase-auth-api.zzfi.zzd(com.google.firebase:firebase-auth@@21.0.6:7) at com.google.android.gms.internal.firebase-auth-api.zzfi.zza(com.google.firebase:firebase-auth@@21.0.6:4) at com.google.android.gms.internal.firebase-auth-api.zzbg.zzh(com.google.firebase:firebase-auth@@21.0.6:4) at com.google.android.gms.internal.firebase-auth-api.zzff.zzi(com.google.firebase:firebase-auth@@21.0.6:1) at com.google.android.gms.internal.firebase-auth-api.zzff.zzg(com.google.firebase:firebase-auth@@21.0.6:2) at com.google.firebase.auth.internal.zzk.<init>(com.google.firebase:firebase-auth@@21.0.6:6) at com.google.firebase.auth.internal.zzk.zza(com.google.firebase:firebase-auth@@21.0.6:2) at com.google.firebase.auth.internal.GenericIdpActivity.zzg(com.google.firebase:firebase-auth@@21.0.6:24) at com.google.firebase.auth.internal.GenericIdpActivity.zzb(com.google.firebase:firebase-auth@@21.0.6:3) at com.google.android.gms.internal.firebase-auth-api.zztw.<init>(com.google.firebase:firebase-auth@@21.0.6:14) at com.google.firebase.auth.internal.GenericIdpActivity.onResume(com.google.firebase:firebase-auth@@21.0.6:53) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1457) at android.app.Activity.performResume(Activity.java:8134) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4449) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4491) at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2072) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7720) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:627) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952) Caused by...(長すぎて入らなかったのでコメントで付け足します)

試したこと

wait and retryとあったので一日置いてから再実行しました。
復号化の問題っぽいので、firebaseのsha1,256の鍵を再発行しました。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

arashiyama

2022/07/28 13:21 編集

``` Caused by: android.security.KeyStoreException: Signature/MAC verification failed at android.security.KeyStore.getKeyStoreException(KeyStore.java:1301) at android.security.keystore.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:186) at android.security.keystore.AndroidKeyStoreAuthenticatedAESCipherSpi$BufferAllOutputUntilDoFinalStreamer.doFinal(AndroidKeyStoreAuthenticatedAESCipherSpi.java:373) at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:506) at javax.crypto.Cipher.doFinal(Cipher.java:2113)  at com.google.android.gms.internal.firebase-auth-api.zzfi.zzd(com.google.firebase:firebase-auth@@21.0.6:7)  at com.google.android.gms.internal.firebase-auth-api.zzfi.zza(com.google.firebase:firebase-auth@@21.0.6:4)  at com.google.android.gms.internal.firebase-auth-api.zzbg.zzh(com.google.firebase:firebase-auth@@21.0.6:4)  at com.google.android.gms.internal.firebase-auth-api.zzff.zzi(com.google.firebase:firebase-auth@@21.0.6:1)  at com.google.android.gms.internal.firebase-auth-api.zzff.zzg(com.google.firebase:firebase-auth@@21.0.6:2)  at com.google.firebase.auth.internal.zzk.<init>(com.google.firebase:firebase-auth@@21.0.6:6)  at com.google.firebase.auth.internal.zzk.zza(com.google.firebase:firebase-auth@@21.0.6:2)  at com.google.firebase.auth.internal.GenericIdpActivity.zzg(com.google.firebase:firebase-auth@@21.0.6:24)  E/FirebearCryptoHelper: KeysetManager failed to initialize - unable to get Public key E/GenericIdpActivity: Could not generate an encryption key for Generic IDP - cancelling flow. I/DpmTcmClient: RegisterTcmMonitor from: $Proxy1 W/System: Ignoring header X-Firebase-Locale because its value was null. V/FA: Screen exposed for less than 1000 ms. Event not sent. time: 131 V/FA: Activity paused, time: 76214251 I/System.out: com.google.firebase.FirebaseException: An internal error has occurred. [ Failed to generate/retrieve public encryption key for Generic IDP flow. ] D/CompatibilityChangeReporter: Compat change id reported: 147798919; UID 10413; state: ENABLED ```
guest

回答1

0

自己解決

https://stackoverflow.com/questions/63597398/androidx-security-encryptedsharedpreferences-v1-1-0-w-api-21-issue
を参考にして、
マニュフェストファイルのapplicationに以下の属性を与えてから再インストールしたら解決しました

android:fullBackupContent="false"

投稿2022/07/29 02:44

arashiyama

総合スコア33

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問