yalcin-ata/godot-android-module-firebase

Release build crashes

YoGameZer opened this issue · 3 comments

I am almost done with my game (1 year in development), been testing for months exporting with debug. The release build doesn't have errors exporting but the game crashes everytime I use firestore, instant crash when I upload a document or load documents. Authentication works but sometimes it won't show anything. Disabling testAds in admob works too, showed me real ads only on the release build.

I have modifed the firebase, firestore, and storage files in "src\org\godotengine\godot" to add queries

Searching through google I found similar issues and I tried updating everything.
Updated android studio (not sure why)
changed to gradle 6.4.1

changed dependencies to the latest ones I found:
[dependencies]
// Inside the dependencies section of the build file.
// Firebase Core (needs Analytics implementation)
implementation 'com.google.firebase:firebase-analytics:17.4.3'
// Firebase Ads (AdMob)
implementation 'com.google.firebase:firebase-ads:19.1.0'
// Firebase Ads (AdMob) Unity Mediation
implementation 'com.google.ads.mediation:unity:3.2.0.1'
// Firebase Authentication
implementation 'com.google.firebase:firebase-auth:19.3.1'
// Firebase Authentication (Google)
implementation 'com.google.android.gms:play-services-auth:18.0.0'
// Firebase Firestore (Database)
implementation 'com.google.firebase:firebase-firestore:21.4.3'
// Firebase Storage (File storage)
implementation 'com.google.firebase:firebase-storage:19.1.1'
// Firebase In-App Messaging
implementation 'com.google.firebase:firebase-inappmessaging-display:19.0.7'
// Firebase Cloud Messaging
implementation 'com.google.firebase:firebase-messaging:20.2.0'
implementation 'androidx.work:work-runtime:2.3.4'

After doing that, I got some errors but fixed it adding this at the bottom:
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'

I tested on my phone and on the NOX emulator
I have been stuck on this for 3 days, and I don't know much of android or gradle, or any of this.

Edit:
I tried making a new godot project with a new app on the firebase console, and a new release key. But it still crashes when I try to add or load documents.

I've been trying more things and I keep looking online, but nothing seems to work.
I tried unistalling all sdk and java stuff, and reinstalling this time without android studio, just the command-line version. Didn't work byt at least that freed me around 15GB of space.

Here is a quick video of my game: https://www.reddit.com/r/godot/comments/h9t0ms/showing_my_game_also_need_help/

In the video I use the debug apk and as you can see everything works as it should.
In Release wierd stuff happens, normally it just crashes but sometimes it works the first time, clearing cache or reinstalling doens't seem to affect reset it though. In my game I can search for levels, if the result of the search is empty it's less likely to crash.

If it works for someone please tell me, I use my laptop and I can try on my PC. I am thinking it might be an issue of this module.

OK, I got a logcat from my phone. It was really long, but these I think are the main causes (not in order):

libGLESv1: STS_GLApi : DTS, ODTC are not allowed for Package : com.gmail.yojaja7.myGreatestInventions

06-21 16:43:43.764 29766 29766 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
06-21 16:43:43.764 29766 29766 F DEBUG : Build fingerprint: 'samsung/j3topltetu/j3toplteaio:8.0.0/R16NW/J337AZTUSAATE1:user/release-keys'
06-21 16:43:43.764 29766 29766 F DEBUG : Revision: '9'
06-21 16:43:43.764 29766 29766 F DEBUG : ABI: 'arm'
06-21 16:43:43.765 29766 29766 F DEBUG : pid: 29426, tid: 29471, name: GLThread 11569 >>> com.gmail.yojaja7.myGreatestInventions <<<
06-21 16:43:43.765 29766 29766 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
06-21 16:43:43.765 29766 29766 F DEBUG : Cause: null pointer dereference
06-21 16:43:43.765 29766 29766 F DEBUG : r0 c8fbfee0 r1 00000008 r2 bec86748 r3 c6ab1220
06-21 16:43:43.765 29766 29766 F DEBUG : r4 00000017 r5 00000001 r6 bec59df0 r7 00000002
06-21 16:43:43.765 29766 29766 F DEBUG : r8 c6ab12bc r9 e8657220 sl c6ab1178 fp c6ab13c8
06-21 16:43:43.765 29766 29766 F DEBUG : ip bec50f78 sp c6ab10c8 lr c6dd1bd4 pc c7e537b8 cpsr 80030010
06-21 16:43:43.775 29766 29766 F DEBUG :
06-21 16:43:43.775 29766 29766 F DEBUG : backtrace:
06-21 16:43:43.776 29766 29766 F DEBUG : #00 pc 013127b8 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #1 pc 00290bd0 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #2 pc 002682a0 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #3 pc 01275214 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #4 pc 01312768 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #5 pc 002909e4 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #6 pc 002682a0 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #7 pc 01275214 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #8 pc 01276e10 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #9 pc 012767ec /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #10 pc 01282cbc /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #11 pc 012752d4 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #12 pc 01312768 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #13 pc 002909e4 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #14 pc 002682a0 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #15 pc 01275214 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #16 pc 0126d11c /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #17 pc 0126d410 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #18 pc 0071cd28 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #19 pc 000b6420 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so
06-21 16:43:43.776 29766 29766 F DEBUG : #20 pc 0008589c /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/lib/arm/libgodot_android.so (Java_org_godotengine_godot_GodotLib_step+212)
06-21 16:43:43.776 29766 29766 F DEBUG : #21 pc 0020a5b7 /data/app/com.gmail.yojaja7.myGreatestInventions-_aKeeJ8MAK_BH_y5ET0PkA==/oat/arm/base.odex (offset 0xae000)

E Parcel : Class not found when unmarshalling: com.google.android.gms.auth.api.signin.internal.SignInConfiguration
06-21 16:42:36.140 3150 5802 E Parcel : java.lang.ClassNotFoundException: com.google.android.gms.auth.api.signin.internal.SignInConfiguration
06-21 16:42:36.140 3150 5802 E Parcel : at java.lang.Class.classForName(Native Method)
06-21 16:42:36.140 3150 5802 E Parcel : at java.lang.Class.forName(Class.java:453)
06-21 16:42:36.140 3150 5802 E Parcel : at android.os.Parcel.readParcelableCreator(Parcel.java:2843)
06-21 16:42:36.140 3150 5802 E Parcel : at android.os.Parcel.readParcelable(Parcel.java:2797)
06-21 16:42:36.140 3150 5802 E Parcel : at android.os.Parcel.readValue(Parcel.java:2700)
06-21 16:42:36.140 3150 5802 E Parcel : at android.os.Parcel.readArrayMapInternal(Parcel.java:3067)
06-21 16:42:36.140 3150 5802 E Parcel : at android.os.BaseBundle.unparcel(BaseBundle.java:257)
06-21 16:42:36.140 3150 5802 E Parcel : at android.os.BaseBundle.getString(BaseBundle.java:1086)
06-21 16:42:36.140 3150 5802 E Parcel : at android.content.Intent.getStringExtra(Intent.java:7718)
06-21 16:42:36.140 3150 5802 E Parcel : at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:470)
06-21 16:42:36.140 3150 5802 E Parcel : at com.android.server.am.ActivityStarter.startActivityLocked(ActivityStarter.java:421)
06-21 16:42:36.140 3150 5802 E Parcel : at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1341)
06-21 16:42:36.140 3150 5802 E Parcel : at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1111)
06-21 16:42:36.140 3150 5802 E Parcel : at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:6095)
06-21 16:42:36.140 3150 5802 E Parcel : at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:5947)
06-21 16:42:36.140 3150 5802 E Parcel : at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:121)
06-21 16:42:36.140 3150 5802 E Parcel : at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3862)
06-21 16:42:36.140 3150 5802 E Parcel : at android.os.Binder.execTransact(Binder.java:682)
06-21 16:42:36.140 3150 5802 E Parcel : Caused by: java.lang.ClassNotFoundException: com.google.android.gms.auth.api.signin.internal.SignInConfiguration
06-21 16:42:36.140 3150 5802 E Parcel : at java.lang.Class.classForName(Native Method)
06-21 16:42:36.140 3150 5802 E Parcel : at java.lang.BootClassLoader.findClass(ClassLoader.java:1355)
06-21 16:42:36.140 3150 5802 E Parcel : at java.lang.BootClassLoader.loadClass(ClassLoader.java:1415)
06-21 16:42:36.140 3150 5802 E Parcel : at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
06-21 16:42:36.140 3150 5802 E Parcel : ... 18 more
06-21 16:42:36.140 3150 5802 E Parcel : Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
06-21 16:42:36.141 3150 5802 W Bundle : Failed to parse Bundle, but defusing quietly
06-21 16:42:36.141 3150 5802 W Bundle : android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.google.android.gms.auth.api.signin.internal.SignInConfiguration
06-21 16:42:36.141 3150 5802 W Bundle : at android.os.Parcel.readParcelableCreator(Parcel.java:2871)
06-21 16:42:36.141 3150 5802 W Bundle : at android.os.Parcel.readParcelable(Parcel.java:2797)
06-21 16:42:36.141 3150 5802 W Bundle : at android.os.Parcel.readValue(Parcel.java:2700)
06-21 16:42:36.141 3150 5802 W Bundle : at android.os.Parcel.readArrayMapInternal(Parcel.java:3067)
06-21 16:42:36.141 3150 5802 W Bundle : at android.os.BaseBundle.unparcel(BaseBundle.java:257)
06-21 16:42:36.141 3150 5802 W Bundle : at android.os.BaseBundle.getString(BaseBundle.java:1086)
06-21 16:42:36.141 3150 5802 W Bundle : at android.content.Intent.getStringExtra(Intent.java:7718)
06-21 16:42:36.141 3150 5802 W Bundle : at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:470)
06-21 16:42:36.141 3150 5802 W Bundle : at com.android.server.am.ActivityStarter.startActivityLocked(ActivityStarter.java:421)
06-21 16:42:36.141 3150 5802 W Bundle : at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1341)
06-21 16:42:36.141 3150 5802 W Bundle : at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1111)
06-21 16:42:36.141 3150 5802 W Bundle : at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:6095)
06-21 16:42:36.141 3150 5802 W Bundle : at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:5947)
06-21 16:42:36.141 3150 5802 W Bundle : at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:121)
06-21 16:42:36.141 3150 5802 W Bundle : at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3862)
06-21 16:42:36.141 3150 5802 W Bundle : at android.os.Binder.execTransact(Binder.java:682)

SQLiteDatabase: Error inserting period=2982000 preferred_charging_state=1 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService required_network_type=0 runtime=1592772156299 required_idleness_state=0 source=16 service_kind=0 target_package=com.google.android.gms persistence_level=1 source_version=202117000 last_runtime=0 user_id=0 job_id=-1 requires_charging=0 tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG flex_time=1490000 task_type=0 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}}
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: pending_ops.tag, pending_ops.target_class, pending_ops.target_package, pending_ops.user_id (code 2067)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: #################################################################
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: Error Code : 2067 (SQLITE_CONSTRAINT_UNIQUE)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: Caused By : Abort due to constraint violation.
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: (UNIQUE constraint failed: pending_ops.tag, pending_ops.target_class, pending_ops.target_package, pending_ops.user_id (code 2067))
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: #################################################################
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:953)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1904)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1771)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at aqgy.a(:com.google.android.gms@202117017@20.21.17 (040306-316502805):146)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at aqgi.a(:com.google.android.gms@202117017@20.21.17 (040306-316502805):190)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at aqgi.a(:com.google.android.gms@202117017@20.21.17 (040306-316502805):23)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at aqgi.a(:com.google.android.gms@202117017@20.21.17 (040306-316502805):185)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at aqcs.run(:com.google.android.gms@202117017@20.21.17 (040306-316502805):9)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at snn.b(:com.google.android.gms@202117017@20.21.17 (040306-316502805):12)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at snn.run(:com.google.android.gms@202117017@20.21.17 (040306-316502805):7)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at stk.run(:com.google.android.gms@202117017@20.21.17 (040306-316502805):0)
06-21 16:42:36.319 6723 28494 E SQLiteDatabase: at java.lang.Thread.run(Thread.java:764)

I tried on the new plugin for 3.2.2 and is doing the same still. But I found an issue with my project, making a dictionary with the firestore document id as the key is breaking it on my phone, then to fix it by clearing cache and data. When I don't do the dictionary it works like the debug build, so I will find a different way to save which levels the user have played and completed. I still have the issue on the emulator, I just updated the emulator to android 7 from 5 and Is working like on my phone. I think it's weird that it works in debug with an older version.