smithy-lang / smithy-language-server

A Language Server Protocol implementation for the Smithy IDL
https://smithy.io
Apache License 2.0
33 stars 18 forks source link

failed to launch server on M1 Mac #109

Closed i10416 closed 1 year ago

i10416 commented 1 year ago

vs code smithy extension failed to launch due to the following error. I'm not sure if this repository is the right place to post error report. If there's better one, please tell me.

Exception in thread "main" coursier.jvm.JvmCache$JvmNotFoundInIndex: JVM adopt@1.8+ not found in index: JVM adopt not found
    at coursier.jvm.JvmCache.$anonfun$getIfInstalled$1(JvmCache.scala:35)
    at coursier.jvm.JvmCache.$anonfun$getIfInstalled$1$adapted(JvmCache.scala:34)
    at coursier.util.Task$.$anonfun$flatMap$extension$1(Task.scala:14)
    at coursier.util.Task$.$anonfun$flatMap$extension$1$adapted(Task.scala:14)
    at coursier.util.Task$.wrap(Task.scala:82)
    at coursier.util.Task$.$anonfun$flatMap$2(Task.scala:14)
    at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307)
    at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
    at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
    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:833)
    at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:704)
    at com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:202)
[Error - 10:18:14 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:18:14 PM] The Smithy LSP server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 10:18:14 PM] Smithy LSP client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 10:18:14 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 

It seems coursier failed to download adopt@1.8+. In fact, my local coursier cannot download java with 8 or 1.8 identifier.

cs version
2.1.3
cs java --jvm 1.8+                                                                                                                   ~
JVM 1.8+ not found in index: No adoptium version matching '1.8+' found

cs java --jvm 8+                                                                                                                     ~
JVM 8+ not found in index: No adoptium version matching '1.8+' found

cs java --jvm 11+
// It works and starts downloading jvm
cs launch software.amazon.smithy:smithy-language-server:0.2.3                                                                        ~
Exception in thread "main" coursier.jvm.JvmCache$JvmNotFoundInIndex: JVM adopt@1.8+ not found in index: JVM adopt not found
    at coursier.jvm.JvmCache.$anonfun$getIfInstalled$1(JvmCache.scala:35)
    at coursier.jvm.JvmCache.$anonfun$getIfInstalled$1$adapted(JvmCache.scala:34)
    at coursier.util.Task$.$anonfun$flatMap$extension$1(Task.scala:14)
    at coursier.util.Task$.$anonfun$flatMap$extension$1$adapted(Task.scala:14)
    at coursier.util.Task$.wrap(Task.scala:82)
    at coursier.util.Task$.$anonfun$flatMap$2(Task.scala:14)
    at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307)
    at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
    at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
    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:833)
    at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:704)
    at com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:202)