-
Notifications
You must be signed in to change notification settings - Fork 441
Firebase Auth crash in Initialization step when running the app for the second time #416
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
Same issue here. This is holding up our next app version, would love to hear if there are any updates. Unity editor version: 2019.1.4f1 LOGCAT Device 1 (Samsung J7):
LOGCAT Device 2 (Nexus 5X)
|
Hi all, we're looking into this and I'll let you know when we have a fix. |
@amoswazana I have verified the issue is fixed with Unity 2019.1.11f1 and 2018.3.14f1. Could you try to upgrade to latest Unity version and see if the crash is resolved? @mantoun1984 Thank you! |
@chkuang-g Sorry this didn't help. Still seeing the same issue with Unity 2019.1.12f1. On the Galaxy J7:
And on the Nexus 5X:
Edited to add: Where did you see my issue in those links? At the end of the forum thread they started talking about the SIGSEGV error but no fixes were provided. The guy from Unity said it was unrelated even... |
@chkuang-g The problem isn't solved. |
Same issue here on for example Galaxy S8, Unity 2019.1.10. We are using only Analytics and Remote Config. Two notes that might help:
|
@mantoun1984 We made some changes in the latest version of the SDK (6.2.2) that should hopefully fix the issues you're seeing. Could you try installing the latest SDK and let us know if that resolves your issue? |
@ryanmeier I'm using 6.2.2 and the problem is still there. What is strange, that I have downgraded to 6.0.0 which we are using on other our project without any problems and it doesn't work as well. But the other project is using Unity 2018.3, this one is using 2019.1. |
There is one workaround we have found which a) might help others workaround this b) might help you investigate where the problem is. The only downside is that your app won't have backup allowed. Also if you install the app without this workaround, delete all it's data and cache and run it, it will work, but that's not a solution, just one more hint to help with pinpoint the issue. Ok so how to workaround it:
That should make it work |
Any news on this issue? |
Hi, this issue is resolved in the latest release of the SDK, version 6.3.0. |
Sorry, this didn't fix the issue. Logcat is same as before:
|
I get a similar error with signal 11, code 1 on the latest SDK 6.3.0. I've added my log here: |
@alexames Can you please reopen this issue... It hasn't been solved yet. |
I'm sorry to hear that the issue is still happening. We'll look into it. |
@amoswazana I've just tested this with the auth sample application by enabling a second FirebaseApp object (i.e when populating
Could you share our auth sample modified to reproduce the failure you're seeing? |
@stewartmiles
OR: I found that I can reproduce the crash by:
Unity editor version: 2019.1.12f1
|
Can confirm this issue is there with Firebase 6.3.0. Log: `08-22 13:59:45.184 2104-2177/? E/AndroidRuntime: FATAL EXCEPTION: UnityMain
08-22 13:59:45.189 1249-13652/? W/ActivityManager: finishTopCrashedActivityLocked Force finishing activity com.tinmen.ludoboss/com.google.firebase.MessagingUnityPlayerActivity |
@mantoun1984 and @USPTech this is a different bug than what was originally reported. We'll take a look. |
@USPTech the bug you've reported is not associated with this issue. The stack trace points at FirebaseMessaging. |
@stewartmiles That may be true but this temporarily fixes the problem. |
With Using unity 2019.1.11 Actually, when thinking about it, I do not even know what |
Try this if the scripting backend "IL2CPP" Firebase.FirebaseApp.DefaultInstance.Dispose(); Application.Quit(); |
We think this is fixed in 6.5.0 https://firebase.google.com/support/release-notes/unity#version_650_-_september_10_2019 |
Hi folks, Just give you an update on this issue. 6.5.0 may not fully resolve the issue due to an Unity bug, which is fixed in Unity 2019.2. We noticed that Auth unity testapp may still crash with the following configuration.
What happen is: if the app is killed, usually through Overview screen (Recent button), every thing is fine. However, if the app exits by UnityEngine.Application.Quit(), C++ library may not be unloaded. What made it worse is that all the C# object will not be finalize properly either. As a result, when the app is launched for the second time, the Unity SDK would access C++ library in a stale state, and may crash if some function access invalid memory address, which is freed from the previous session. We are still trying to find the root cause and potential patch to work-around with this issue. At the meantime, if you are experiencing the same issue, here are some work-around you can do.
Let us know if this issue still plague you and will keep you update when the patch is ready. Shawn |
Same issue here. The crash intermittently occurs at app startup:
I'm using Firebase Unity SDK 6.6.0, only with with Firebase Analytics (firebase-analytics:17.2.0). Unable to submit my game to GooglePlay because of this crash. |
For clarity, do any of the steps suggested by @chkuang-g resolve the issue? If not, can you elaborate on which ones you tried so we can get a better handle on your issue? Thanks, |
I can confirm that the suggestion from @nextvern and @chkuang-g to Dispose() the FirebaseApp before OnApplicationQuit() does resolve the issue! |
Awesome, thanks! We are aware of this issue and tracking it, and will update this thread when it's fixed. If the steps above do not help, definitely let us know (similar for @eduardocoelho). |
Hi,
Please note that the app crashes in the first launch. EDIT: I performed a 'Build and Run' directly from Unity on my Mac, and I got the following messages on logcat (hopefully they are more helpful):
There are no related messages after the Thanks in advance. |
Hi @eduardocoelho, Given this information, would you mind filing a new issue? Since it isn't exactly the second run (ie: it doesn't sound like a long running native process is the cause of your issue), it's likely that the a fix to the OP won't fix the issue you're having and I'd hate for it to be lost. Make sure that you do fill out the bug template, and eel free to reference this issue if you think it will help. Make sure you copy over the stack trace and repo steps when filing the new one. Thanks, |
Hi @patm1987, despite the
line, I think the issue is related to a bug in the Unity editor. I downloaded Unity I'll fill a new issue in case the problem persists. Thanks |
Additional info: We're still seeing this hang after adding the dispose() call in Application.Quit() while using Unity 2018.4.12 with Firebase 6.7.0 (messaging + analytics), although we estimate the hang rate to be around 5%. Repro steps are to manually kill the app on Android in the task manager, and relaunch the app. We've managed to catch the crash in Visual Studio by manually breaking, and via logging, and for us it occurs during Firebase startup, when we ask for FirebaseApp.defaultInstance. Here's the callstack we get in VS when the hang has occured: Boolean Firebase.Dispatcher:Run (Func
|
Quick note: That is, another option would be upgrade your Unity to any version after this. @tzmm Your issue seems not related to what this thread was about, which is the crash in second launch if Application.Quit() is called before. If the problem still affects you, could you open a separate thread for more detail? Thank you. |
I wasted my whole night 18 hours straight to get to the root of this and I find this suggestion.. now I am going to test the build by disposing the instance.. I am make it clear if the issue persists or not .. so no one else has to go through what I have... Final reports coming ASAP |
This seems to be fixed by Unity. @5D-ivyanshu if you are still experience the same issue, please open a new bug and provide the details about your configuration. I will close this issue for now. |
Please fill in the following fields:
Unity editor version: 2019.1.8
Firebase Unity SDK version: 6.1.1 (I tried also 6.2.1)
Firebase plugins in use (Auth, Database, etc.): Auth
Additional SDKs you are using (Facebook, AdMob, etc.): nothing
Platform you are using the Unity editor on (Mac, Windows, or Linux): Windows
Platform you are targeting (iOS, Android, and/or desktop): Android
Please describe the issue here:
Please answer the following, if applicable:
The problem appear in my app.
Then I tried to build a small app which only contain the firebase functionality from my original app and got the same crash.
Lastly I tried with the test app from "Firebase-Test" apps and got the same.
The text was updated successfully, but these errors were encountered: