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

java.lang.IllegalStateException: The Crashlytics build ID is missing. #41

Open
vincentdelmundo opened this issue Sep 15, 2020 · 5 comments

Comments

@vincentdelmundo
Copy link

Expected Behavior

No error.

Actual Behavior

Runtime Error (on app launch):

java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.IllegalStateException: The Crashlytics build ID is missing. This occurs when Crashlytics tooling is absent from your app's build configuration. Please review Crashlytics onboarding instructions and ensure you have a valid Crashlytics account.

Steps to Reproduce the Problem

This occurred on app launch.

Specifications

  • Plugin version:

    • "cordova-support-google-services": "1.4.1"
    • "cordova-plugin-firebase-crashlytics": "1.2.0"
  • Framework:

    • Cordova Android: 8.0.0
  • System:

    • OS: macOS 10.14.6 (18G3020)
    • npm: v6.13.6
    • Android SDK Tools: 30.0.0-rc4
@jaimealvarezl
Copy link

Were you able to fix this error?

@vincentdelmundo
Copy link
Author

@jaimealvarezl

Were you able to fix this error?

Not yet.
Right now, we are using "cordova-plugin-firebase-crashlytics": "1.0.0".

@jaimealvarezl
Copy link

I found out I had to do so manual changes in order to make it work. Following Firebase Crashlytics getting started guide .

I added classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0' project-level build.gradle
and apply plugin: 'com.google.firebase.crashlytics' app-level build.gradle

I everything started to work.

@tehmaestro
Copy link

tehmaestro commented Oct 27, 2020

Hi, I almost cried when I finally found the solution. Thanks to this issue: chemerisuk/cordova-support-google-services#9

It seems that, postBuildExtras gets overriden, by any plugin. Well I was already using it somewhere else, so basically, the firebase crashlytics plugin was not being applied, at all. I suggest using cdvPluginPostBuildExtras which is an array, and any plugin can register its own function to run.

So, the gradle becomes:

cdvPluginPostBuildExtras.add({
    apply plugin: com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsPlugin
})

I know! I just saved your day! 😍 . Well mine got saved by the good guys that took the time to post this issue on the other cordova plugin. Thanks guys.

@terreng
Copy link

terreng commented Nov 3, 2020

cdvPluginPostBuildExtras.add({
    apply plugin: com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsPlugin
})

@tehmaestro This solved the issue, and saved my day. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants