-
Notifications
You must be signed in to change notification settings - Fork 441
[Bug] Native crash in libFirebaseCppApp #1170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I don't why google developers release this bugs? |
Hi @Jack37, After building an app based on the information you provided, I haven't been able to replicate the issue so far as my app didn't crash. Could you provide a minimal, reproducible example so that we can analyze what's causing this? Could you also confirm if there are additional steps necessary to be able to generate logs similar to what you provided? |
I also have this issue on Android after upgrading to 8.5.0. Here is a more symbolicated stack trace than what OP provided:
|
Aha! I found a clue. It turns out the issue comes with calling |
Okay, I can confirm that I can repro in a blank Unity project. Here are the steps for minimal repro @paulinon:
using Firebase;
using Firebase.Extensions;
using GoogleMobileAds.Api;
using GoogleMobileAds.Common;
using UnityEngine;
public class ReproductionTest : MonoBehaviour
{
private void Start()
{
MobileAds.Initialize(_ => MobileAdsEventExecutor.ExecuteInUpdate(() => Debug.Log("admob done")));
FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread(_ => Debug.Log("firebase done"));
}
} I haven't attempted a workaround (I should sleep) but I wonder if forcing these libraries to initialize in serial (one to wait for the other before loading) would work. |
Great find! So far I can confirm that I am using AdMob, which I removed from latest release, to see if crashes will go away. However I am using AdMob mediation adapter for IronSource instead of plain AdMob SDK. |
Ahhh, my minimal repro attempt is flawed — I was getting a crash for a different reason, which is that if your AdMob App ID is invalid, your app will hard crash (terrible behavior in its own right). So, while this doesn't explain why removing |
@paulinon as you requested, I have created a repo of a minimal reproducible example demonstrating this issue: https://github.com/aroman/TestFirebaseCrash Removing AdMob does seem to make a difference; there seems to be an interaction between multiple Google libraries going on here. My minimal reproducible repo contains only Google plugins — AdMob for Unity and Firebase for Unity. |
Removing AdMob adapter did not help for me. But I still have other Google libraries that may cause this. |
*Unity editor version: 2021.2.1f1previous 2021.1.13f1 *Source you installed the SDK: .unitypackage *GoogleMobileAds 6.0.2, GooglePlayGames 0.10.12 *Platform you are using the Unity editor on: Win
|
Hi folks, If you see Please upgrade to the latest Firebase and see if that resolves your issue. @Jack37
Thank you |
I have updated all firebase pacakges in my project 8.6.1 and I can confirm that I'm still seeing this crash. It doesn't happen 100% of the time, but >50% of the time on my test device (Samsung A10). The errors I'm seeing are coming from the device itself via ADB, and unfortunately the stack trace stops about where @kolobokspb's does. |
*Unity editor version: 2021.2.1f1 *Source you installed the SDK: .unitypackage *GoogleMobileAds 6.0.2, GooglePlayGames 0.10.12 *Platform you are using the Unity editor on: Win
|
I'm getting same error with @aroman |
firebase/firebase-cpp-sdk#745 there was one more edge case for this during shutdown |
Make sure the Firebase and Unity Ads initialization order is guaranteed. Conflicts were resolved by ensuring Firebase initialization and Unity Ads initialization order. ### 2021-11-12 15:42:21.139 3899-3993/? D/UnityAds: com.unity3d.services.UnityServices.initialize() (line:1) :: ENTERED METHOD
|
@chkuang-g This is probably my case too, as there seem to be two callstacks. This one is same as mine, on a 8.6.1 version #1169 (comment). This happens on Android. |
We haven't been able to completely reproduce the problem on our end, but we just released 8.6.2, which contains a potential fix for the issue. |
In my case, I was using Firebase 8.1 and I updated to 8.6.1 for adding message service. Then this problem occured and I'm using Admob, Facebook, Adjust, UnityAds, Applovin etc SDKs. I didn't notice the error, Google Play Console did it on the release. I will try 8.6.2 now. |
@naklow12 Are you able to reproduce this problem easily? Did you see any improvements with 8.6.2 ? |
Yes it's solved. |
I am sure it is the same as this bug which i have metioned 1-2month ago (i used firebase sdk v-8.3.0). |
@iningwei the bug fix was for shutting down messaging. Yours looks like during startup? I had a quick look at the code and I think there might be an issue there as well. I had put in a pull request to see what the devs thinks. firebase/firebase-cpp-sdk#760 |
@paulinon , @TBarendt , @snorrsi After upgrading to version 8.6.2, my app stopped crashing. ) Only after updating GooglePlayGames to version v0.10.13 did it work. That's not all, after installing the plugin GooglePlayGames and ExternalDependencyManage v0.10.13 Unity began to crash due to ExternalDependencyManage when installing the plugin and every time Unity was loaded. So I took the ExternalDependencyManager that comes with Firebase. |
Hey @Jack37. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Since there haven't been any recent updates here, I am going to close this issue. @Jack37 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this. |
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
Our Unity console is full of these crashes. However it doesn't happen on my end, so I wasn't able to reproduce this issue yet.
Here is my Firebase code:
The text was updated successfully, but these errors were encountered: