Unable to instantiate activity ComponentInfo
DeemSameer opened this issue · comments
-
What modifications have you made to the Chat SDK?
Nothing -
Android Version:
4.0 -
Expected result:
Open SDK launcher -
Actual result:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.rafad, PID: 18378
java.lang.RuntimeException: Unable to resume activity {com.example.rafad/sdk.chat.ui.activities.SplashScreenActivity}: java.lang.NullPointerException: Attempt to read from field 'sdk.chat.core.handlers.AuthenticationHandler sdk.chat.core.base.BaseNetworkAdapter.auth' on a null object reference
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4343)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4375)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2049)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941)
Caused by: java.lang.NullPointerException: Attempt to read from field 'sdk.chat.core.handlers.AuthenticationHandler sdk.chat.core.base.BaseNetworkAdapter.auth' on a null object reference
at sdk.chat.core.session.ChatSDK.auth(SourceFile:1)
at sdk.chat.ui.activities.SplashScreenActivity.startNextActivity(SourceFile:1)
at sdk.chat.ui.activities.SplashScreenActivity.onResume(SourceFile:3)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1456)
at android.app.Activity.performResume(Activity.java:8119)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4333)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4375)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2049)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941)
I/FA: Tag Manager is not found and thus will not be used
V/FA: Connection attempt already in progress
V/FA: Connection attempt already in progress
I/Process: Sending signal. PID: 18378 SIG: 9
This issue will happen if you haven't initialized the Chat SDK properly before launching a view like the splash screen activity. It can also happen if you try to initialize the Chat SDK in a place other than the main Application onCreate method. I'd recommend looking at the setup video and seeing where the configuration has been done incorrectly.
Closing due to inactivity.