Problem Configuring Firebase account.
I followed every step from your GitHub link.
after configuring the Chatsdk for Fire base and running it in the emulator crashes my application and gives me below error.
find the pdf copy of the Error in the attachments.
04-09 02:14:33.675 2489-2489/com.braunster.androidchatsdk.app E/AndroidRuntime: FATAL EXCEPTION: main Process: com.braunster.androidchatsdk.app, PID: 2489 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.braunster.androidchatsdk.app/com.braunster.chatsdk.activities.ChatSDKLoginActivity}: com.google.firebase.database.DatabaseException: Invalid URL (https://mychat-29c39.firebaseio.com/testRoot/) passed to getReference(). URL was expected to match configured Database URL: https://chat-sdk-v4.firebaseio.com at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) Caused by: com.google.firebase.database.DatabaseException: Invalid URL (https://mychat-29c39.firebaseio.com/testRoot/) passed to getReference(). URL was expected to match configured Database URL: https://chat-sdk-v4.firebaseio.com at com.google.firebase.database.FirebaseDatabase.getReferenceFromUrl(Unknown Source) at com.braunster.androidchatsdk.firebaseplugin.firebase.FirebasePaths.fb(FirebasePaths.java:42) at com.braunster.androidchatsdk.firebaseplugin.firebase.FirebasePaths.firebaseRef(FirebasePaths.java:37) at com.braunster.androidchatsdk.firebaseplugin.firebase.FirebasePaths.userRef(FirebasePaths.java:48) at com.braunster.androidchatsdk.firebaseplugin.firebase.FirebasePaths.userRef(FirebasePaths.java:53) at com.braunster.androidchatsdk.firebaseplugin.firebase.FirebasePaths.userOnlineRef(FirebasePaths.java:63) at com.braunster.androidchatsdk.firebaseplugin.firebase.wrappers.BUserWrapper.goOnline(BUserWrapper.java:443) at com.braunster.androidchatsdk.firebaseplugin.firebase.BChatcatNetworkAdapter.setUserOnline(BChatcatNetworkAdapter.java:323) at com.braunster.chatsdk.activities.ChatSDKBaseActivity.onStart(ChatSDKBaseActivity.java:233) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1248) at android.app.Activity.performStart(Activity.java:6679) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2609) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) Error.pdf
Hi @karthikc03,
Can you confirm a few details to help us find the problem?
- What version emulator are you testing on?
- Are you testing on the Android Studio emulator or a custom one like Geny motion?
Can you also confirm whether you have use this video when you were setting up your project? It goes step by step through the entire process and so can ensure you are getting every step correct.
Finally can you confirm whether the Chat SDK works before you configure it with Firebase? The SDK is pre set to work with our test accounts so if it works after download on your emulator but not after Firebase configuration we can narrow down where the problem is occurring.
Simon
Hi @simonsmiley64
I am using Nexus_5_API_24, and testing it on Android Studio emulator, I didn't follow the Video. I am not using it in my existing project but, I directly opened Chat SDK as an existing project in android studio and it worked perfectly for the first time before configuring it for Firebase.
Hi @karthikc03,
You should check out this video here. I have just put it together to go through the Android Firebase configuration process.
Let me know if this helps or if you are still having issues
Simon
@simonsmiley64 yeah it works now thank you