Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth UI 9.0.0 crashes when using AuthMethodPickerLayout #2197

Open
linnar opened this issue Mar 19, 2025 · 1 comment
Open

Auth UI 9.0.0 crashes when using AuthMethodPickerLayout #2197

linnar opened this issue Mar 19, 2025 · 1 comment
Assignees
Milestone

Comments

@linnar
Copy link

linnar commented Mar 19, 2025

When using com.firebase.ui.auth.AuthUI.AuthIntentBuilder#setAuthMethodPickerLayout to set custom picker layout, application crashes after launching the created intent with exception attached below.

I believe this is caused by com.firebase.ui.auth.data.model.FlowParameters#CREATOR createFromParcel where there is at line 56 boolean enableHints = in.readInt() != 0; that reads a value that is not written in writeToParcel in this version anymore.

java.lang.RuntimeException: Unable to start activity ComponentInfo{package/com.firebase.ui.auth.KickoffActivity}: java.lang.ClassCastException: com.firebase.ui.auth.AuthMethodPickerLayout cannot be cast to com.google.firebase.auth.ActionCodeSettings
   	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4206)
   	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4393)
   	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:222)
   	at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:133)
   	at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:103)
   	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:80)
   	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2773)
   	at android.os.Handler.dispatchMessage(Handler.java:109)
   	at android.os.Looper.loopOnce(Looper.java:232)
   	at android.os.Looper.loop(Looper.java:317)
   	at android.app.ActivityThread.main(ActivityThread.java:8934)
   	at java.lang.reflect.Method.invoke(Native Method)
   	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
   	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
Caused by: java.lang.ClassCastException: com.firebase.ui.auth.AuthMethodPickerLayout cannot be cast to com.google.firebase.auth.ActionCodeSettings
   	at com.firebase.ui.auth.data.model.FlowParameters$1.createFromParcel(FlowParameters.java:61)
   	at com.firebase.ui.auth.data.model.FlowParameters$1.createFromParcel(FlowParameters.java:45)
   	at android.os.Parcel.readParcelableInternal(Parcel.java:5094)
   	at android.os.Parcel.readValue(Parcel.java:4845)
   	at android.os.Parcel.readValue(Parcel.java:4614)
   	at android.os.Parcel.-$$Nest$mreadValue(Unknown Source:0)
   	at android.os.Parcel$LazyValue.apply(Parcel.java:4712)
   	at android.os.Parcel$LazyValue.apply(Parcel.java:4671)
   	at android.os.BaseBundle.unwrapLazyValueFromMapLocked(BaseBundle.java:420)
   	at android.os.BaseBundle.getValueAt(BaseBundle.java:403)
   	at android.os.BaseBundle.getValue(BaseBundle.java:383)
   	at android.os.BaseBundle.getValue(BaseBundle.java:366)
   	at android.os.BaseBundle.getValue(BaseBundle.java:359)
   	at android.os.Bundle.getParcelable(Bundle.java:1049)
   	at android.content.Intent.getParcelableExtra(Intent.java:9564)
   	at com.firebase.ui.auth.data.model.FlowParameters.fromIntent(FlowParameters.java:158)
   	at com.firebase.ui.auth.ui.HelperActivityBase.getFlowParams(HelperActivityBase.java:54)
   	at com.firebase.ui.auth.ui.InvisibleActivityBase.onCreate(InvisibleActivityBase.java:39)
   	at com.firebase.ui.auth.KickoffActivity.onCreate(KickoffActivity.java:36)
   	at android.app.Activity.performCreate(Activity.java:9079)
   	at android.app.Activity.performCreate(Activity.java:9057)
   	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1531)
   	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4188)
   	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4393) 
   	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:222) 
   	at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:133) 
   	at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:103) 
   	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:80) 
   	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2773) 
   	at android.os.Handler.dispatchMessage(Handler.java:109) 
   	at android.os.Looper.loopOnce(Looper.java:232) 
   	at android.os.Looper.loop(Looper.java:317) 
   	at android.app.ActivityThread.main(ActivityThread.java:8934) 
   	at java.lang.reflect.Method.invoke(Native Method) 
   	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591) 
   	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
@thatfiredev thatfiredev added this to the 9.1.0 milestone Mar 24, 2025
@Lyokone Lyokone self-assigned this Mar 26, 2025
@Lyokone
Copy link
Contributor

Lyokone commented Mar 26, 2025

Hello, thanks for reporting, I'll have a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants