• Swaminathan V 2
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
We are implementing the salesforce live agent chat in our android mobile application. Everything works fine. But we have a corner case.
Initiating the chat -> Opens chat window -> click on close button in window immediately [ within fraction of second ]. App will be crashed. Below is the log obtained from crash.

java.lang.NullPointerException: Session is not active. Unable to create LiveAgent Request. at com.salesforce.android.service.common.utilities.validation.Arguments.checkNotNull(Arguments.java:75) at com.salesforce.android.chat.core.internal.liveagent.request.InternalChatRequestFactory.checkSessionIsActive(InternalChatRequestFactory.java:104) at com.salesforce.android.chat.core.internal.liveagent.request.InternalChatRequestFactory.createEndRequest(InternalChatRequestFactory.java:95) at com.salesforce.android.chat.core.internal.liveagent.handler.EndHandler.onEndingSessionState(EndHandler.java:109) at com.salesforce.android.chat.core.internal.liveagent.LiveAgentChatSession.onStateChanged(LiveAgentChatSession.java:177) at com.salesforce.android.chat.core.internal.liveagent.LiveAgentChatSession.onStateChanged(LiveAgentChatSession.java:54) at com.salesforce.android.service.common.utilities.lifecycle.LifecycleEvaluator.stateChanged(LifecycleEvaluator.java:304) at com.salesforce.android.service.common.utilities.lifecycle.LifecycleStateWatcher$1.run(LifecycleStateWatcher.java:73) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6688) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)

is there any method to overcome this issue. Any help appreciated.