appcenter-sdk-android icon indicating copy to clipboard operation
appcenter-sdk-android copied to clipboard

AppCenter produces up to 8.16 GB of JSON files

Open drakeet opened this issue 1 year ago • 3 comments

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}"
  1. Which OS version did you experience the issue on?
    • Android 12 and Android 13
  2. What device version did you see this error on? Were you using an emulator or a physical device?
    • Google Pixel 5
  3. What third party libraries are you using?
    • N/A
  4. 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.

drakeet avatar Aug 17 '22 13:08 drakeet

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.

MatkovIvan avatar Aug 17 '22 15:08 MatkovIvan

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

snijsure avatar Aug 18 '22 12:08 snijsure

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.

MatkovIvan avatar Aug 18 '22 12:08 MatkovIvan