Flutter Fatal Exception in Firestore Android
Yesterday I was facing an unexpected crash in production (How did this happen?) to be short, I do not own a physical Android device to test RELEASE builds, in theory I was adding a small, almost insignificant change… but doing some Flutter Clean here, Flutter Package Get over there, Android CLEAN, Android BUILD and that kind of things… SOMETHING IMPORTANT DID ACTUALLY CHANGED.
FATAL EXCEPTION: main Process: com.app.android, PID: 12668 java.lang.RuntimeException: Internal error in Firestore (19.0.0). at com.google.firebase.firestore.g.j.a(:379) at com.google.firebase.firestore.g.g.run(Unknown Source:2) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6718) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
After digging and digging and trying to figure out what was happening, I realize that disabling useProguard and minifyEnabled I was able to fix that crash… BUT what the hell?? I didn’t change or add any proguard rules or gradle file… so, finally found WHAT was actually causing that crash thanks to my GIT file status… and guess what I’ve found…
android.enableR8=true
Some how R8 got added AND enabled in my gradle.properties file!. Changing the value to FALSE got my APP running and free of crashes.
Top comments (0)