chat-sdk-android icon indicating copy to clipboard operation
chat-sdk-android copied to clipboard

Message box crashing?

Open RyanElliott94 opened this issue 9 years ago • 4 comments

Hello again,

When i first used and setup the audio module, everything worked as it should but after creating a new project and importing and setting everything up again, it has started to crash for some reason?

The log: 03-06 18:53:48.923 2011-2011/com.skintmedia.voice E/AndroidRuntime: FATAL EXCEPTION: main Process: com.skintmedia.voice, PID: 2011 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.skintmedia.voice/com.braunster.chatsdk.activities.ChatSDKLoginActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.braunster.chatsdk.network.AbstractNetworkAdapter.facebookEnabled()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2434) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494) at android.app.ActivityThread.access$900(ActivityThread.java:157) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5551) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.braunster.chatsdk.network.AbstractNetworkAdapter.facebookEnabled()' on a null object reference at com.braunster.chatsdk.activities.ChatSDKLoginActivity.onCreate(ChatSDKLoginActivity.java:44) at android.app.Activity.performCreate(Activity.java:6272) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2387) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494)  at android.app.ActivityThread.access$900(ActivityThread.java:157)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:148)  at android.app.ActivityThread.main(ActivityThread.java:5551)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) 

Line 52: <com.braunster.chatsdk.view.ChatMessageBoxView android:layout_width="fill_parent" android:layout_height="wrap_content" 52>> android:id="@+id/chat_sdk_message_box" </com.braunster.chatsdk.view.ChatMessageBoxView>

Thanks

RyanElliott94 avatar Mar 06 '17 18:03 RyanElliott94

Hi @SimplisticApps,

Can you confirm when the crashing occurred? For example when you changed the Firebase details of the audio project did it still occur or only after you had added it to your project?

I also noticed the similar text in the error message talking about the facebookEnabled() function. It might be worth removing this line if you are not using Facebook login. If you have not configured Facebook it might be causing issues.

Let me know about where the errors occur (Firebase configuration or adding the chat to your project) and I'll help narrow down the issue as best I can.

Simon

simonsmiley64 avatar Mar 06 '17 23:03 simonsmiley64

Instead of opening another issue, i was wondering if you could also tell how to see if an email address exists when you send a password change email because i don't want any emails being sent an address that doesn't exist on my firebase

Sorry, another question to add! How do i delete a contact? because i can see in the strings.xml that there is infact an id but i can't find any useses for it anywhere? Thanks

RyanElliott94 avatar Mar 07 '17 17:03 RyanElliott94

Update: I've had to work around the error i had so I'm okay with that now, i just need to know how to delete contacts and how to see if an email exists on the database or not

RyanElliott94 avatar Mar 08 '17 17:03 RyanElliott94

Sorry about the delays! Please open another issue if the email confirmations are still an issue. However, Firebase handles most of the user authentication.

kykrueger avatar Mar 09 '17 17:03 kykrueger