segmentio / analytics-android

The hassle-free way to add analytics to your Android app.

Home Page:https://segment.com/docs/sources/mobile/android/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Attempt to invoke virtual method 'void android.media.MediaDrm.release()' on a null object reference

armanso opened this issue · comments

Hi there.

In Android, I encounter a problem with version 4.10.+.
Device that i'm using is on API 27, ASOP build.

The older version 4.1.6 does not cause any issues for me with same device.

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.MediaDrm.release()' on a null object reference
        at com.segment.analytics.internal.Utils.getUniqueID(Utils.java:338)
        at com.segment.analytics.internal.Utils.getDeviceId(Utils.java:304)
        at com.segment.analytics.AnalyticsContext.putDevice(AnalyticsContext.java:239)
        at com.segment.analytics.AnalyticsContext.create(AnalyticsContext.java:134)
        at com.segment.analytics.Analytics$Builder.build(Analytics.java:1467)

Cheers.

@armanso thanks for reporting this issue. will get this fix asap.

hey @armanso the issue has been fixed in #784.
4.10.2 is released out. feel free to reopen this issue if you still encounter problems with the getUniqueID