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

Cannot Connect with new Release 1.18.0 #702

Closed
brianraymes opened this issue Aug 8, 2023 · 4 comments
Closed

Cannot Connect with new Release 1.18.0 #702

brianraymes opened this issue Aug 8, 2023 · 4 comments

Comments

@brianraymes
Copy link

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
Copy link
Member

joshtynjala commented Aug 8, 2023

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

@brianraymes
Copy link
Author

brianraymes commented Aug 10, 2023

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?

  • as3mxml.sdk.framework
  • as3mxml.sdk.editor

I have them both set to the same thing.

@joshtynjala
Copy link
Member

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:

  • Royale introduces new AS3 syntax that you want to use early
  • A bug in Royale is affecting code intelligence and you can't work without the fix

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants