Skip to content

[Bug] Hang-up Issue with Firebase Initialization (CheckAndFixDependenciesAsync) on Android 15 and Inquiry on 16KB Page Size ELF Alignment Support #1180

Closed
@b3lypscfcon

Description

@b3lypscfcon

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 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

  1. 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
  2. Code Implementation:
    Integrate Firebase Cloud Messaging into your project and initialize Firebase using the following code:

    Firebase.FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread(task =>
    {
        var dependencyStatus = task.Result;
        if (dependencyStatus == Firebase.DependencyStatus.Available)
        {
            Debug.Log("Firebase Initialized");
            // Register Firebase Messaging events
            Firebase.Messaging.FirebaseMessaging.TokenReceived += OnTokenReceived;
            Firebase.Messaging.FirebaseMessaging.MessageReceived += OnMessageReceived;
        }
        else
        {
            Debug.LogError($"Firebase dependency check failed: {dependencyStatus}");
        }
    });
  3. Execution:

    • Run the application on an Android 15 emulator.
    • 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).
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions