Skip to content

VSCode fails to connect to HexDebug with Fabric Language Kotlin 1.13.2+kotlin.2.4.0 #75

Description

@object-Object

When Fabric Language Kotlin version 1.13.12+kotlin.2.4.0 is installed, attempting to connect VSCode to HexDebug results in the connection hanging on the first attempt, and throwing connect ECONNREFUSED on all subsequent attempts.

The issue does not occur with FLK versions 1.13.11+kotlin.2.3.21 or prior.

The TCP port is opened successfully (verified with CurrPorts), but HexDebug is failing to respond to messages on it (verified with the below command).

python -c 'import socket; s = socket.create_connection(("localhost", 4444)); s.send(b"""Content-Length: 64\r\n\r\n{"seq":1,"type":"request","command":"initialize","arguments":{}}"""); print(s.recv(1024)); s.close()'

The following error was observed in latest.log:

[23:00:15] [DebugAdapterProxyClient/ERROR]: Uncaught exception in thread "DebugAdapterProxyClient"
java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: 'long kotlinx.coroutines.EventLoopKt.processNextEventInCurrentThread()'
	at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:?]
	at java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[?:?]
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor$1.get(ConcurrentMessageProcessor.java:54) ~[org_eclipse_lsp4j_org_eclipse_lsnrpc-0.23.0-1889591b9d7c8192.jar:?]
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor$1.get(ConcurrentMessageProcessor.java:50) ~[org_eclipse_lsp4j_org_eclipse_lsnrpc-0.23.0-1889591b9d7c8192.jar:?]
	at gay.object.hexdebug.adapter.proxy.DebugProxyClient$Companion$acceptClient$2$1.invoke(DebugProxyClient.java:137) ~[hexdebug-fabric-0.8.0+1.20.1.jar:?]
	at gay.object.hexdebug.adapter.proxy.DebugProxyClient$Companion$acceptClient$2$1.invoke(DebugProxyClient.java:136) ~[hexdebug-fabric-0.8.0+1.20.1.jar:?]
	at kotlinx.coroutines.InterruptibleKt.runInterruptibleInExpectedContext(Interruptible.kt:48) ~[org_jetbrains_kotlinx_kotlinx-co-jvm-1.11.0-e44c0f0f4a5439d9.jar:?]
	at kotlinx.coroutines.InterruptibleKt.access$runInterruptibleInExpectedContext(Interruptible.kt:1) ~[org_jetbrains_kotlinx_kotlinx-co-jvm-1.11.0-e44c0f0f4a5439d9.jar:?]
	at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invokeSuspend(Interruptible.kt:40) ~[org_jetbrains_kotlinx_kotlinx-co-jvm-1.11.0-e44c0f0f4a5439d9.jar:?]
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34) ~[org_jetbrains_kotlin_kotlin-stdlib-2.4.0-b7c44403154bf922.jar:?]
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100) ~[org_jetbrains_kotlinx_kotlinx-co-jvm-1.11.0-e44c0f0f4a5439d9.jar:?]
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124) ~[org_jetbrains_kotlinx_kotlinx-co-jvm-1.11.0-e44c0f0f4a5439d9.jar:?]
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89) ~[org_jetbrains_kotlinx_kotlinx-co-jvm-1.11.0-e44c0f0f4a5439d9.jar:?]
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586) ~[org_jetbrains_kotlinx_kotlinx-co-jvm-1.11.0-e44c0f0f4a5439d9.jar:?]
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:798) ~[org_jetbrains_kotlinx_kotlinx-co-jvm-1.11.0-e44c0f0f4a5439d9.jar:?]
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717) ~[org_jetbrains_kotlinx_kotlinx-co-jvm-1.11.0-e44c0f0f4a5439d9.jar:?]
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704) ~[org_jetbrains_kotlinx_kotlinx-co-jvm-1.11.0-e44c0f0f4a5439d9.jar:?]
Caused by: java.lang.NoSuchMethodError: 'long kotlinx.coroutines.EventLoopKt.processNextEventInCurrentThread()'
	at io.ktor.utils.io.jvm.javaio.BlockingAdapter.parkingLoop(Blocking.kt:264) ~[io_ktor_ktor-io-jvm-2.3.10-f42fa58deedb8e96.jar:?]
	at io.ktor.utils.io.jvm.javaio.BlockingAdapter.submitAndAwait(Blocking.kt:233) ~[io_ktor_ktor-io-jvm-2.3.10-f42fa58deedb8e96.jar:?]
	at io.ktor.utils.io.jvm.javaio.BlockingAdapter.submitAndAwait(Blocking.kt:201) ~[io_ktor_ktor-io-jvm-2.3.10-f42fa58deedb8e96.jar:?]
	at io.ktor.utils.io.jvm.javaio.InputAdapter.read(Blocking.kt:57) ~[io_ktor_ktor-io-jvm-2.3.10-f42fa58deedb8e96.jar:?]
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:82) ~[org_eclipse_lsp4j_org_eclipse_lsnrpc-0.23.0-1889591b9d7c8192.jar:?]
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:114) ~[org_eclipse_lsp4j_org_eclipse_lsnrpc-0.23.0-1889591b9d7c8192.jar:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
	at java.lang.Thread.run(Thread.java:842) ~[?:?]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions