Unity Firebase 6.2+ Android crashes on launch on 64bits

3

(EDIT: it has nothing to do with Firebase, but with Unity and Google Play Services, check the first comment)

Since I upgraded my app to Firebase 6.2.x it crashes on launch on Android (before/during the Splash screen).

Some info:

  • I think this only happens on 64 bits (not 100% sure, have to double check)
  • This only happens on a new install. For all users which already had the app installed, updating the app to the version with Firebase 6.2 caused no crashes. But if the person would uninstall and reinstall the app, it will crash.
  • But even when it's crashing on launch, if I reinstall it (via USB) with the same version, the app will then run just fine (this makes no sense to me). Of course if I uninstall it and reinstall it will start crashing again.
  • Similarly, if the app is not working, but I update it to a new version (with no other changes, simply the version number), it will work fine as well. This happens both via USB or in production (Google Play), and has been confirmed by several users of the app (whenever an update comes the app will start working again)
  • I tried to create a Dummy test project to replicate the problem, but that new project works fine on Firebase 6.2.x. I have copied everything I could think of (settings, libraries, AndroidManifest.xml, etc) to this new project but it will still run fine. I compared the build log of both projects and the files/dependencies/etc are almost all the same, couldnt find anything relevant that could cause the problem on the real project.
  • It seems that on Firebase 6.2 they added some stuff of Jetpack/Jetifier/etc, which could be related to the problem. I tried disabling the [X] Use Jetifier on the latest Android Resolver to see if it had any effect, but it gets reenabled automatically during build.
  • I use latest Unity 2019.1 (currently .12f), IL2CPP, .NET 4.x, Minimum API 16 (4.1) and Target API 28 (9.0). I use the NDK/SDK that comes installed with Unity Android module. This problem happens both with Asset Bundle or regular APK.

If I revert the library to Firebase 6.0.0 it works fine, no crashes. This will be my solution for now, but I really need to be able to run my app with the latest Firebase versions, I cant be stuck with an old Firebase.

The crash I get is this:

2019-07-31 12:01:01.837 1346-3648/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.mycompany.myapp cmp=com.mycompany.myapp/com.unity3d.player.UnityPlayerActivity} from uid 10036
2019-07-31 12:01:01.850 1346-3648/? E/ANDR-PERF-JNI: com_qualcomm_qtiperformance_native_perf_io_prefetch_start
2019-07-31 12:01:01.889 1346-3648/? D/ActivityTrigger: activityResumeTrigger: The activity in ApplicationInfo{97cb34f com.mycompany.myapp} is now in focus and seems to be in full-screen mode
2019-07-31 12:01:01.889 1346-3648/? E/ActivityTrigger: activityResumeTrigger: not whiteListedcom.mycompany.myapp/com.unity3d.player.UnityPlayerActivity/572
2019-07-31 12:01:01.889 1346-3648/? D/ActivityTrigger: ActivityTrigger activityPauseTrigger 
2019-07-31 12:01:01.905 1346-3648/? D/ActivityTrigger: activityResumeTrigger: The activity in ApplicationInfo{97cb34f com.mycompany.myapp} is now in focus and seems to be in full-screen mode
2019-07-31 12:01:01.905 1346-3648/? E/ActivityTrigger: activityResumeTrigger: not whiteListedcom.mycompany.myapp/com.unity3d.player.UnityPlayerActivity/572
2019-07-31 12:01:01.925 1346-3648/? D/Boost: hostingType=activity, hostingName=com.mycompany.myapp/com.unity3d.player.UnityPlayerActivity, callerPackage=com.android.vending, isSystem=true, isBoostNeeded=false.
2019-07-31 12:01:01.927 1346-3648/? I/ActivityManager: Start proc 25225:com.mycompany.myapp/u0a293 for activity com.mycompany.myapp/com.unity3d.player.UnityPlayerActivity caller=com.android.vending
2019-07-31 12:01:01.929 25225-25225/? E/ycompany.myap: Not starting debugger since process cannot load the jdwp agent.
2019-07-31 12:01:01.955 25225-25225/? I/ycompany.myap: The ClassLoaderContext is a special shared library.
2019-07-31 12:01:01.958 25225-25225/? W/ycompany.myap: JIT profile information will not be recorded: profile file does not exits.
2019-07-31 12:01:01.969 25225-25225/? I/Perf: Connecting to perf service.
2019-07-31 12:01:01.986 25225-25225/? I/FirebaseInstanceId: App restored, clearing state
2019-07-31 12:01:01.993 25225-25225/? I/FirebaseInitProvider: FirebaseApp initialization successful
2019-07-31 12:01:02.034 25225-25243/? I/FA: App measurement is starting up, version: 16250
2019-07-31 12:01:02.034 25225-25243/? I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
2019-07-31 12:01:02.034 25225-25243/? I/FA: To enable faster debug mode event logging run:
      adb shell setprop debug.firebase.analytics.app com.mycompany.myapp
2019-07-31 12:01:02.089 25225-25243/? I/FA: Tag Manager is not found and thus will not be used
2019-07-31 12:01:02.147 25225-25225/? E/LB: fail to open file: No such file or directory
2019-07-31 12:01:02.161 25225-25248/? I/Unity: SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 8, Memory = 5634mb
2019-07-31 12:01:02.161 25225-25248/? I/Unity: SystemInfo ARM big.LITTLE configuration: 4 big (mask: 0xf0), 4 little (mask: 0xf)
2019-07-31 12:01:02.161 25225-25248/? I/Unity: ApplicationInfo com.mycompany.myapp version 5.7.2G build xxxxxx
2019-07-31 12:01:02.161 25225-25248/? I/Unity: Built from '2019.1/staging' branch, Version '2019.1.12f1 (f04f5427219e)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a', Stripping 'Enabled'
2019-07-31 12:01:02.183 25225-25248/? E/CRASH: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000000000000000
2019-07-31 12:01:02.183 25225-25248/? E/CRASH: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2019-07-31 12:01:02.183 25225-25248/? E/CRASH: Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
2019-07-31 12:01:02.183 25225-25248/? E/CRASH: Build fingerprint: 'Xiaomi/xxxxxxx/release-keys'
2019-07-31 12:01:02.183 25225-25248/? E/CRASH: Revision: '0'
2019-07-31 12:01:02.183 25225-25248/? E/CRASH: pid: 25225, tid: 25248, name: UnityMain  >>> com.mycompany.myapp <<<
2019-07-31 12:01:02.183 25225-25248/? E/CRASH:     x0   00000000000005cd  x1   0000000000000000  x2   0000006f6a514980  x3   0000006f6b741368
2019-07-31 12:01:02.183 25225-25248/? E/CRASH:     x4   0000006f6a514a40  x5   0000000000000004  x6   fefeff6e67659bff  x7   7f7f7f7f7f7fff7f
2019-07-31 12:01:02.183 25225-25248/? E/CRASH:     x8   0000000000000000  x9   00000000003832e4  x10  0000006f670c9890  x11  000000000002e24c
2019-07-31 12:01:02.183 25225-25248/? E/CRASH:     x12  0000006f68acb740  x13  0000000000007ac0  x14  0000000000000140  x15  aaaaaaaaaaaaaaab
2019-07-31 12:01:02.183 25225-25248/? E/CRASH:     x16  0000006f68be0af0  x17  0000007006bddef0  x18  0000000000000000  x19  0000006f7fb2c500
2019-07-31 12:01:02.183 25225-25248/? E/CRASH:     x20  0000006f6703207c  x21  0000006f6b741368  x22  0000000000000000  x23  0000006f6a51499c
2019-07-31 12:01:02.183 25225-25248/? E/CRASH:     x24  0000006f68ca2000  x25  0000006f68ca2000  x26  00000000e9bd37a7  x27  0000000000000006
2019-07-31 12:01:02.183 25225-25248/? E/CRASH:     x28  0000000000012154  x29  0000006f6b740f00  x30  0000006f67924794
2019-07-31 12:01:02.183 25225-25248/? E/CRASH:     sp   0000006f6b740dc0  pc   0000006f6792f05c  pstate 0000000000000000
2019-07-31 12:01:02.183 25225-25248/? E/CRASH: backtrace:
2019-07-31 12:01:02.209 25225-25248/? E/CRASH:  #00  pc 000000000000069c  [vdso] ()
2019-07-31 12:01:02.210 25225-25248/? E/CRASH:  #01  pc 000000000052c058  /data/app/com.mycompany.myapp-W26Dq_uyKkK1OxQ3Dts71g==/split_config.arm64_v8a.apk ()
2019-07-31 12:01:02.210 25225-25248/? E/CRASH:  #02  pc 0000000000521790  /data/app/com.mycompany.myapp-W26Dq_uyKkK1OxQ3Dts71g==/split_config.arm64_v8a.apk ()
[...]
 Process: com.mycompany.myapp, PID: 25225
    java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000000000000000
    Build fingerprint: 'Xiaomi/xxxxxx/release-keys'
    Revision: '0'
    pid: 25225, tid: 25248, name: UnityMain  >>> com.mycompany.myapp <<<
        x0   00000000000005cd  x1   0000000000000000  x2   0000006f6a514980  x3   0000006f6b741368
        x4   0000006f6a514a40  x5   0000000000000004  x6   fefeff6e67659bff  x7   7f7f7f7f7f7fff7f
        x8   0000000000000000  x9   00000000003832e4  x10  0000006f670c9890  x11  000000000002e24c
        x12  0000006f68acb740  x13  0000000000007ac0  x14  0000000000000140  x15  aaaaaaaaaaaaaaab
        x16  0000006f68be0af0  x17  0000007006bddef0  x18  0000000000000000  x19  0000006f7fb2c500
        x20  0000006f6703207c  x21  0000006f6b741368  x22  0000000000000000  x23  0000006f6a51499c
        x24  0000006f68ca2000  x25  0000006f68ca2000  x26  00000000e9bd37a7  x27  0000000000000006
        x28  0000000000012154  x29  0000006f6b740f00  x30  0000006f67924794
        sp   0000006f6b740dc0  pc   0000006f6792f05c  pstate 0000000000000000

        at [vdso].(:0)
        at split_config.(:0)
        at split_config.(:0)
[...]

Any pointers? Any ideas on what could possibly be causing this, or what test could I make?

Maybe it's something related to cache (since on the 2nd install it works), maybe related to Google Play Services?

Well if anyone runs into a similar problem please send some info.

android
firebase
unity3d
admob
google-play-services
asked on Stack Overflow Aug 1, 2019 by pertz • edited Aug 1, 2019 by pertz

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0