rudderlabs / rudder-sdk-android

Android SDK for RudderStack - the Customer Data Platform for Developers.
https://www.rudderstack.com
Other
18 stars 29 forks source link

BUG : <Title>App Crash in Kotlin #375

Closed Tilakrk21 closed 2 months ago

Tilakrk21 commented 7 months ago

Hey, I am getting the below crash. Can anyone please help

Fatal Exception: net.sqlcipher.database.SQLiteException: database is locked: UPDATE events SET status = (status | 2) WHERE id IN (121493,121494,121495,121496,121497); at net.sqlcipher.database.SQLiteDatabase.native_execSQL(SQLiteDatabase.java) at net.sqlcipher.database.SQLiteDatabase.execSQL(SQLiteDatabase.java:2439) at com.rudderstack.android.sdk.core.DBPersistentManager.updateEventStatus(DBPersistentManager.java:572) at com.rudderstack.android.sdk.core.DBPersistentManager.markCloudModeDone(DBPersistentManager.java:562) at com.rudderstack.android.sdk.core.RudderCloudModeManager$1.run(RudderCloudModeManager.java:57)

itsdebs commented 7 months ago

@Tilakrk21 thanks for reporting. Which version of SDK are you using?

Tilakrk21 commented 7 months ago

@Tilakrk21 thanks for reporting. Which version of SDK are you using? I am using 1.14.1 version

itsdebs commented 7 months ago

Can you please update to 1.21.1 and check if you are still facing this?

Tilakrk21 commented 7 months ago

Can you please update to 1.21.1 and check if you are still facing this?

Okay. I will check

desusai7 commented 7 months ago

Hey @Tilakrk21,

Have you tried updating to 1.21?

1abhishekpandey commented 6 months ago

Hey @Tilakrk21, I wanted to inform you that I'm closing this issue as it has been inactive for a significant period of time. While we haven't received any updates or responses regarding this issue, please know that you're always welcome to reopen it if you encounter the problem again or have any additional information to share. Your feedback is valuable to us, and we want to ensure that all issues are addressed promptly.

prajjwal-epifi commented 2 months ago

hey, @desusai7 @itsdebs, We are still seeing the above crash even after upgrading to 1.21.3

1abhishekpandey commented 2 months ago

Hey @prajjwal-epifi, Can you please help us with the following information:

  1. How often does this crash occur and what percentage of your customers are affected by it?
  2. Does this happen on any specific device or Android version?
prajjwal-epifi commented 2 months ago
  1. Although adoption of new build(after upgrading) is very low, we have experienced 110 crashes in the last 5 days.
  2. These crashes are occurring across all devices and Android OS versions.
1abhishekpandey commented 2 months ago

Hey @prajjwal-epifi, Could you please confirm if you are using our database encryption feature? I believe this exception is related to that package. Once you confirm, we can suggest the next step.

prajjwal-epifi commented 2 months ago

yes, we are using a rudder DB encryption.

.withDbEncryption(
                    RudderConfig.DBEncryption(
                        true,
                        rudderEncryptedDbKey,
                        PersistenceProviderFactory::class.java.canonicalName
                    )
                )

In PersistenceProviderFactory, we are setting DB name only.

1abhishekpandey commented 2 months ago

As per our investigation, this issue is caused by the deprecated https://github.com/sqlcipher/android-database-sqlcipher dependency (as reported in your stack trace: at net.sqlcipher.database.SQLiteDatabase.native_execSQL(SQLiteDatabase.java)). We have already updated to the latest version of this dependency: https://github.com/sqlcipher/sqlcipher-android.

We request you to upgrade to the latest version of our SDK v1.23.2 and also update the following SQLCipher dependencies:

implementation "net.zetetic:sqlcipher-android:4.5.6@aar"
implementation "androidx.sqlite:sqlite:2.3.1"

You can refer to our DbEncryption documentation if required: https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-android-sdk/#dbencryption.

If the issue persists, please create a new issue. For now, we are closing this one.