FirebaseUI Auth Demo - Stuck in loading screen after pressing start button

2,369 views
Skip to first unread message

George S.

unread,
May 20, 2016, 2:30:33 PM5/20/16
to Firebase Google Group
Hello!

I have downloaded the FirebaseUI for android from the respective git ( https://github.com/firebase/FirebaseUI-Android) and imported it into Android studio (v. 2.1.1)
After following the instruction on the Github page I added the lines below on the app build.gradle file:
  // Single target that includes all FirebaseUI libraries
compile 'com.firebaseui:firebase-ui:0.4.0'
//FirebaseUI Database only
compile 'com.firebaseui:firebase-ui-database:0.4.0'
//FirebaseUI Auth only
compile 'com.firebaseui:firebase-ui-auth:0.4.0'

When I build the project i get the errors:
Error:Module 'com.firebaseui:database:0.4.0' depends on one or more Android Libraries but is a jar
Error:Module 'com.firebaseui:auth:0.4.0' depends on one or more Android Libraries but is a jar

But if I comment the compile 'com.firebaseui:firebase-ui:0.4.0' line  
I get the error:
 Error:Execution failed for task ':app:processDebugResources'.
> Error: more than one library with package name 'com.firebase.ui.auth'

so no build completion in the above two cases.

But if i comment all the lines mentioned above the project compiles and runs properly in the emulator but when the Auth Demo 'start' button is clicked it just displays a loading window. 

Please note that i have added compile 'com.google.firebase:firebase-core:9.0.0'  in the app/build.gradle and the 'multiDexEnabled true' in the same file to fix other errors.

Any ideas why the app is not progressing past the loading point in the emulator?
Thanks!

Samuel Stern

unread,
May 20, 2016, 8:08:13 PM5/20/16
to Firebase Google Group
Hi George,

You should not need to add any of those lines to the build.gradle file for the included sample app.  Those lines are meant for people including FirebaseUI in their own applications.  Can you try doing a clean pull of the repository and running the app module on your device with no changes? 

Sam

George S.

unread,
May 20, 2016, 11:53:02 PM5/20/16
to Firebase Google Group
Hi Sam,

Thanks for your feedback, I did a clean pull from github without doing any modifications to the code as you suggested, 
the app initially stuck because it required the google-services.json file which i downloaded (from firebase) after creating a firebase app.
After adding the file and doing a rebuild it managed to finish without any errors, I tried to run the app in the Nexus 5X API23 emulator but the result was the same...the firebaseui app starts displaying two choices: Chat Activity and Auth UI Demo , after trying both, the chat activity pops a "signing in" toast and appears empty whereas the AuthUI stucks again in the loading screen after clicking the start button...

Any additional suggestions why this happens?
Thanks!

Samuel Stern

unread,
May 21, 2016, 11:04:35 PM5/21/16
to Firebase Google Group
Can you try running on a real device?  I suspect that the emulator you're running on does not have the proper version of Google Play Services, which is why authentication is not working in either Activity.  You need Google Play Services 9.0.83, which a real device would get automatically but an emulator would not.

--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/u6DW5TtzOho/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/24ef3494-48cc-4917-9926-671f4e7487af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

George S.

unread,
May 22, 2016, 7:33:41 PM5/22/16
to Firebase Google Group
Hi Sam,

You were right, although the android studio reported the latest Google play services, the device emulator would not have the latest update (by checking the play services version in config->apps)!
 I tested in an actual device and created a new emulator with api22 and the "sign in with email" worked! The google sign in option though still keeps pausing on the loading screen (on the actual device)... any ideas about that?

Also the chat activity displays a toast saying "signing in" when clicked but then I get "sign in failed" any suggestions?

Thanks!

Samuel Stern

unread,
May 22, 2016, 8:42:22 PM5/22/16
to Firebase Google Group

Glad you got it working.  The chat activity uses Anonymous auth, did you enable that in the Firebase Console?


George S.

unread,
May 24, 2016, 6:13:54 PM5/24/16
to Firebase Google Group
Hi Sam,

Once again thanks for your input...enabling anonymous auth worked like a charm! 
Reply all
Reply to author
Forward
0 new messages