microsoft / appcenter-sdk-android

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

AppCenter produces up to 8.16 GB of JSON files #1646

Closed drakeet closed 1 year ago

drakeet commented 2 years ago

Description

As the title says, my app uses the AppCenter Android SDK. My users have reported to me that AppCenter generates a lot of files. The problem is obvious, as shown in the following figure:

image

Details

  1. Which SDK version are you using?

    • 4.4.3
      def appCenterSdkVersion = '4.4.3'
      implementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}"
      implementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}"
  2. Which OS version did you experience the issue on?

    • Android 12 and Android 13
  3. What device version did you see this error on? Were you using an emulator or a physical device?

    • Google Pixel 5
  4. What third party libraries are you using?

    • N/A
  5. Please enable verbose logging for your app using AppCenter.setLogLevel(Log.VERBOSE) before your call to AppCenter.start(...) and include the logs here:

    • This is a user-side problem, and this operation cannot be performed.
MatkovIvan commented 2 years ago

Hi @drakeet, Thanks for getting in touch and highlighting this case.

By design, this should be covered by storage size limit, but currently it's applied only to DB. For context - these files were workaround of db value size limit in Cursor implementation (storing values bigger than ~2 MB in files), but it was missed in storage size calculation.

Marking it as bug, we'll fix it in one of the next releases.

snijsure commented 2 years ago

@MatkovIvan Under what circumstances are these large data files generated?

MatkovIvan commented 2 years ago

As mentioned above, the value (JSON data of a log/report that SDK has to send to backend later) bigger than ~2MB stored outside of DB because of Cursor implementation limitations. SDK stores it only until successful transmission via network. As for the source of such large value - one of the known cases is a huge stack trace in an error report.

MikhailSuendukov commented 1 year ago

The new version was released on November 10th 2022, so I'm closing this issue.