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

UnmetDependencyException: This app relies on Crashlytics #848

Closed
herrskytte opened this issue Sep 14, 2018 · 14 comments
Closed

UnmetDependencyException: This app relies on Crashlytics #848

herrskytte opened this issue Sep 14, 2018 · 14 comments

Comments

@herrskytte
Copy link

herrskytte commented Sep 14, 2018

Describe the bug
Sorry for the poor formatting. I get the exception below when running my app for Android. Everything is working well for iOS. Using version 2.0.1 of the plugin. I have checked that google-services.json is being copied into platforms/android. Any tips or any additional info somebody need to help me, please ask! Thank you.

09-14 15:15:29.054 8807-8807/no.politiet.sikrebilder E/CrashlyticsCore: .

    .     |  |

    .     |  |

    .     |  |

    .   \ |  | /

09-14 15:15:29.054 8807-8807/no.politiet.sikrebilder E/CrashlyticsCore: .    \    /

    .     \  /

    .      \/

    .

    This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,

    install an Android build tool and ask a team member to invite you to this app's organization.

    .

    .      /\

    .     /  \

    .    /    \

    .   / |  | \

    .     |  |

09-14 15:15:29.054 8807-8807/no.politiet.sikrebilder I/chatty: uid=10216(u0_a216) no.politiet.sikrebilder identical 1 line

09-14 15:15:29.054 8807-8807/no.politiet.sikrebilder E/CrashlyticsCore: .     |  |

    .

09-14 15:15:29.055 8807-8807/no.politiet.sikrebilder D/AndroidRuntime: Shutting down VM

09-14 15:15:29.057 8807-8807/no.politiet.sikrebilder E/AndroidRuntime: FATAL EXCEPTION: main

    Process: no.politiet.sikrebilder, PID: 8807

    java.lang.RuntimeException: Unable to get provider com.crashlytics.android.CrashlyticsInitProvider: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,

    install an Android build tool and ask a team member to invite you to this app's organization.

        at android.app.ActivityThread.installProvider(ActivityThread.java:6575)

        at android.app.ActivityThread.installContentProviders(ActivityThread.java:6127)

        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6037)

        at android.app.ActivityThread.-wrap1(Unknown Source:0)

        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1764)

        at android.os.Handler.dispatchMessage(Handler.java:105)

        at android.os.Looper.loop(Looper.java:164)

        at android.app.ActivityThread.main(ActivityThread.java:6938)

        at java.lang.reflect.Method.invoke(Native Method)

        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)

        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

     Caused by: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,

    install an Android build tool and ask a team member to invite you to this app's organization.

        at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:233)

        at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:207)

        at io.fabric.sdk.android.InitializationTask.onPreExecute(InitializationTask.java:44)

        at io.fabric.sdk.android.services.concurrency.AsyncTask.executeOnExecutor(AsyncTask.java:611)

        at io.fabric.sdk.android.services.concurrency.PriorityAsyncTask.executeOnExecutor(PriorityAsyncTask.java:43)

        at io.fabric.sdk.android.Kit.initialize(Kit.java:69)

        at io.fabric.sdk.android.Fabric.initializeKits(Fabric.java:440)

        at io.fabric.sdk.android.Fabric.init(Fabric.java:384)

        at io.fabric.sdk.android.Fabric.setFabric(Fabric.java:342)

        at io.fabric.sdk.android.Fabric.with(Fabric.java:313)

        at com.crashlytics.android.CrashlyticsInitProvider.onCreate(CrashlyticsInitProvider.java:27)

        at android.content.ContentProvider.attachInfo(ContentProvider.java:1925)

        at android.content.ContentProvider.attachInfo(ContentProvider.java:1900)

        at android.app.ActivityThread.installProvider(ActivityThread.java:6572)

            ... 10 more
@soumak77
Copy link
Contributor

@herrskytte have you setup Crashlytics in the firebase console?

@soumak77
Copy link
Contributor

I'm trying to see if we missed anything when configuring Crashlytics for android based on the firebase setup guide, but it seems we followed the necessary steps. Hopefully someone from the community that uses Crashlytics on android can help out with this issue.

@herrskytte
Copy link
Author

@soumak77 Yes, it's set up I think. It's working for iOS, and for Android it just says I need to add the sdk to my app to begin receiving crashes.

@herrskytte
Copy link
Author

By the way, this exception completely crashes the app on launch every time

@ColDrekken
Copy link

Hello, did anybody solve this successfully?

i tried adding the sdk after firebase setup guide and sync gradle has no errors but it still does not work. What is the difference between project level gradle and app level gradle?

@ColDrekken
Copy link

ok, i guess i got it run. But im not sure if this was the right way. At least my Android App did not crash anymore yet when use Version 2.0.1 of the plugin.

i added the SDK manually to project build.gradle:
`buildscript {
repositories {
jcenter()
maven {
url "https://maven.fabric.io/public"
}
}

// Switch the Android Gradle plugin version requirement depending on the
// installed version of Gradle. This dependency is documented at
// http://tools.android.com/tech-docs/new-build-system/version-compatibility
// and https://issues.apache.org/jira/browse/CB-8143
dependencies {
    classpath 'com.android.tools.build:gradle:2.2.3'
    classpath 'com.google.gms:google-services:4.1.0'
    classpath 'io.fabric.tools:gradle:1.25.4'
}

}`

as described in firebase setup guide

on my first try i did not add

apply plugin: 'io.fabric'

at the end of gradle file. After i did and rebuild App starts fine.

Maybe this helps someone.

@soumak77
Copy link
Contributor

It looks like we are adding the necessary code to build.gradle in the after plugin add hook: https://github.com/arnesson/cordova-plugin-firebase/blob/master/scripts/after_plugin_add.js

I'm not entirely sure why we do it then instead of just adding it directly to the build.gradle file. Perhaps this is to allow the ability to disable crashlytics at some point in the future if we needed via a cordova variable.

@briantq I know you worked on Crashlytics for iOS but not for Android, but would you happen to know any specific reason we add the build steps after plugin add instead of just adding it directly to the build files?

@briantq briantq mentioned this issue Sep 15, 2018
@briantq
Copy link
Contributor

briantq commented Sep 15, 2018

@ColDrekken @herrskytte This should be resolved with PR #852

To test it, please run:

cordova plugin remove cordova-plugin-firebase (uninstall current firebase plugin)
cordova plugin add https://github.com/briantq/cordova-plugin-firebase.git#android-build (install the proposed fix)

@soumak77 I am not sure why, but that after_plugin_add hook was never getting run. I specifically looked for the snippet in the build.gradle but it wasn't there. Additionally, I think it was adding it to the wrong build.gradle file, as it needed to go to the one in the project root. Hopefully the latest PR should resolve it.

@herrskytte
Copy link
Author

@briantq I do not have access to github in my coding environment, so hopefully somebody else can test this! Thank you for quick reply and solution. At least the solution by @ColDrekken will work until this is merged into release

@briantq
Copy link
Contributor

briantq commented Sep 17, 2018

@herrskytte You can download a zip of the branch and install it locally to test. Since you are posting, you should be able to download a zip on that account, transfer it to your coding environment, and test it via a local install. Here's a post on how to do that.

@briantq
Copy link
Contributor

briantq commented Sep 18, 2018

@herrskytte This should be in v2.0.2. Check it out and let me know if it resolves the issue. You might need to delete the plugins and platform directories to get it to install correctly. The way you can tell is your should see 4 lines in the build.gradle at the root of the project, that have a comment with cordova-plugin-firebase in the. If you see that, it should resolve your issue.

If it doesn't work, let me know and we can see what we can do.

@briantq briantq closed this as completed Sep 18, 2018
@ColDrekken
Copy link

hello @briantq , i tried version 2.0.2 with the suggested way but theres another issue now:

i did:

platform rm android
plugin rm cordova-plugin-firebase

plattform add android
plugin add cordova-plugin-firebase@latest

when i build android i end up with:

  • What went wrong:
    A problem occurred evaluating root project 'android'.

Could not find method google() for arguments [] on repository container.

in build.gradle line 25 in my case.

best regards

@briantq
Copy link
Contributor

briantq commented Sep 18, 2018

@ColDrekken I think it has something to do with your configuration somewhere. I say that because that line of copied directly from the set up guide for installing Firebase on Android. You might Google to see if others encountered the same issue outside of Cordova. Sorry I can't be of more help.

@Jagdish-958
Copy link

E .
2024-03-26 16:35:40.787 29902-29902 CrashlyticsCore com.vnerds.routineer E . | |
2024-03-26 16:35:40.788 29902-29902 CrashlyticsCore com.vnerds.routineer E . | |
2024-03-26 16:35:40.788 29902-29902 CrashlyticsCore com.vnerds.routineer E . | |
2024-03-26 16:35:40.788 29902-29902 CrashlyticsCore com.vnerds.routineer E . \ | | /
2024-03-26 16:35:40.788 29902-29902 CrashlyticsCore com.vnerds.routineer E . \ /
2024-03-26 16:35:40.788 29902-29902 CrashlyticsCore com.vnerds.routineer E . \ /
2024-03-26 16:35:40.788 29902-29902 CrashlyticsCore com.vnerds.routineer E . /
2024-03-26 16:35:40.788 29902-29902 CrashlyticsCore com.vnerds.routineer E .
2024-03-26 16:35:40.788 29902-29902 CrashlyticsCore com.vnerds.routineer E 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.
2024-03-26 16:35:40.788 29902-29902 CrashlyticsCore com.vnerds.routineer E .
2024-03-26 16:35:40.788 29902-29902 CrashlyticsCore com.vnerds.routineer E . /
2024-03-26 16:35:40.788 29902-29902 CrashlyticsCore com.vnerds.routineer E . /
2024-03-26 16:35:40.788 29902-29902 CrashlyticsCore com.vnerds.routineer E . /
2024-03-26 16:35:40.788 29902-29902 CrashlyticsCore com.vnerds.routineer E . / | |
2024-03-26 16:35:40.788 29902-29902 CrashlyticsCore com.vnerds.routineer E . | |
2024-03-26 16:35:40.788 29902-29902 chatty com.vnerds.routineer I uid=10677(com.vnerds.routineer) identical 1 line
2024-03-26 16:35:40.788 29902-29902 CrashlyticsCore com.vnerds.routineer E . | |
2024-03-26 16:35:40.788 29902-29902 CrashlyticsCore com.vnerds.routineer E .
2024-03-26 16:35:40.788 29902-29902 AndroidRuntime com.vnerds.routineer D Shutting down VM
2024-03-26 16:35:40.800 29902-29902 AndroidRuntime com.vnerds.routineer E FATAL EXCEPTION: main
Process: com.vnerds.routineer, PID: 29902
java.lang.RuntimeException: Unable to get provider com.crashlytics.android.CrashlyticsInitProvider: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: 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.
at android.app.ActivityThread.installProvider(ActivityThread.java:7854)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:7390)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7276)
at android.app.ActivityThread.access$1600(ActivityThread.java:306)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2164)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:263)
at android.app.ActivityThread.main(ActivityThread.java:8296)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006)
Caused by: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: 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.
at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:243)
at com.crashlytics.android.core.CrashlyticsCore.onPreExecute(CrashlyticsCore.java:211)
at io.fabric.sdk.android.InitializationTask.onPreExecute(InitializationTask.java:44)
at io.fabric.sdk.android.services.concurrency.AsyncTask.executeOnExecutor(AsyncTask.java:611)
at io.fabric.sdk.android.services.concurrency.PriorityAsyncTask.executeOnExecutor(PriorityAsyncTask.java:43)
at io.fabric.sdk.android.Kit.initialize(Kit.java:69)
at io.fabric.sdk.android.Fabric.initializeKits(Fabric.java:466)
at io.fabric.sdk.android.Fabric.init(Fabric.java:410)
at io.fabric.sdk.android.Fabric.setFabric(Fabric.java:368)
at io.fabric.sdk.android.Fabric.with(Fabric.java:339)
at com.crashlytics.android.CrashlyticsInitProvider.onCreate(CrashlyticsInitProvider.java:35)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2388)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2358)
at android.app.ActivityThread.installProvider(ActivityThread.java:7849)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:7390) 
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7276) 
at android.app.ActivityThread.access$1600(ActivityThread.java:306) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2164) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:263) 
at android.app.ActivityThread.main(ActivityThread.java:8296) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006) 

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

No branches or pull requests

5 participants