getsentry / sentry-android-gradle-plugin

Gradle plugin for Sentry Android. Upload proguard, debug files, and more.

Home Page:https://docs.sentry.io/platforms/android/gradle/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Proguard mapping upload: error: string too large to encode using UTF-8 written instead as 'STRING_TOO_LARGE'.

Hussienfahmy opened this issue · comments

Gradle Version

7.4.0

AGP Version

7.3.0

Code Minifier/Optimizer

Proguard

Version

4.3.0

Sentry SDK Version

7.3.0

Steps to Reproduce

  • plugin configuration. // self hosted version
sentry {
    authToken = project.getProperty('SENTRY_REAL_AUTH')
    url = project.getProperty('SENTRY_REAL_URL')

    org = "sentry"

    projectName = "project"

    includeProguardMapping = true

    autoUploadProguardMapping = true

    uploadNativeSymbols = true

    autoUploadNativeSymbols = true

    includeNativeSources = true

    includeSourceContext = true

    tracingInstrumentation {
        logcat {
            enabled = true

            minLevel = LogcatLevel.WARNING
        }
    }
}
  • run ./graldew aR

Expected Result

Mapping file uploaded to the server

Actual Result

Getting this error and the mapping file not upload

Task :app:uploadSentryProguardMappingsRelease
compressing mappings
uploading mappings
Uploaded a total of 1 new mapping files
Newly uploaded debug symbols:
e18afab8-a6bd-45c3-92e8-ea63256352af
error: string too large to encode using UTF-8 written instead as 'STRING_TOO_LARGE'.

hey, I'm not sure this error is coming from our plugin (we don't add any resources to the apk), could you perhaps try to troubleshoot it as mentioned here? https://stackoverflow.com/a/52816708

the apk has no problem, it built and running without any issues, the problem is that the progaurd mapping file is not uploaded in this step.

yeah but the log says:

Uploaded a total of 1 new mapping files
Newly uploaded debug symbols:
e18afab8-a6bd-45c3-92e8-ea63256352af

which means it has been uploaded. And this error is not coming from our plugin or cli, it's coming from the android build tools. If it's not feasible to investigate on your end, I'd ask to provide a reproducible project which we can look into ourselves, thank you

Thanks for your help