flutterfire
flutterfire copied to clipboard
[Firebase_core]: FATAL EXCEPTION: firebase-iid-executor java.lang.VerifyError: Verifier rejected class r4.k: java.lang.String r4.k.d(long) failed to verify: java.lang.String r4.k.d(long): [0xC] 'this' argument 'Precise Reference: java.time.Instant' not instance of 'Precise Reference: n7.e'
Is there an existing issue for this?
- [X] I have searched the existing issues.
Which plugins are affected?
Core
Which platforms are affected?
Android
Description
When I am using Proguard, i run into this issue: ERROR: R8: Library class java.util.AbstractCollection implements program class java.util.Collection ERROR: R8: Library class java.util.AbstractList implements program class java.util.List ERROR: R8: Library class java.util.AbstractMap$SimpleImmutableEntry implements program class java.util.Map$Entry ERROR: R8: Library class java.util.AbstractMap implements program class java.util.Map ERROR: R8: Library class java.util.ArrayList implements program class java.util.List ERROR: R8: Library class java.util.AbstractSet implements program class java.util.Set ERROR: R8: Library class java.util.Hashtable implements program class java.util.Map ERROR: R8: Library class java.util.LinkedHashMap implements program class java.util.Map ERROR: R8: Library class java.util.HashMap implements program class java.util.Map ERROR: R8: Library class java.util.concurrent.CopyOnWriteArrayList implements program class java.util.List ERROR: R8: Library class java.util.TreeMap implements program class java.util.NavigableMap ERROR: R8: Library class java.util.LinkedList implements program class java.util.List ERROR: R8: Library class java.util.LinkedList implements program class java.util.Deque ERROR: R8: Library class java.util.HashSet implements program class java.util.Set ERROR: R8: Library class java.util.ArrayDeque implements program class java.util.Deque ERROR: R8: Library class java.util.WeakHashMap implements program class java.util.Map ERROR: R8: Library class java.util.LinkedHashSet implements program class java.util.Set ERROR: R8: Library class java.util.concurrent.LinkedBlockingQueue implements program class java.util.concurrent.BlockingQueue ERROR: R8: Library class java.util.AbstractQueue implements program class java.util.Queue ERROR: R8: Library class java.util.concurrent.ConcurrentLinkedQueue implements program class java.util.Queue ERROR: R8: Library class java.util.ServiceLoader implements program class java.lang.Iterable ERROR: R8: Library class java.util.TreeSet implements program class java.util.NavigableSet ERROR: R8: Library class java.util.concurrent.ConcurrentSkipListMap implements program class java.util.concurrent.ConcurrentNavigableMap ERROR: R8: Library class java.util.concurrent.SynchronousQueue implements program class java.util.concurrent.BlockingQueue ERROR: R8: Library class java.util.AbstractMap$SimpleEntry implements program class java.util.Map$Entry ERROR: R8: Library class java.nio.file.Path implements program class java.lang.Iterable ERROR: R8: Library class java.util.IdentityHashMap implements program class java.util.Map
Then when i add this to my proguard: -dontwarn java.util.** -dontwarn java.nio.file.** -dontwarn java.lang.Iterable -keep class java.util.** { ; } -keep class java.nio.file.* { *; } -keep class java.lang.Iterable { *; }
Reproducing the issue
Code:
gradle-wrapper.properties: distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https://services.gradle.org/distributions/gradle-8.3-bin.zip
proguard-rules.pro:
Add project specific ProGuard rules here.
By default, the flags in this file are appended to flags specified
in the {sdk.dir}/tools/proguard/proguard-android.txt file
You can edit the include path and order by changing the ProGuard
include property in project.properties.
For more details, see
http://developer.android.com/guide/developing/tools/proguard.html
Add any project specific keep options here:
Flutter specific
-keep class io.flutter.app.** { ; } -keep class io.flutter.plugins.* { *; } -keep class com.google.android.play.core.splitcompat.SplitCompatApplication { *; } -keep class com.google.android.play.core.splitinstall.SplitInstallManager { *; } -keep class com.google.android.play.core.splitinstall.SplitInstallManagerFactory { *; } -keep class com.google.android.play.core.splitinstall.SplitInstallRequest$Builder { *; } -keep class com.google.android.play.core.splitinstall.SplitInstallRequest { *; } -keep class com.google.android.play.core.splitinstall.SplitInstallStateUpdatedListener { *; } -keep class com.google.android.play.core.tasks.OnFailureListener { ; } -keep class com.google.android.play.core.tasks.OnSuccessListener { ; } -keep class com.google.android.play.core.tasks.Task { ; } -keep class com.google.android.play.core. { ; } -keep class com.google.android.play.review. { *; }
Keep rules for Google Play Core Task classes
-keep class com.google.android.play.core.tasks.** { *; }
Keep rules for Flutter deferred components
-keep class io.flutter.embedding.engine.deferredcomponents.PlayStoreDeferredComponentManager { *; } -dontwarn com.google.android.play.core.tasks.OnFailureListener -dontwarn com.google.android.play.core.tasks.OnSuccessListener -dontwarn com.google.android.play.core.tasks.Task
Suppress warnings for the device_info_plus library, specifically for Build.getSerial()
-dontwarn dev.fluttercommunity.plus.device_info.MethodCallHandlerImpl
Suppress all warnings for the device_info_plus package
-dontwarn dev.fluttercommunity.plus.device_info.**
-dontwarn java.util.** -dontwarn java.nio.file.** -dontwarn java.lang.Iterable -keep class java.util.** { ; } -keep class java.nio.file.* { *; } -keep class java.lang.Iterable { *; }
I get this error: FATAL EXCEPTION: firebase-iid-executor E/AndroidRuntime(19866): Process: com.easybites, PID: 19866 E/AndroidRuntime(19866): java.lang.VerifyError: Verifier rejected class r4.k: java.lang.String r4.k.d(long) failed to verify: java.lang.String r4.k.d(long): [0xC] 'this' argument 'Precise Reference: java.time.Instant' not instance of 'Precise Reference: n7.e' (declaration of 'r4.k' appears in /data/app/~~87U2KzSQlnpbttNMXS2ULw==/com.easybites-2xqOk99rTmQ0LWAxTCKG3Q==/base.apk)
Firebase Core version
3.2.0
Flutter Version
3.22.1
Relevant Log Output
FATAL EXCEPTION: firebase-iid-executor
E/AndroidRuntime(19866): Process: com.easybites, PID: 19866
E/AndroidRuntime(19866): java.lang.VerifyError: Verifier rejected class r4.k: java.lang.String r4.k.d(long) failed to verify: java.lang.String r4.k.d(long): [0xC] 'this' argument 'Precise Reference: java.time.Instant' not instance of 'Precise Reference: n7.e' (declaration of 'r4.k' appears in /data/app/~~87U2KzSQlnpbttNMXS2ULw==/com.easybites-2xqOk99rTmQ0LWAxTCKG3Q==/base.apk)
E/AndroidRuntime(19866): at r4.f.j(Unknown Source:0)
E/AndroidRuntime(19866): at r4.f.e(Unknown Source:0)
E/AndroidRuntime(19866): at r4.e.get(Unknown Source:4)
E/AndroidRuntime(19866): at r4.f.k(Unknown Source:3)
E/AndroidRuntime(19866): at r4.f.c(Unknown Source:0)
E/AndroidRuntime(19866): at r4.d.call(Unknown Source:2)
E/AndroidRuntime(19866): at com.google.android.gms.tasks.zzz.run(Unknown Source:4)
E/AndroidRuntime(19866): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
E/AndroidRuntime(19866): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
E/AndroidRuntime(19866): at u3.b.b(Unknown Source:12)
E/AndroidRuntime(19866): at u3.b.a(Unknown Source:0)
E/AndroidRuntime(19866): at u3.a.run(Unknown Source:4)
E/AndroidRuntime(19866): at java.lang.Thread.run(Thread.java:1012)
Flutter dependencies
Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.
Additional context and comments
No response
Hi @itismejy . Kindly provide a minimal code sample reproducing this issue
Closing since it looks like a Proguard misconfiguration and not related to FF.