java.lang.ClassNotFoundException: com.firebase.ui.auth.data.model.FlowParameters #1416
Closed
Description
opened on Aug 24, 2018
Step 1:
When trying to get the Auth UI going:
Intent intent = AuthUI.getInstance()
.createSignInIntentBuilder()
.setTheme(R.style.SplashTheme)
.setAvailableProviders(idpConfigs)
.setTosAndPrivacyPolicyUrls(getString(R.string.terms_url), getString(R.string.privacy_url))
.setIsSmartLockEnabled(!BuildConfig.DEBUG)
.build();
startActivityForResult(intent, RC_FIREBASE_UI_SIGNIN);
I see the following behaviour:
- if
idpConfigs
contains exactly one item, it correctly proceeds to the one login method - if
idpConfigs
contains more than one item, theAuthMethodPickerActivity
is displayed WITHOUT any of the login buttons (but it correctly shows the ToS/PP at the bottom)
Looking through the logs, I see this error:
08-23 21:01:07.343 1358-2025/? E/Parcel: Class not found when unmarshalling: com.firebase.ui.auth.data.model.FlowParameters
java.lang.ClassNotFoundException: com.firebase.ui.auth.data.model.FlowParameters
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:453)
at android.os.Parcel.readParcelableCreator(Parcel.java:2835)
at android.os.Parcel.readParcelable(Parcel.java:2789)
at android.os.Parcel.readValue(Parcel.java:2692)
at android.os.Parcel.readArrayMapInternal(Parcel.java:3059)
at android.os.BaseBundle.unparcel(BaseBundle.java:257)
at android.os.BaseBundle.getString(BaseBundle.java:1086)
at android.content.Intent.getStringExtra(Intent.java:7706)
at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:458)
at com.android.server.am.ActivityStarter.startActivityLocked(ActivityStarter.java:409)
at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1270)
at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:6053)
at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:5906)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:121)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3887)
at android.os.Binder.execTransact(Binder.java:682)
Caused by: java.lang.ClassNotFoundException: com.firebase.ui.auth.data.model.FlowParameters
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:1355)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:1415)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:453)
at android.os.Parcel.readParcelableCreator(Parcel.java:2835)
at android.os.Parcel.readParcelable(Parcel.java:2789)
at android.os.Parcel.readValue(Parcel.java:2692)
at android.os.Parcel.readArrayMapInternal(Parcel.java:3059)
at android.os.BaseBundle.unparcel(BaseBundle.java:257)
at android.os.BaseBundle.getString(BaseBundle.java:1086)
at android.content.Intent.getStringExtra(Intent.java:7706)
at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:458)
at com.android.server.am.ActivityStarter.startActivityLocked(ActivityStarter.java:409)
at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1270)
at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:6053)
at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:5906)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:121)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3887)
at android.os.Binder.execTransact(Binder.java:682)
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
08-23 21:01:07.343 1358-2025/? W/Bundle: Failed to parse Bundle, but defusing quietly
android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.firebase.ui.auth.data.model.FlowParameters
at android.os.Parcel.readParcelableCreator(Parcel.java:2863)
at android.os.Parcel.readParcelable(Parcel.java:2789)
at android.os.Parcel.readValue(Parcel.java:2692)
at android.os.Parcel.readArrayMapInternal(Parcel.java:3059)
at android.os.BaseBundle.unparcel(BaseBundle.java:257)
at android.os.BaseBundle.getString(BaseBundle.java:1086)
at android.content.Intent.getStringExtra(Intent.java:7706)
at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:458)
at com.android.server.am.ActivityStarter.startActivityLocked(ActivityStarter.java:409)
at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1270)
at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:6053)
at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:5906)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:121)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3887)
at android.os.Binder.execTransact(Binder.java:682)
Which would explain the issue. Here's the relevant snippet of my build.gradle:
// Play Services
implementation "com.google.android.gms:play-services-auth:15.0.1"
implementation "com.google.android.gms:play-services-base:15.0.1"
implementation "com.google.android.gms:play-services-appinvite:15.0.1"
implementation "com.google.android.gms:play-services-gcm:15.0.1"
implementation "com.google.android.gms:play-services-location:15.0.1"
implementation "com.google.android.gms:play-services-places:15.0.1"
implementation "com.google.android.gms:play-services-ads:15.0.1"
// Firebase
implementation "com.google.firebase:firebase-core:16.0.0"
implementation "com.google.firebase:firebase-auth:16.0.1"
implementation "com.google.firebase:firebase-database:16.0.1"
implementation "com.google.firebase:firebase-storage:16.0.1"
implementation "com.google.firebase:firebase-crash:16.0.1"
implementation "com.google.firebase:firebase-messaging:17.3.0"
implementation "com.google.firebase:firebase-config:16.0.0"
implementation "com.google.firebase:firebase-invites:16.0.1"
implementation "com.google.firebase:firebase-perf:16.1.0"
implementation 'com.firebaseui:firebase-ui:4.1.0'
This used to work, but I guess it broke with a recent update of FirebaseUI.
Step 2: Describe your environment
- Android device: S9+
- Android OS version: 8.0.0
- Google Play Services version: 12.8.74
- Firebase/Play Services SDK version: 15.0.1
- FirebaseUI version: 4.1.0
Activity