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

IllegalArgumentException #2140

Open
sebastian-hoebarth opened this issue Sep 15, 2023 · 4 comments
Open

IllegalArgumentException #2140

sebastian-hoebarth opened this issue Sep 15, 2023 · 4 comments

Comments

@sebastian-hoebarth
Copy link

implementation("com.firebaseui:firebase-ui-auth:8.0.2")

Device
Brand:Samsung
Model:Galaxy A12
Orientation:Portrait
RAM free: 809.93 MB
Disk free: 31.96 GB
Operating system
Version:Android 13
Orientation:Portrait
Rooted:No
Crash
Date:3 Sept 2023, 08:13:54
App version:2.95 (295)

Fatal Exception: java.lang.IllegalArgumentException: ********: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
at android.app.PendingIntent.checkFlags(PendingIntent.java:408)
at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:491)
at android.app.PendingIntent.getActivity(PendingIntent.java:477)
at android.app.PendingIntent.getActivity(PendingIntent.java:441)
at com.google.android.gms.internal.auth-api.zzr.zzc(com.google.android.gms:play-services-auth@@19.0.0:19)
at com.google.android.gms.auth.api.credentials.CredentialsClient.getHintPickerIntent(com.google.android.gms:play-services-auth@@19.0.0:10)
at com.firebase.ui.auth.ui.email.CheckEmailHandler.fetchCredential(CheckEmailHandler.java:29)
at com.firebase.ui.auth.ui.email.CheckEmailFragment.onActivityCreated(CheckEmailFragment.java:174)
at androidx.fragment.app.Fragment.performActivityCreated(Fragment.java:3137)
at androidx.fragment.app.FragmentStateManager.activityCreated(FragmentStateManager.java:579)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:264)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1899)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1817)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1760)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2985)
at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:2895)
at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:263)
at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:351)
at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:251)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1510)
at android.app.Activity.performStart(Activity.java:8616)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:4204)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8757)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

@thatfiredev
Copy link
Member

@sebastian-hoebarth it seems like you're running into #1999

Can you please add add a dependency on a newer version of play-services-auth? (from the stacktrace you pasted, it looks like right now your project is using com.google.android.gms:play-services-auth@@19.0.0)

dependencies {
    // ...
    implementation("com.google.android.gms:play-services-auth:20.7.0")
}

@sebastian-hoebarth
Copy link
Author

I haven't added play-services-auth in my project gradle .

//android x ktl
implementation("androidx.core:core-ktx:1.12.0-rc01")
implementation("androidx.lifecycle:lifecycle-extensions:2.2.0")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0-alpha01")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0-alpha01")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.6.1")
implementation("androidx.fragment:fragment-ktx:1.6.1")
implementation("androidx.work:work-runtime-ktx:2.8.1")
implementation("androidx.slice:slice-builders-ktx:1.0.0-alpha08")

// android x
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.vectordrawable:vectordrawable:1.2.0-beta01")
implementation("androidx.browser:browser:1.6.0")
implementation("androidx.room:room-coroutines:2.1.0-alpha04")
implementation("androidx.preference:preference-ktx:1.2.1")
implementation("androidx.multidex:multidex:2.0.1")

// architecture
implementation("android.arch.lifecycle:extensions:1.1.1")
implementation("android.arch.lifecycle:runtime:1.1.1")
implementation("androidx.room:room-runtime:2.5.2")
implementation("androidx.navigation:navigation-fragment-ktx:2.7.1")
implementation("androidx.navigation:navigation-ui-ktx:2.7.1")

// google firebase
implementation(platform("com.google.firebase:firebase-bom:32.2.2"))
implementation("com.google.firebase:firebase-firestore-ktx")
implementation("com.google.firebase:firebase-firestore")
implementation("com.google.firebase:firebase-config")
implementation("com.google.firebase:firebase-perf")
implementation("com.google.firebase:firebase-dynamic-links")
implementation("com.google.firebase:firebase-analytics-ktx")
implementation("com.google.firebase:firebase-crashlytics")
implementation("com.google.firebase:firebase-auth-ktx")
implementation("com.firebaseui:firebase-ui-auth:8.0.2")

// ML
implementation("com.google.mlkit:object-detection:17.0.0")
implementation("com.google.mlkit:image-labeling-custom:17.0.1")
implementation("com.google.mlkit:linkfirebase:17.0.0")

//Camera
implementation("androidx.camera:camera-core:1.2.3")
implementation("androidx.camera:camera-camera2:1.2.3")
implementation("androidx.camera:camera-lifecycle:1.2.3")
implementation("androidx.camera:camera-view:1.2.3")
implementation("androidx.camera:camera-mlkit-vision:1.2.0-beta02")

// google
implementation("com.google.android.material:material:1.9.0")
implementation("com.google.android.flexbox:flexbox:3.0.0")
implementation("com.google.android.play:core:1.10.3")
implementation("com.google.guava:guava:32.1.2-jre")
implementation("com.google.android.gms:play-services-maps:18.1.0")
implementation("com.google.android.gms:play-services-location:21.0.1")

// Kotlin + Coroutines
implementation("org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.9.10")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")

//Android
implementation("android.arch.paging:runtime:1.0.1")

@thatfiredev
Copy link
Member

@sebastian-hoebarth Can you please add it to see if the problem goes away?

@ian-sayles
Copy link

Hi @thatfiredev I added com.google.android.gms:play-services-auth:20.7.0 earlier this year to fix the sign in crash on latest version of Android when then the email sign in button is clicked the app would just crash. Now when doing a new release I tried upgrading to com.google.android.gms:play-services-auth:21.0.0 but get lots of R8 errors due I think to the change "Removed Credentials API. Replaced by Credential Manager". Can't this library be upgraded so don't have to worry about having to keep track of all these versions that work or break if upgraded?

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

No branches or pull requests

3 participants