Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase Crashlytics mapping file isn't uploaded while publishing artifacts #1062

Open
sergei-lapin opened this issue Sep 4, 2022 · 8 comments
Labels
bug Indicates an unexpected problem or unintended behavior feature:apk Involves APKs feature:bundle Involves app bundles

Comments

@sergei-lapin
Copy link

Describe the bug

uploadCrashlyticsMappingFile$variantName is not there at the time of configuring of publish* tasks and is not wired as dependency for these tasks resulting in lack of mapping file in crashlytics for the published release

How To Reproduce

Apply com.google.firebase.crashlytics plugin to any Gradle module with com.android.application and com.github.triplet.play, run publishBundle

Versions

  • Gradle Play Publisher: 3.7.0
  • Gradle Wrapper: 7.5.0
  • Android Gradle Plugin: 7.2.1
  • Firebase Crashlytics Gradle Plugin: 2.9.1

Tasks executed

publishAnyVariantBundle

Expected behavior

uploadCrashlyticsMappingFile$variantName is executed whenever publish task for specified variantName is executed

@sergei-lapin sergei-lapin added the bug Indicates an unexpected problem or unintended behavior label Sep 4, 2022
@SUPERCILEX SUPERCILEX added feature:bundle Involves app bundles feature:apk Involves APKs labels Sep 4, 2022
@waliahimanshu
Copy link
Contributor

waliahimanshu commented Sep 16, 2022

We are facing the same issue, it started happening without any changes from our end a couple of releases ago, as a result crashes/non-fatals are not readable anymore!

https://gist.github.com/waliahimanshu/82531ec881df1363e2ea5cd77ed6aeee

We also run bundleRelease before publish, which also executes uploadCrashlyticsMappingFile but for some reason not working as expected, and our crashes/non-fatal still end up as obfuscated.

@sergei-lapin did this issue make your crashes appear as obfuscated in FirebaseCrashlyics ? I tried to upload the mapping manually, which showed success but crashlytics still shows everything as obfuscated.

@SUPERCILEX
Copy link
Collaborator

The task name probably changed? This is what it's set to right now:

maybeAddDependency("uploadCrashlyticsMappingFile$variantName")

@waliahimanshu
Copy link
Contributor

waliahimanshu commented Sep 16, 2022

when I run bundle$variantName I can see that uploadCrashlyticsMappingFile$variantName executes so, possibly, the name is not changed.

> Task :app:uploadCrashlyticsMappingFileRelease
Caching disabled for task ':app:uploadCrashlyticsMappingFileRelease' because:
  Caching has not been enabled for the task
Task ':app:uploadCrashlyticsMappingFileRelease' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
Mapping file uploaded: /Users/himanshuwalia/StudioProjects/global-android/app/build/outputs/mapping/Release/mapping.txt
:app:uploadCrashlyticsMappingFileRelease (Thread[Execution worker for ':' Thread 9,5,main]) completed. Took 6.507 secs.

@SUPERCILEX
Copy link
Collaborator

No clue then unfortunately. Nothing has changed on our end.

@sergei-lapin
Copy link
Author

Firebase Plugin might've changed moment when they register their uploadCrashlyticsMappingFile$variantName to smth like afterEvaluate instead of onVariants

@sergei-lapin
Copy link
Author

@sergei-lapin did this issue make your crashes appear as obfuscated in FirebaseCrashlyics ? I tried to upload the mapping manually, which showed success but crashlytics still shows everything as obfuscated.

@waliahimanshu yes, it did. It should be obfuscated if you run bundle and publish tasks in different Gradle invocations, though, due to lack of injected identifier that comes with uploadCrashlyticsMappingFile.

@waliahimanshu
Copy link
Contributor

waliahimanshu commented Sep 20, 2022

@sergei-lapin did this issue make your crashes appear as obfuscated in FirebaseCrashlyics ? I tried to upload the mapping manually, which showed success but crashlytics still shows everything as obfuscated.

@waliahimanshu yes, it did. It should be obfuscated if you run bundle and publish tasks in different Gradle invocations, though, due to the lack of injected identifier that comes with uploadCrashlyticsMappingFile.

So running bundle and publish in the same grade invocation, will upload the mapping file and make the crashes readable (de-obfuscated)? We previously hit the same issue and ended up following this workaround though as a separate gradle invocations withing the same workflow, which used to work, but no anymore!

@waliahimanshu
Copy link
Contributor

Update running bundleRelease and publishRelease in the single Gradle invocation fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior feature:apk Involves APKs feature:bundle Involves app bundles
Projects
None yet
Development

No branches or pull requests

3 participants