Search Unity

Wrong app version in crash reports

Discussion in 'Unity Cloud Diagnostics' started by stopiccot_tds, Jul 10, 2019.

  1. stopiccot_tds

    stopiccot_tds

    Joined:
    Oct 1, 2016
    Posts:
    111
    We had a 1.8.2 version of our game that was crashing at the startup for some users.
    We completely removed bugged code in 1.8.3 and pushed an update to the App Store.
    In Cloud Diagnostics we still see crashes for 1.8.3 with stacktraces of code that was removed.
    Our guess is that crashes were recorded on 1.8.2 version, but upload happened on 1.8.3 and those crashes are incorrectly marked to be affecting 1.8.3 version.
     
  2. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @stopiccot_onthespot. Your guess is totally right. When a native crash happens, our Crash Reporter stores the stack trace on disk to be sent the next time the app starts, since there's often very little that an app can do once it starts crashing. Most mobile OS's will terminate a process if it takes too long, which is possible when trying to send out a report through a web request. This is why we can't send out native crashes until an app relaunches. But if the app was updated after the last crash occurred but before it was relaunched then this can lead to the rare scenario that you ran into here where the newer version of the app is reporting a crash that happened on an older version.

    Unfortunately there isn't an easy fix for this scenario at the moment, but we'll look into ways to properly handle this case in the future.
     
  3. stopiccot_tds

    stopiccot_tds

    Joined:
    Oct 1, 2016
    Posts:
    111
    Hi @ryanc-unity. Thanks for the response. Not sure how it is exactly implemented but I think an easy fix for this would be to store app version at the moment of crashing to the same file you store crash stack trace. This way stacktrace that happened before updating to 1.8.3 would be correctly marked as 1.8.2 even if it was sent to unity servers after the app was updated.