-
Notifications
You must be signed in to change notification settings - Fork 6
Description
For complicated reasons, our app sometimes calls its logout method right away when the app is opened. After adding Gleap.clearIdentity() to this logout method, the below crash occurs, possibly because it's called before Gleap has been initialized. I know this is not great usage of the SDK on our end, but there should still be a null check in place to avoid crashes. Our current workaround is to add a conditional making sure Gleap.isUserIdentified returns truthy before the call to clearIdentity.
Fatal Exception: java.lang.RuntimeException An error occurred while executing doInBackground() android.os.AsyncTask$4.done (AsyncTask.java:415) java.lang.Thread.run (Thread.java:1012) Caused by java.lang.NullPointerException Attempt to invoke virtual method 'void io.gleap.GleapSessionController.setSessionLoaded(boolean)' on a null object reference io.gleap.GleapBaseSessionService.doInBackground (GleapBaseSessionService.java:63) io.gleap.GleapBaseSessionService.doInBackground (GleapBaseSessionService.java:18) android.os.AsyncTask$3.call (AsyncTask.java:394) java.lang.Thread.run (Thread.java:1012)