Skip to content

DatabaseNotClosedException raised when notification arrives #8

@abhimediratta

Description

@abhimediratta

I'm running the app in StrictMode. I get the following exception when notification comes on the app:

Finalizing a Cursor that has not been deactivated or closed. database = /data/data/com.patientapp/databases/OneSignal.db, table = notification, query = SELECT notification_id FROM notification WHERE notification_id = ?
12-02 17:20:45.025 4035-4044/com.patientapp E/StrictMode: android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
12-02 17:20:45.025 4035-4044/com.patientapp E/StrictMode: at android.database.sqlite.SQLiteCursor.(SQLiteCursor.java:98)
12-02 17:20:45.025 4035-4044/com.patientapp E/StrictMode: at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:50)
12-02 17:20:45.025 4035-4044/com.patientapp E/StrictMode: at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1314)
12-02 17:20:45.025 4035-4044/com.patientapp E/StrictMode: at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1161)
12-02 17:20:45.025 4035-4044/com.patientapp E/StrictMode: at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1032)
12-02 17:20:45.025 4035-4044/com.patientapp E/StrictMode: at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1200)
12-02 17:20:45.025 4035-4044/com.patientapp E/StrictMode: at com.onesignal.OneSignal.isDuplicateNotification(OneSignal.java:1263)
12-02 17:20:45.025 4035-4044/com.patientapp E/StrictMode: at com.onesignal.OneSignal.isValidAndNotDuplicated(OneSignal.java:1290)
12-02 17:20:45.025 4035-4044/com.patientapp E/StrictMode: at com.onesignal.NotificationBundleProcessor.Process(NotificationBundleProcessor.java:48)
12-02 17:20:45.025 4035-4044/com.patientapp E/StrictMode: at com.onesignal.GcmIntentService.onHandleIntent(GcmIntentService.java:66)
12-02 17:20:45.025 4035-4044/com.patientapp E/StrictMode: at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
12-02 17:20:45.025 4035-4044/com.patientapp E/StrictMode: at android.os.Handler.dispatchMessage(Handler.java:102)
12-02 17:20:45.025 4035-4044/com.patientapp E/StrictMode: at android.os.Looper.loop(Looper.java:136)
12-02 17:20:45.025 4035-4044/com.patientapp E/StrictMode: at android.os.HandlerThread.run(HandlerThread.java:61)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions