Instabug / Instabug-Android

In-app feedback and bug reporting tool for apps.
https://instabug.com/
Other
190 stars 38 forks source link

NullPointerException: java.lang.String java.lang.String.trim() #412

Closed asamoylenko closed 2 years ago

asamoylenko commented 2 years ago

Steps to Reproduce the Problem

We haven't been able to reproduce it so far, but we are keep seeing this crash in different production releases of our app. We've tried several versions of the SDK and all of them have this issue. It is TOP 1 crash in our Android app at the moment.

We've already reported this issue here https://github.com/Instabug/Instabug-Android/issues/409 and got a snapshot version of the library 10.11.0.3594-SNAPSHOT which should have contained a fix, but the crash is still there.

Expected Behavior

No crash

Actual Behavior

Crash:

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.trim()' on a null object reference
     at com.instabug.library.user.a.v(SourceFile:1)
     at com.instabug.library.model.State$Builder.getUserName(SourceFile:1)
     at com.instabug.library.model.State$Builder.build(SourceFile:30)
     at com.instabug.library.model.State.getState(SourceFile:2)
     at m7.a.<init>(SourceFile:2)
     at m7.a$a.a(SourceFile:5)
     at com.instabug.anr.b.run(SourceFile:7)

Instabug integration code

Initializing Instabug

        new Instabug.Builder(this, BuildConfig.INSTABUG_APP_TOKEN)
                .setInvocationEvents(InstabugInvocationEvent.NONE)
                .build();

and setting user id once we have it

Instabug.setUserAttribute(USER_ID_KEY, id.toString())

SDK Version

10.10.0

Android Version

Device Model

amrbrkt commented 2 years ago

Hello @asamoylenko
We're sorry for the inconvenience, we are investigating this further at the moment, and hence you are on an open channel with our customer support team, I'll close this issue and will handle the fix and keep you posted via the support channel.