DEV Community

Victor Corvalan
Victor Corvalan

Posted on • Originally published at Medium on

2 1

Flutter Fatal Exception in Firestore Android

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.

Heroku

Deploy with ease. Manage efficiently. Scale faster.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay