-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Describe the bug
Complete crash of the app that uses reown dep
SDK Version
- Client: Kotlin
- Version BOM 1.4.11
To Reproduce
Steps to reproduce the behavior:
- Have an existing connection
- Connect again when a a pairing already exists
- App crashes
Expected behavior
The app NOT to crash
Screenshots
The app completly shut downs due to error attach
Device (please complete the following information):
We tried on virtual device and a physical HONOR ALI-NX1
Additional context
While migrating the WalletConnect to Reown I encounter the fallowing problem.
BOM: 1.4.11
Android Kotlin
In our app we open wallets using deeplinks wc:// and we have also the modal
We had multiple pairings in our previous implementation
We internally fix this by using and connecting automatically to the existing pairing allowing just one connection.
It seems now that when a session already exists, and try to create one new pairing or using the existing pairing, the connection is send to the wallet, the pop up to connect appears but when the users goes back to our app the app crash at:
2025-10-09 10:29:25.895 16873-16952 AndroidRuntime com.onchainvision.onchainvision E FATAL EXCEPTION: DefaultDispatcher-worker-7 (Ask Gemini)
Process: com.onchainvision.onchainvision, PID: 16873
java.util.NoSuchElementException: List is empty.
at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:221)
at com.reown.appkit.utils.SessionUtilsKt.getSelectedChain(SessionUtils.kt:14)
at com.reown.appkit.domain.delegate.AppKitDelegate$onSessionApproved$1.invokeSuspend(AppKitDelegate.kt:43)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:820)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@c5e5a1, Dispatchers.IO]