Crashlytics + IL2CPP does not work
See original GitHub issue[READ] For Firebase Unity SDK issues, please report to Firebase Unity open-source
Once you’ve read this section and determined that your issue is appropriate for this repository, please delete this section.
[REQUIRED] Please fill in the following fields:
- Unity editor version: 2020.3.25f1
- Firebase Unity SDK version: 9.1.0
- Source you installed the SDK: .unitypackage (.unitypackage or Unity Package Manager)
- Problematic Firebase Component: Crashlytics (Auth, Database, etc.)
- Other Firebase Components in use: None (Auth, Database, etc.)
- Additional SDKs you are using: None (Facebook, AdMob, etc.)
- Platform you are using the Unity editor on: Mac (Mac, Windows, or Linux)
- Platform you are targeting: Android (iOS, Android, and/or desktop)
- Scripting Runtime: IL2CPP (Mono, and/or IL2CPP)
[REQUIRED] Please describe the issue here:
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.) Clean project, using Crashlytics quick start. Building with Mono WORKS, building with IL2CPP does not:
Unity : Disable module ‘crashlytics’ for ‘Firebase.Crashlytics.Crashlytics, Firebase.Crashlytics’
Longer log: 06-24 13:51:45.842 1864 2109 I ActivityTaskManager: Displayed com.fourxp.mergeup/com.unity3d.player.UnityPlayerActivity: +210ms 06-24 13:51:45.844 17707 17738 I Unity : MemoryManager: Using ‘Dynamic Heap’ Allocator. 06-24 13:51:45.857 17707 17738 I Unity : SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 8, Memory = 5593mb 06-24 13:51:45.857 17707 17738 I Unity : SystemInfo ARM big.LITTLE configuration: 2 big (mask: 0xc0), 6 little (mask: 0x3f) 06-24 13:51:45.857 17707 17738 I Unity : ApplicationInfo com.fourxp.mergeup version 0.1 build 17014145-bd67-4b23-a737-0c877bff1ecf 06-24 13:51:45.857 17707 17738 I Unity : Built from ‘2020.3/staging’ branch, Version ‘2020.3.25f1 (9b9180224418)’, Build type ‘Release’, Scripting Backend ‘il2cpp’, CPU ‘arm64-v8a’, Stripping ‘Enabled’ 06-24 13:51:45.878 17707 17738 I Unity : Company Name: DefaultCompany 06-24 13:51:45.878 17707 17738 I Unity : Product Name: FirebaseClean2 06-24 13:51:47.178 723 723 E TimeStats: [3533]-[SurfaceViewcom.fourxp.mergeup/com.unity3d.player.UnityPlayerActivity#0]-timeRecords is at its maximum size[64]. Ignore this when unittesting. 06-24 13:51:48.146 17707 17738 I Unity : Disable module ‘analytics’ for ‘Firebase.Analytics.FirebaseAnalytics, Firebase.Analytics’ 06-24 13:51:48.146 17707 17738 I Unity : Firebase.FirebaseApp:InitializeAppUtilCallbacks() 06-24 13:51:48.146 17707 17738 I Unity : Firebase.FirebaseApp:CheckDependenciesAsync() 06-24 13:51:48.146 17707 17738 I Unity : Firebase.FirebaseApp:CheckAndFixDependenciesAsync() 06-24 13:51:48.146 17707 17738 I Unity : FirebaseClean:Start() 06-24 13:51:48.146 17707 17738 I Unity : 06-24 13:51:48.148 17707 17738 I Unity : Disable module ‘crashlytics’ for ‘Firebase.Crashlytics.Crashlytics, Firebase.Crashlytics’ 06-24 13:51:48.148 17707 17738 I Unity : Firebase.FirebaseApp:InitializeAppUtilCallbacks() 06-24 13:51:48.148 17707 17738 I Unity : Firebase.FirebaseApp:CheckDependenciesAsync() 06-24 13:51:48.148 17707 17738 I Unity : Firebase.FirebaseApp:CheckAndFixDependenciesAsync() 06-24 13:51:48.148 17707 17738 I Unity : FirebaseClean:Start()
Steps to reproduce:
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)? What’s the issue repro rate? (eg 100%, 1/5 etc) 100% repro rate. Use Crashlytics quick start. Switch to IL2CPP. Crashlytics will not load.
What happened? How can we make the problem occur? 100% repro rate. Use Crashlytics quick start. Switch to IL2CPP. Crashlytics will not load. Disable module ‘crashlytics’ for 'Firebase.Crashlytics.Crashlytics
If you have a downloadable sample project that reproduces the bug you’re reporting, you will likely receive a faster response on your issue.
Relevant Code:
Clean new project. Add Crashlytics. Set scripting runtime to IL2CPP.
// TODO(you): code here to reproduce the problem
https://drive.google.com/file/d/15kHj1rh8SUgrOUaFsxhiSQBBFbCOgB8T/view?usp=sharing
Issue Analytics
- State:
- Created a year ago
- Comments:22 (3 by maintainers)
Top GitHub Comments
Thanks for the information, folks. I was finally able to observe this behavior in another blank project, and the workaround you provided worked.
I’ll be relaying my observations to the team, and I’ll keep this open for future updates.
Looking into the Analytics logic, I believe it is fine as is. The logic doesn’t need the Unity side of Analytics to initialize to actually start collecting data, it is only if custom events are being added, at which point the C# code is referenced, so it will initialize.
The latest release, 9.2.0, just came out with the Crashlytics fix, so I’m marking this as closed. Thanks again for bringing this to our attention.