I want to know, when a crash happens, does unity upload the report instantly to cloud diagnostics or it is uploaded when the app is launched again? I mean how does unity upload the report if the app crashed? Because the app will not be running after the crash. I am kind of confused. I am sorry if it is a stupid question.
Hi @Sailendu , that’s not a stupid question at all. When a native crash is detected, the stack trace is saved away in a separate report by Cloud Diagnostics on the device. The report must then wait until the app is relaunched before it can be sent to the service since most OS architectures have limitations on what can be sent out by an application that is in the process of crashing, in case what’s being sent might further corrupt the device or any services.
Hi @Ryan-Unity , thanks a lot for replying. Now I can understand. I have one more question, if the reports are sent on relaunch, then let’s say my app crashed on version 1.1, then the user downloads an update before relaunching which is 1.2, then when relaunch happens on 1.2 the crash is reported. So if I apply a filter in the cloud diagnostics dashboard to see the crashes for version 1.2 it might include some crashes which actually happened in 1.1 because the crash happened before the update 1.2, can this happen or the version number included in the crash report is actually set to 1.1 even though it is reported from 1.2? Please let me know.
No problem, happy to help. Unfortunately, the old crash report from 1.1 would come in as saying that it was from 1.2 since it is sent from the new app, which includes its own metadata in the report.
Hi @Ryan-Unity
I want to save the crash report on my own server instead of Unity cloud. So please let me know or suggest me a way to do that? Currently I am using the below code to save logs in a file in case of Exceptions, Errors etc, at run time in the game. So my question is, is onLogMessageReceived() method also gets called when crash happens? Please let me know or any other way save crash report. Thanks in advance.