Open AntonPetrov83 opened 2 years ago
Hi @AntonPetrov83,
Thanks for reporting this issue. Version 9.0.0 of the SDK has been released recently. Could you verify if this version makes any difference? Otherwise, please provide a minimal, reproducible example of your implementation along with the complete steps to reproduce the issue so that we can identify what's causing this behavior.
Hi @paulinon,
I have upgraded Firebase Crashlytics to 9.0.0, I have upgraded Firebase CLI to 11.0.0, I have successfully uploaded symbols and triggered an ANR - still nothing :(
UPDATE:
So, it is 100% reproducible.
quickstart-unity/crashlytics/testapp
and open it with Unity 2020.3.32f1 (LTS);Modify UIHandler.cs
to add new "Trigger ANR" button like this:
public void TriggerAnr() {
DebugLog("Triggering an ANR. Wait for system popup and Close the App");
AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject activity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
activity.Call("runOnUiThread", new AndroidJavaRunnable(InfiniteLoopOnMainThread));
}
void InfiniteLoopOnMainThread() {
while (true) ;
}
void GUIDisplayControls() {
...
if (GUILayout.Button("Trigger ANR")) {
TriggerAnr();
}
...
}
Thanks for the additional information, @AntonPetrov83. I've replicated the issue using the steps you provided, and I'll relay this to the team. I also noticed that the ANR isn't reported when it's coming from a device with a lower Android version (in my case, Android 9).
I'll be marking this as a bug for now, but you may refer to this thread for updates.
Hey @AntonPetrov83, right now Crashlytics isn't able to symbolicate ANRs, but we are working on it. I don't have a TBD yet but will update here when we get it released.
@paulinon There was an announcement at the Games Developer Summit that symbolication of native Android ANRs is now supported. Wouldn't it solve this issue ? What version of Crashlytics has this support?
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
I can see my ANR in the Crashlytics but it is not symbolicated:![image](https://user-images.githubusercontent.com/1997978/169748198-c6073d2f-2b2b-4b44-8f19-6922aaf38f27.png)
As a text:![image](https://user-images.githubusercontent.com/1997978/169800627-185ded6c-5774-4bdb-bfed-c15ca91f72a7.png)
Steps to reproduce:
It is 100% reproducible.
Crashlytics symbol file uploaded successfully;
main
thread.The interesting part:
I used Unity's Stacktrace Utility (comes with Android Logcat package) to symbolicate this stack trace using the same symbols I uploaded earlier to Crashlytics and it works as expected:![image](https://user-images.githubusercontent.com/1997978/169799830-e446582a-9724-4aa1-88f6-3965c975baac.png)
Under the hood this utility uses addr2line so I guess this proves that this trace definitely can be symbolicated!