Constant crashes
Describe the bug
I get a crash when calling Web3Modal.request
java.lang.IllegalStateException: Already resumed
at kotlin.coroutines.SafeContinuation.resumeWith(SafeContinuationJvm.kt:44)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.tools.deploy.liveedit.AndroidEval.invokeMethod(AndroidEval.java:320)
at com.android.tools.deploy.liveedit.ProxyClassEval.invokeMethod(ProxyClassEval.java:164)
at com.android.tools.deploy.liveedit.AndroidEval.invokeInterface(AndroidEval.java:293)
at com.android.tools.deploy.liveedit.ProxyClassEval.invokeInterface(ProxyClassEval.java:148)
at com.android.tools.deploy.interpreter.OpcodeInterpreter.naryOperation(OpcodeInterpreter.java:690)
at com.android.tools.deploy.interpreter.OpcodeInterpreter.naryOperation(OpcodeInterpreter.java:182)
at com.android.deploy.asm.tree.analysis.Frame.executeInvokeInsn(Frame.java:646)
at com.android.deploy.asm.tree.analysis.Frame.execute(Frame.java:573)
at com.android.tools.deploy.interpreter.ByteCodeInterpreter.doInterpret(ByteCodeInterpreter.java:191)
at com.android.tools.deploy.interpreter.ByteCodeInterpreter.interpreterLoop(ByteCodeInterpreter.java:130)
at com.android.tools.deploy.liveedit.MethodBodyEvaluator.eval(MethodBodyEvaluator.java:104)
at com.android.tools.deploy.liveedit.LiveEditClass.invokeDeclaredMethod(LiveEditClass.java:107)
at com.android.tools.deploy.liveedit.ProxyClassHandler.invokeMethod(ProxyClassHandler.java:94)
at com.android.tools.deploy.liveedit.ProxyClassEval.invokeProxy(ProxyClassEval.java:226)
at com.android.tools.deploy.liveedit.ProxyClassEval.invokeMethod(ProxyClassEval.java:160)
at com.android.tools.deploy.interpreter.OpcodeInterpreter.naryOperation(OpcodeInterpreter.java:687)
at com.android.tools.deploy.interpreter.OpcodeInterpreter.naryOperation(OpcodeInterpreter.java:182)
at com.android.deploy.asm.tree.analysis.Frame.executeInvokeInsn(Frame.java:646)
at com.android.deploy.asm.tree.analysis.Frame.execute(Frame.java:573)
at com.android.tools.deploy.interpreter.ByteCodeInterpreter.doInterpret(ByteCodeInterpreter.java:191)
at com.android.tools.deploy.interpreter.ByteCodeInterpreter.interpreterLoop(ByteCodeInterpreter.java:130)
at com.android.tools.deploy.liveedit.MethodBodyEvaluator.eval(MethodBodyEvaluator.java:104)
at com.android.tools.deploy.liveedit.LiveEditClass.invokeDeclaredMethod(LiveEditClass.java:107)
at com.android.tools.deploy.liveedit.ProxyClassHandler.invokeMethod(ProxyClassHandler.java:94)
at com.android.tools.deploy.liveedit.ProxyClassHandler.invoke(ProxyClassHandler.java:126)
at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
at $Proxy15.invoke(Unknown Source)
at com.walletconnect.web3.modal.client.Web3Modal$connect$3.invoke(Web3Modal.kt:200)
at com.walletconnect.web3.modal.client.Web3Modal$connect$3.invoke(Web3Modal.kt:197)
at com.walletconnect.sign.client.SignProtocol$connect$1.invokeSuspend(SignProtocol.kt:130)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:102)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:96)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:816)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@d4695c1, Dispatchers.IO]
SDK Version Kotlin latest
To Reproduce It is purely random
Device (please complete the following information): Any emulator
Additional context Add any other context about the problem here.
Hello, please provide sdk version, and the system version you use. What are the reproduction steps?
1.35.1 Calling directly Web3Modal.connect() or Web3Modal.authenticate()
Could you share code snippet of the initialization code?
I can't. The code works normally 70% cases. But occasionally on the subsequent calls I get crashes.
Another log. The call is Web3Modal.connect(Modal.Params.Connect(...)). The crash happens deep inside wallet connect
at com.walletconnect.web3.modal.client.Web3Modal$connect$3.invoke(Web3Modal.kt:200)
at com.walletconnect.web3.modal.client.Web3Modal$connect$3.invoke(Web3Modal.kt:197)
at com.walletconnect.sign.client.SignProtocol$connect$1.invokeSuspend(SignProtocol.kt:130)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:102)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:96)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:816)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@b115e47, Dispatchers.IO]