Fatal Exception: net.sqlcipher.database.SQLiteConstraintException: error code 19: UNIQUE constraint failed: Pairing.topic
jasonwyatt opened this issue · comments
Describe the bug
Fatal exception thrown on user's device, crashing our app.
SDK Version
- Client: Kotlin
- Version: 1.20.0
Device (please complete the following information):
- Device: Oppo A74 5G
- OS: Android 13
- Browser: Unknown
- Version: 1.20.0
Additional context
Add any other context about the problem here.
# Crashlytics - Stack trace
# Application: [redacted]
# Platform: android
# Version: [redacted]
# Issue: 58a3faccac042af6532f1e86ac88f858
# Session: 65E13F2F00A0000217BB63FF3BA8030A_DNE_0_v2
# Date: Thu Feb 29 2024 18:36:31 GMT-0800 (Pacific Standard Time)
Fatal Exception: net.sqlcipher.database.SQLiteConstraintException: error code 19: UNIQUE constraint failed: Pairing.topic
at net.sqlcipher.database.SQLiteStatement.native_execute(SQLiteStatement.java)
at net.sqlcipher.database.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:105)
at app.cash.sqldelight.driver.android.AndroidPreparedStatement.execute(AndroidSqliteDriver.kt:246)
at app.cash.sqldelight.driver.android.AndroidSqliteDriver$execute$2.invoke(AndroidSqliteDriver.kt:169)
at app.cash.sqldelight.driver.android.AndroidSqliteDriver$execute$2.invoke(AndroidSqliteDriver.kt:169)
at app.cash.sqldelight.driver.android.AndroidSqliteDriver$execute$2.invoke(AndroidSqliteDriver.kt:169)
at app.cash.sqldelight.driver.android.AndroidSqliteDriver$execute$2.invoke(AndroidSqliteDriver.kt:169)
at app.cash.sqldelight.driver.android.AndroidSqliteDriver.execute-zeHU3Mk(AndroidSqliteDriver.kt:154)
at app.cash.sqldelight.driver.android.AndroidSqliteDriver.execute(AndroidSqliteDriver.kt:169)
at com.walletconnect.android.sdk.storage.data.dao.PairingQueries.insertOrAbortPairing(PairingQueries.kt:133)
at com.walletconnect.android.internal.common.storage.PairingStorageRepository.insertPairing(PairingStorageRepository.kt:17)
at com.walletconnect.android.pairing.engine.domain.PairingEngine.pair(PairingEngine.kt:154)
at com.walletconnect.android.pairing.client.PairingProtocol$pair$1$1.invoke(PairingProtocol.kt:63)
at com.walletconnect.android.pairing.client.PairingProtocol$pair$1$1.invoke(PairingProtocol.kt:60)
at com.walletconnect.android.pairing.client.PairingProtocol$awaitConnection$3.invokeSuspend(PairingProtocol.kt:126)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.CoroutineContextKt.withContinuationContext(CoroutineContext.kt:108)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:90)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
```
@jasonwyatt
This issue should be resolved in the latest version of the SDK where we've introduced extra checks for pairings. Please upgrade to BOM 1.30.0 and let us know if you're still seeing the same issue