Skip to content

[Android] Null pointer exception crashing app for small number of users #131

@lostchopstik

Description

@lostchopstik

Hi there,

I've been seeing a crash in our logs that has existed for many versions of our app and wanted to see if you guys might have any insights.

The error is:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.database.sqlite.SQLiteDatabase.delete(java.lang.String, java.lang.String, java.lang.String[])' on a null object reference
       at com.tealium.core.persistence.d0.purgeExpired(SourceFile:5)
       at com.tealium.core.persistence.c0.<init>(SourceFile:8)
       at com.tealium.core.Tealium.<init>(SourceFile:65)
       at com.tealium.core.Tealium.<init>(SourceFile:114)
       at com.tealium.core.Tealium$Companion.create(SourceFile:1)
       at com.tealium.react.TealiumReact.initialize(TealiumReact.kt:65)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
       at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
       at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
       at android.os.Looper.loop(Looper.java:148)
       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
       at java.lang.Thread.run(Thread.java:818)

From what I can see, this error is happening on one device model, a Google Nexus 5X running Android 6.0.1 (which is right at our min supported SDK). This is probably not critical for you guys, just curious if anything can be done or if a null check needs to be added.

Thanks!

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