Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constant crashes #1494

Open
naixx opened this issue Sep 10, 2024 · 5 comments
Open

Constant crashes #1494

naixx opened this issue Sep 10, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@naixx
Copy link

naixx commented Sep 10, 2024

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.

@naixx naixx added the bug Something isn't working label Sep 10, 2024
@jakubuid
Copy link
Contributor

Hello, please provide sdk version, and the system version you use.
What are the reproduction steps?

@naixx
Copy link
Author

naixx commented Sep 11, 2024

1.35.1
Calling directly Web3Modal.connect() or Web3Modal.authenticate()

@jakubuid
Copy link
Contributor

Could you share code snippet of the initialization code?

@naixx
Copy link
Author

naixx commented Sep 11, 2024

I can't. The code works normally 70% cases. But occasionally on the subsequent calls I get crashes.

@naixx
Copy link
Author

naixx commented Sep 23, 2024

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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants