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-gradle-plugin]-optimize uploadCrashlyticsMappingFile Task execution time. #6505

Open
pidanxiangjiao opened this issue Nov 13, 2024 · 4 comments
Labels
api: crashlytics type: question Further information is requested

Comments

@pidanxiangjiao
Copy link

What feature would you like to see?

Current we use 'com.google.firebase:firebase-crashlytics-gradle:2.9.1' to auto upload mapping file,
the mapping file is almost 400Mb and the uploadCrashlyticsMappingFile task took almost 1 min to finish uploading

we want to make the uploadCrashlyticsMappingFile task faster, and decrease the total gradle build time

I also look at the upload request code in 'com.google.firebase:firebase-crashlytics-buildtools:2.9.1'
and i would like to ask is the below network request method run in main thread?

    public void uploadMappingFile(File mappingFile, String mappingFileId, AppBuildInfo appBuildInfo, Obfuscator obfuscator) throws IOException {
        logD(String.format("Uploading Mapping File [mappingFile: %1$s; mappingFileId: %2$s;packageName: %3$s; googleAppId: %4$s]", mappingFile.getAbsolutePath(), mappingFileId, appBuildInfo.getPackageName(), appBuildInfo.getGoogleAppId()));
        MappingFileService mappingService = new FirebaseMappingFileService(getWebApi());
        mappingService.uploadMappingFile(mappingFile, mappingFileId, appBuildInfo, obfuscator);
        logI(String.format("Mapping file uploaded: %1$s", mappingFile.toString()));
    }

or is there any way to set the uploadCrashlyticsMappingFile gradle task run in parallel, so it does not block other gradle tasks

@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@lehcar09 lehcar09 added type: feature request New feature or request api: crashlytics type: question Further information is requested and removed needs-triage type: feature request New feature or request labels Nov 13, 2024
@mrober
Copy link
Contributor

mrober commented Nov 13, 2024

You are on an old version of the plugin, but even version 3 would not do this in the background. You could disable the automatic mapping file upload, see https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?platform=android#keep-obfuscated-build-variants. And then call the upload task yourself. Another option might be to use the Firebase CLI tool instead, see https://firebase.google.com/docs/cli#crashlytics-commands. This would let you do many local builds quickly, then when you want to upload your large mapping file, you can do it.

@pidanxiangjiao
Copy link
Author

Thx, let me take a look.

@pidanxiangjiao
Copy link
Author

You are on an old version of the plugin, but even version 3 would not do this in the background. You could disable the automatic mapping file upload, see https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?platform=android#keep-obfuscated-build-variants. And then call the upload task yourself. Another option might be to use the Firebase CLI tool instead, see https://firebase.google.com/docs/cli#crashlytics-commands. This would let you do many local builds quickly, then when you want to upload your large mapping file, you can do it.

Hello, may i ask , how the firebase platform to deal with the match for a aab to a mapping file
through the log, i can find that , the task generate a mapping id, and upload this file to my project in firebase by appId
so if i upload the file by myself, i can generate a random mapping file id then upload it , i'm not sure how to make this file to match the app version to publish(aab file).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: crashlytics type: question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants