Log in

View Full Version : FRC Krawler help?


fovea1959
12-12-2016, 09:59
Looking at the FRC Krawler App to evaluate for use in upcoming season.

Got it built and loaded into the emulator, but it stops immediately with this traceback. I suspect we missed some database setup?

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.team2052.frckrawler.development, PID: 2889
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.team2052.frckrawler.development/com.team2052.frckrawler.activities.SetupActivity}: java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] doesn't exist.
at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(Activit yThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:10 2)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.jav a:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:616)
Caused by: java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] doesn't exist.
at com.google.firebase.FirebaseApp.getInstance(Unknow n Source)
at com.google.firebase.FirebaseApp.getInstance(Unknow n Source)
at com.google.firebase.database.FirebaseDatabase.getI nstance(Unknown Source)
at com.team2052.frckrawler.activities.SetupActivity.o nCreate(SetupActivity.java:53)
at android.app.Activity.performCreate(Activity.java:6 237)
at android.app.Instrumentation.callActivityOnCreate(I nstrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:2476)$@#
at android.app.ActivityThread.-wrap11(ActivityThread.java)$@#
at android.app.ActivityThread$H.handleMessage(Activit yThread.java:1344)$@#
at android.os.Handler.dispatchMessage(Handler.java:10 2)$@#
at android.os.Looper.loop(Looper.java:148)$@#
at android.app.ActivityThread.main(ActivityThread.jav a:5417)$@#
at java.lang.reflect.Method.invoke(Native Method)$@#
at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:726)$@#
at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:616)$@#

bdaroz
12-12-2016, 10:17
We looked at forking Krawler for our use last year but decided against it. Check your Firebase settings, API keys and app name in Firebase.

Adam8234
12-12-2016, 13:07
Please double check that you have apply plugin: 'com.google.gms.google-services'
At the bottom of the app build.gradle file and that you have two google-services.json for both the '.development' build and the release build.


To get timely fixes and help, we suggest that you fill out an issue on our GitHub page next time.
https://github.com/frc2052/FRC-Krawler/issues

19lmyers
17-12-2016, 16:41
Try using an emulator with Google Play Services enabled. It's failing because it can't initialize Firebase, a Google app analytics platform.

What's the specific reason you had to compile it from source anyway? It is also available on the Google Play Store...

Ty Tremblay
17-12-2016, 17:27
Try using an emulator with Google Play Services enabled. It's failing because it can't initialize Firebase, a Google app analytics platform.

What's the specific reason you had to compile it from source anyway? It is also available on the Google Play Store...

It's open source. Maybe they're helping development............

19lmyers
17-12-2016, 21:34
It's open source. Maybe they're helping development............

Not necessarily. To my knowledge, some teams require more than just what a scouting app provides out of the box and wish to edit the source themselves. However, most would generally be fine with the stock app off the Play Store.

Ty Tremblay
17-12-2016, 22:30
What's the specific reason you had to compile it from source anyway? It is also available on the Google Play Store...

To my knowledge, some teams require more than just what a scouting app provides out of the box and wish to edit the source themselves. However, most would generally be fine with the stock app off the Play Store.

Looks like you answered your question then.

plnyyanks
18-12-2016, 14:39
Please double check that you have apply plugin: 'com.google.gms.google-services'
At the bottom of the app build.gradle file and that you have two google-services.json for both the '.development' build and the release build.


To get timely fixes and help, we suggest that you fill out an issue on our GitHub page next time.
https://github.com/frc2052/FRC-Krawler/issues

It bothers me that the new firebase stuff requires that those files be present or it won't even initialize the library (I'd rather it fail softer). That was a pain to sort out after the TBA for Android CI builds stopped working... I eventually made it fail softly on its own (https://github.com/the-blue-alliance/the-blue-alliance-android/commit/39e3c371b5915f563800271ea0d96e2010b86215#diff-b80a7ee43d09ac3fe4ca627f4b407012R30).

@OP - if you aren't sure where to get the google-service.json file, you'll need to create a Firebase project (https://console.firebase.google.com/) and configure it to work with your build keys. This page (https://firebase.google.com/docs/android/setup) should be able to help.