Skip to content

Android crash following call to clearIdentity #24

@jakemadash

Description

@jakemadash

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions