[Solved] Problem launching LSP

I am trying to make an extension for ActionScript 3 and Flex development using Bowler Hat’s AS3MXML extension. The LSP is Java based, and launching it from terminal seems successful. However, when I try using it in the extension, I get this error in Nova 10.6 on Mac OS 13.1:

ActionScript & MXML Language Server connection closed unexpectedly: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"

But I’m not sure what to do at this point. Anyone have tips? Is there a way I can find out what is being blocked?

A few possible things to look at:

  1. Does this require something in your path (e.g. to run a java app do you need to run it as a script with a shebang (#!/usr/bin/something) ? If it’s a script, is it executable? (chmod a+x )

  2. Does the server need to be permitted to run (e.g. MacOS attributes for downloaded binaries, etc.)? Apple’s safety checks on downloaded files can be a pain, and some things folks do in e.g. a terminal window might not apply when running it another way?

  3. Does the service start with a sensible cwd?

  4. Does the server need to open any special files (unix domain sockets) or TCP sockets that it might lack support for ?

If I try running the LSP server from terminal, it seems to run without problems.

However, after looking around, I changed the serverOptions‘s path so it was `/usr/bin/java’ and then the args to how to start it up. At least now I’m getting that it couldn’t find or load the main class that it’s supposed to and not the “Permission denied”. I’ll need to keep digging.

I also tried changing it to use a shebang script and that seems to work. It did start to highlighting some issues in a test project!

1 Like

I finally figured it out. I stated trying to make different LSP extension and was able to get it to launch the LSP without a script. Went back to the AS3 extension and figured out that 1)I thought that path was just the path you wanted to start in, not just the executable. 2) There were some formatting issue with the args