BowlerHatLLC / vscode-as3mxml

ActionScript & MXML language extension for Visual Studio Code. Develop apps for Adobe AIR, Adobe Flash Player, or Apache Royale.
https://as3mxml.com/
Apache License 2.0
256 stars 39 forks source link

Cannot Connect with new Release 1.18.0 #702

Closed brianraymes closed 1 year ago

brianraymes commented 1 year ago

After updating the VSCode plugin, It seems that the server init fails and can no longer connect.

  Message: Internal error.
  Code: -32603 
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
    at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
    ... 11 more
Caused by: java.lang.NoClassDefFoundError: org/apache/royale/linter/problems/ILinterProblem
    at com.as3mxml.vscode.utils.LanguageServerCompilerUtils.getDiagnosticFromCompilerProblem(LanguageServerCompilerUtils.java:374)
    at com.as3mxml.vscode.ActionScriptServices.addCompilerProblem(ActionScriptServices.java:1606)
    at com.as3mxml.vscode.ActionScriptServices.publishDiagnosticsForProblemQuery(ActionScriptServices.java:1980)
    at com.as3mxml.vscode.ActionScriptServices.getProject(ActionScriptServices.java:1854)
    at com.as3mxml.vscode.ActionScriptServices.checkProjectForProblems(ActionScriptServices.java:1882)
    at com.as3mxml.vscode.ActionScriptServices.onAddProject(ActionScriptServices.java:253)
    at com.as3mxml.vscode.ActionScriptServices.lambda$new$0(ActionScriptServices.java:236)
    at com.as3mxml.vscode.utils.ActionScriptProjectManager.addProject(ActionScriptProjectManager.java:814)
    at com.as3mxml.vscode.utils.ActionScriptProjectManager.addWorkspaceFolder(ActionScriptProjectManager.java:109)
    at com.as3mxml.vscode.ActionScriptServices.addWorkspaceFolder(ActionScriptServices.java:241)
    at com.as3mxml.vscode.ActionScriptLanguageServer.initialize(ActionScriptLanguageServer.java:106)
    ... 16 more
Caused by: java.lang.ClassNotFoundException: org.apache.royale.linter.problems.ILinterProblem
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 27 more
joshtynjala commented 1 year ago

Do you have the as3mxml.sdk.editor setting configured to point to a previous Royale SDK?

brianraymes commented 1 year ago

I had an earlier 0.9.11-SNAPSHOT. Updated to the latest and it still fails.

Can you remind me the difference between the following two settings?

I have them both set to the same thing.

joshtynjala commented 1 year ago

as3mxml.sdk.framework

This one is like choosing a particular Flex/AIR SDK in other IDEs, like Flash Builder or whatever. It tells the extension which SWCs to load, which compiler to use for building, etc.

as3mxml.sdk.editor

This is is more advanced. It tells the extension to use the Royale compiler .jar files from a particular SDK for code intelligence — instead of the .jar files bundled with the extension. In general, you don't need to use this setting unless:

Since Royale just had a release, there's not much to gain by using this setting right now.

I had an earlier 0.9.11-SNAPSHOT. Updated to the latest and it still fails.

Are you building from source? Did you rebuild royale-asjs only, or did you also rebuild royale-compiler too? Even if you have the latest framework, it could be that your compiler is out of date.

Or did you download a nightly .zip/.tar.gz? I just checked the CI server, and it appears that nightlies haven't been built since January, for some reason. With that in mind, the official 0.9.10 release is actually newer than the latest nightly.

brianraymes commented 1 year ago

I build all three (compiler, typedefs, and asjs) whenever I update.

I went ahead and removed the as3mxml.sdk.editor config line and only have as3mxml.sdk.framework, and now it seems to work as expected.