You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build issue when generating Crashlytics symbole files #6139
Android Studio version: Android Studio Ladybug | 2024.1.3 Canary 3
Firebase Component: Crashlytics
Component version: 19.0.3
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
When running the command to bundle our application, we get the following error:
> Task :app:generateCrashlyticsSymbolFileAppNameRelease FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:generateCrashlyticsSymbolFileAppNameRelease'.
java.io.IOException: Breakpad symbol generation failed (exit=1), see STDERR
We launch the following command to bundle our application:
./gradlew app:bundleAppNameRelease
This issue happens when trying to bump the firebase BOM from 32.8.1 to 33.1.2.
While doing this change we also bump the following dependencies:
Firebase gradle from 3.2.0 to 5.0.0
Firebase Crashlytics gradle from 2.9.9 to 3.0.2
Google Services From 4.3.15 to 4.4.2
Relevant Code:
In our app build.gradle this is our CrashlyticsExtension configuration
I'm not sure if it's just a typo error, but, just to note, if you're using Groovy DSL, you should use the firebaseCrashlytics extension. You can check this documentation for reference.
To add, the Crashlytics Gradle v3 plugin (3+) is a major version and modernizes the SDK by dropping support for lower versions of Gradle and the Android Gradle plugin. For more details, you can check this documentation.
The main difference I see between our code is that on our side, we have minifyEnabled set to true in our build.gradle.
For the firebaseCrashlytics, it's not a typo we use configure<CrashlyticsExtension> as it is the recommended way in gradle.kts (as also mentioned in your documentation link).
If any chance, can you share an MCVE to help us investigate the issue? If you're unable to provide one, can you try our quickstart app and see if you can reproduce the issue? Thanks!
Hey @Thortoco. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
I have the same issue, but only in my CI environment, in my dev machine it works.
Downgrading Firebase Crashlytics gradle from 3.0.x to 2.9.9 solves the issue.
Can't share the project, but I'm using:
Gradle 8.7
AGP 8.5.2
google-services plugin 4.4.2
firebase-crashlytics-gradle plugin 3.0.0, 3.0.1, 3.0.2 - none work, 2.9.9 works
This is an old project, so the gradle files are in Groovy and use the old plugin application with buildscript.
Not using bundles. Native symbol upload is enabled.
My CI env:
Ubuntu 18.04.6 LTS
openjdk 17.0.7 2023-04-18 (installed from the standard Ubuntu repos with apt install openjdk-17-jdk)
My dev machine:
Ubuntu 22.04.4 LTS
openjdk 17.0.11 2024-04-16 (also installed with apt install openjdk-17-jdk)
In app/build/crashlytics/appName/dump_syms/ I see that a dump-syms.bin file was generated, but in app/build/crashlytics/appName/nativeSymbols I see only an empty file (libcrashlytics-common.soSOMENUMBERS.tmp).
So the same configuration as you for your dev machine but still we have the issue.
Could it be something missing on the CI env that would lead to this build issue?
Hey @Thortoco. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Hello again. I have an update.
The build failure disappeared when I migrated the Groovy scripts to Kotlin.
And I also have repro steps:
With Android Studio Koala Feature Drop 2024.1.2 (current stable), generate a new project using the new project wizard. Select "No Activity". In the next page of the wizard, in "Build configuration language" choose "Groovy DSL (build.gradle)".
Add this at the bottom of gradle/libs.versions.toml:
google-services = { id = "com.google.gms.google-services", version = "4.4.2" }
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version = "3.0.0" }
Add the plugins to the root project's build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.google.services) apply false // add this
alias(libs.plugins.firebase.crashlytics) apply false // add this
}
In app/build.gradle, add and apply the plugins, enable nativeSymbolUploadEnabled and add an externalNativeBuild, like this:
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.google.services) // add this
alias(libs.plugins.firebase.crashlytics) // add this
}
android {
// ...
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
firebaseCrashlytics { // add this
nativeSymbolUploadEnabled = true // add this
} // add this
}
}
externalNativeBuild { // add this
cmake { // add this
path "src/main/cpp/CMakeLists.txt" // add this
} // add this
} // add this
// ...
}
Put the google-services.json in app/src/google-services.json
Run ./gradlew clean assembleRelease uploadCrashlyticsSymbolFileRelease
(the task that triggers the failure is uploadCrashlyticsSymbolFileRelease)
So, basically it's reproduced with the most minimal example that has the build scripts in Groovy and has native code. But it's only triggered in an old system.
Activity
lehcar09 commentedon Jul 31, 2024
Hi @Thortoco, thank you for reaching out. I tried reproducing the issue, however, I did not encounter the error.
This is my build.gradle file:
Did I miss anything?
I'm not sure if it's just a typo error, but, just to note, if you're using Groovy DSL, you should use the
firebaseCrashlyticsextension. You can check this documentation for reference.To add, the Crashlytics Gradle v3 plugin (3+) is a major version and modernizes the SDK by dropping support for lower versions of Gradle and the Android Gradle plugin. For more details, you can check this documentation.
Thortoco commentedon Aug 2, 2024
Hello @lehcar09 thanks for your answer,
The main difference I see between our code is that on our side, we have minifyEnabled set to true in our build.gradle.
For the
firebaseCrashlytics, it's not a typo we useconfigure<CrashlyticsExtension>as it is the recommended way in gradle.kts (as also mentioned in your documentation link).I will try in an isolated project your setup.
lehcar09 commentedon Aug 6, 2024
Thank you for the clarification @Thortoco. I set the isMinifyEnabled to true, but, I still wasn't able to encounter the issue.
Can you share with me the Android Gradle plugin you're using?
Thortoco commentedon Aug 9, 2024
Hello @lehcar09 I am using the
8.3.2version of the gradle plugincom.android.tools.build:gradleI just tried with
8.5.0and I have the same error.lehcar09 commentedon Aug 12, 2024
If any chance, can you share an MCVE to help us investigate the issue? If you're unable to provide one, can you try our quickstart app and see if you can reproduce the issue? Thanks!
google-oss-bot commentedon Aug 19, 2024
Hey @Thortoco. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
cymerio commentedon Aug 21, 2024
I have the same issue, but only in my CI environment, in my dev machine it works.
Downgrading Firebase Crashlytics gradle from
3.0.xto2.9.9solves the issue.Can't share the project, but I'm using:
8.78.5.24.4.23.0.0,3.0.1,3.0.2- none work,2.9.9worksThis is an old project, so the gradle files are in Groovy and use the old plugin application with
buildscript.Not using bundles. Native symbol upload is enabled.
My CI env:
apt install openjdk-17-jdk)My dev machine:
apt install openjdk-17-jdk)In
app/build/crashlytics/appName/dump_syms/I see that adump-syms.binfile was generated, but inapp/build/crashlytics/appName/nativeSymbolsI see only an empty file (libcrashlytics-common.soSOMENUMBERS.tmp).Thortoco commentedon Aug 22, 2024
Hello If I can jump on what you said @cymerio the issue also only happens on our CI that is configured as such:
So the same configuration as you for your dev machine but still we have the issue.
Could it be something missing on the CI env that would lead to this build issue?
google-oss-bot commentedon Aug 29, 2024
Hey @Thortoco. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
google-oss-bot commentedon Sep 5, 2024
Since there haven't been any recent updates here, I am going to close this issue.
@Thortoco if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Thortoco commentedon Sep 12, 2024
Hello, after updating our CI to the latest ubuntu LTS 24.04 we don't have the issue anymore.
cymerio commentedon Sep 17, 2024
Hello again. I have an update.
The build failure disappeared when I migrated the Groovy scripts to Kotlin.
And I also have repro steps:
gradle/libs.versions.toml:build.gradle:app/build.gradle, add and apply the plugins, enablenativeSymbolUploadEnabledand add anexternalNativeBuild, like this:app/src/main/cpp/CMakeLists.txt:app/src/main/cpp/mylib.c:google-services.jsoninapp/src/google-services.json./gradlew clean assembleRelease uploadCrashlyticsSymbolFileRelease(the task that triggers the failure is
uploadCrashlyticsSymbolFileRelease)So, basically it's reproduced with the most minimal example that has the build scripts in Groovy and has native code. But it's only triggered in an old system.