Skip to content

[Bug] Firebase Messaging produce an app to crash on Android, Unity2023+  #640

Closed
@streaminspace

Description

@streaminspace

[REQUIRED] Please fill in the following fields:

  • Unity editor version: all 2023
  • Firebase Unity SDK version: 10.5.0
  • Source you installed the SDK: .unitypackage and Unity Package Manager
  • Problematic Firebase Component: Messaging
  • Other Firebase Components in use: no
  • Additional SDKs you are using: no
  • Platform you are using the Unity editor on: Windows
  • Platform you are targeting: Android
  • Scripting Runtime: IL2CPP
  • Pre-built SDK from the website or open-source from this repo: website

[REQUIRED] Please describe the issue here:

If the application uses the Firebase Messaging component it crashes immediately after launching.
Can be reproduced only on unity 2023 versions

As I understand this is a known issue and probably this pull request is a solution, but I faced errors during the build components from open-source from this repo and can not test it

Steps to reproduce:

  1. Create a new unity project.
  2. Import the FirebaseMessaging package.
  3. Make an android build and run it.
  4. App crashes immediately

Log:
Fatal Exception: java.lang.NoSuchFieldError: No instance field mUnityPlayer of type Lcom/unity3d/player/UnityPlayer; in class Lcom/google/firebase/MessagingUnityPlayerActivity; or its superclasses (declaration of 'com.google.firebase.MessagingUnityPlayerActivity' appears in /data/app/~~g6VuJKtoISkXfbapr-BX3g==/com.nanorealitygames.mynanoworldreborn-nyp7vD0cKtiD6u26nQn-mw==/base.apk) at com.google.firebase.MessagingUnityPlayerActivity.onCreate(MessagingUnityPlayerActivity.java:87) at android.app.Activity.performCreate(Activity.java:8578) at android.app.Activity.performCreate(Activity.java:8557) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4147) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4312) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2571) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8741) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

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