You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Bug] Hang-up Issue with Firebase Initialization (CheckAndFixDependenciesAsync) on Android 15 and Inquiry on 16KB Page Size ELF Alignment Support
#1180
Closed
b3lypscfcon opened this issue
Feb 7, 2025
· 3 comments
· Fixed by #1184
We are encountering a problem on Android 15 (API Level 35) where Firebase initialization does not complete when running on an emulator. Using Unity 2022.3.23f1 and Firebase Cloud Messaging (tested with both version 11.9.0 and 12.5.0) in our project, the task initiated by Firebase.FirebaseApp.CheckAndFixDependenciesAsync() never returns. As a result, the callback provided via ContinueWithOnMainThread is never executed, and eventually, the app crashes with a native error. Notably, the same code works as expected on an Android 14 emulator.
In our project, the TargetSDKVersion is 35 and the minSDKVersion is 25.
Additionally, during our investigation, we observed that the latest Firebase for Unity SDK (version 12.5.0) does not build its native .so files with ELF alignment for 16KB page sizes—a new requirement in Android 15. We would like to inquire if there is a roadmap or planned update regarding support for 16KB page sizes in the Firebase for Unity SDK.
Reproducing the issue
Setup:
Unity version: 2022.3.23f1 (Android build)
Firebase Cloud Messaging: 11.9.0 (also tested with 12.5.0)
TargetSDKVersion: 35
minSDKVersion: 25
Running on an Android 15 (API Level 35) emulator
Code Implementation:
Integrate Firebase Cloud Messaging into your project and initialize Firebase using the following code:
Observe that none of the code inside the ContinueWithOnMainThread callback (e.g., the log statement "Firebase Initialized") is executed.
Shortly thereafter, after invoking FirebaseHandler.AppUtils.PollCallBacks(), the app crashes with a native error. The crash log provides little useful information, suggesting an internal native exception (such as a NullPointerException).
Contrast:
When running the same code on an Android 14 emulator, the initialization completes normally and the callback is executed without issue.
Hey @b3lypscfcon, I was able to reproduce the issue. Let me bring this up to engineers and check what's going on.
Additionally, during our investigation, we observed that the latest Firebase for Unity SDK (version 12.5.0) does not build its native .so files with ELF alignment for 16KB page sizes—a new requirement in Android 15. We would like to inquire if there is a roadmap or planned update regarding support for 16KB page sizes in the Firebase for Unity SDK.
Thanks for bringing this to our attention. Currently, I haven't heard any planned updates for this. This would likely be a feature request that we have to work on sometime in the future. We'll keep this under our radar, however we don't have any timelines to share as of the moment.
Thank you for your response and for reproducing the issue. I appreciate your efforts in escalating the Android 15 crash to the engineering team.
Regarding the Android 15 crash, please continue investigating and keep us updated when a fix becomes available.
Additionally, I would like to request that you share the planned schedule or roadmap for adding support for 16KB page sizes in the Firebase for Unity SDK once that information is available.
For additional context from our side, we have observed the following:
We confirmed that the native shared libraries in the latest Firebase for Unity SDK (version 12.5.0) are not built with ELF alignment for 16KB page sizes. Specifically, the affected libraries appear to be libFirebaseMessaging.so and libFirebaseCppApp-12_5_0.so.
When running our app on an emulator that supports 16KB page sizes, we experience a crash during the loading of libFirebaseCppApp-12_5_0.so.
Our testing environment for this observation is Unity 2022.3.56 for Android with a TargetSDKVersion of 34, a minSDKVersion of 25, and using IL2CPP.
Thank you again for addressing these issues. I look forward to your updates on both the Android 15 crash and the support for 16KB page sizes.
Description
We are encountering a problem on Android 15 (API Level 35) where Firebase initialization does not complete when running on an emulator. Using Unity 2022.3.23f1 and Firebase Cloud Messaging (tested with both version 11.9.0 and 12.5.0) in our project, the task initiated by
Firebase.FirebaseApp.CheckAndFixDependenciesAsync()
never returns. As a result, the callback provided viaContinueWithOnMainThread
is never executed, and eventually, the app crashes with a native error. Notably, the same code works as expected on an Android 14 emulator.In our project, the TargetSDKVersion is 35 and the minSDKVersion is 25.
Additionally, during our investigation, we observed that the latest Firebase for Unity SDK (version 12.5.0) does not build its native
.so
files with ELF alignment for 16KB page sizes—a new requirement in Android 15. We would like to inquire if there is a roadmap or planned update regarding support for 16KB page sizes in the Firebase for Unity SDK.Reproducing the issue
Setup:
Code Implementation:
Integrate Firebase Cloud Messaging into your project and initialize Firebase using the following code:
Execution:
ContinueWithOnMainThread
callback (e.g., the log statement "Firebase Initialized") is executed.FirebaseHandler.AppUtils.PollCallBacks()
, the app crashes with a native error. The crash log provides little useful information, suggesting an internal native exception (such as a NullPointerException).Contrast:
When running the same code on an Android 14 emulator, the initialization completes normally and the callback is executed without issue.
Firebase Unity SDK Version
11.9.0, 12.5.0
Unity editor version
2022.3.23f1
Installation Method
.unitypackage
Problematic Firebase Component(s)
Messaging
Other Firebase Component(s) in use
No response
Additional SDKs you are using
No response
Targeted Platform(s)
Android
Unity editor platform
Windows
Scripting Runtime
IL2CPP
Release Distribution Type
Pre-built SDK from https://firebase.google.com/download/unity
Relevant Log Output
If using CocoaPods for Apple platforms, the project's Podfile.lock
No response
The text was updated successfully, but these errors were encountered: