microsoft / appcenter-sdk-android

Development repository for the App Center SDK for Android
Other
276 stars 134 forks source link

crashes.model.ErrorReport does not return correct app build and app version #1667

Closed jiayle27 closed 1 year ago

jiayle27 commented 1 year ago

Description

Hi! Found in our production environment, App Center Crash reported a crash from an app version that we did not release. Upon further inspection of the associated log, we noticed that com.microsoft.appcenter.crashes.model.ErrorReport gives an incorrect errorReport.device.appBuild and incorrect errorReport.device.appVersion; while PackageManager gives the correct one. In this instance, our version is 6.2211.7348, but errorReport.device returns 33.

This issue is a rare occurrence as we only spotted this happen once in the last 3 months and other users on the same build does not seem to have this issue, does the team have any insights on why it could be happening? Thanks.

Repro Steps

Please list the steps used to reproduce your issue.

No repro.

Details

  1. Which SDK version are you using?
    • e.g. 4.4.2
  2. Which OS version did you experience the issue on?
    • e.g. Android 13
  3. What device version did you see this error on? Were you using an emulator or a physical device?
    • e.g. Galaxy S21 Ultra 5G
  4. What third party libraries are you using?
    • Powerlift
  5. Please enable verbose logging for your app using AppCenter.setLogLevel(Log.VERBOSE) before your call to AppCenter.start(...) and include the logs here:
shadyabarada commented 1 year ago

Hi @jiayle27 , thank you for the provided info. May I please ask you to provide me with the Version Code you have set in your build.gradle file of the version of your app when you got 33 instead of 6.2211.7348.

Thanks!

jiayle27 commented 1 year ago

@shadyabarada Sure --- 202273483

shadyabarada commented 1 year ago

@jiayle27 so you were getting 33 for both app version code and version name?

jiayle27 commented 1 year ago

@shadyabarada App Build: 33 (instead of 202273483) App Version: 13 (instead of 6.2211.7348)

shadyabarada commented 1 year ago

@jiayle27 is it possible to share logs or is it not reproducible anymore?

jiayle27 commented 1 year ago

@shadyabarada We have yet to see a repro. We observed this issue only once in the last 28 days from one prod user on 11/30/22; and iirc we haven't seen this happen before. I don't think I can share the log with you since it's a prod user, is there something specific you are looking for?

shadyabarada commented 1 year ago

@jiayle27 I wanted to check how were you able to observe the result of the package manager's version values versus the Error Report one, as per you comment you were able to see that the package manager was returning the correct values right?

jiayle27 commented 1 year ago

@shadyabarada For every App Center observed crash, we best effort attach a PowerLift log to it. The PowerLift log contains information both from Error Report and package manager.

shadyabarada commented 1 year ago

@jiayle27 What's interesting to note here is that the issue is on Android 13, and you're getting 13 for app version, and 33 for app build which is also the api level for Android 13... Will dig into this.

shadyabarada commented 1 year ago

@jiayle27 After further investigation on this matter, this seems to be a very specific issue tied to a specific android device on a specific version. Given that this issue has happened only once with one user, one device, we will close the issue for now. Please do not hesitate to contact us if this issue re occurs.