Language server not started #393
Description
Describe the bug
When I start Arduino pro ide 0.1.3 and select nano as board I get the following error:
"Couldn't start client arduino language server"
This is some relevant output in the terminal when this happens:
root INFO Board config changed: root INFO Starting language server: arduino:avr:nano root ERROR [hosted-plugin: 6465] Promise rejection not handled in one second: Error: json: cannot unmarshal bool into Go struct field ServerCapabilities.capabilities.textDocumentSync of type lsp.SaveOptions , reason: Error: json: cannot unmarshal bool into Go struct field ServerCapabilities.capabilities.textDocumentSync of type lsp.SaveOptions root ERROR [hosted-plugin: 6465] With stack trace: Error: json: cannot unmarshal bool into Go struct field ServerCapabilities.capabilities.textDocumentSync of type lsp.SaveOptions at handleResponse (/home/peter/Apps/arduino-pro-ide_0.1.3_Linux_64bit/resources/app/plugins/vscode-arduino-language-server/extension/dist/bundle.js:4725:48) at processMessageQueue (/home/peter/Apps/arduino-pro-ide_0.1.3_Linux_64bit/resources/app/plugins/vscode-arduino-language-server/extension/dist/bundle.js:4552:17) at Immediate.<anonymous> (/home/peter/Apps/arduino-pro-ide_0.1.3_Linux_64bit/resources/app/plugins/vscode-arduino-language-server/extension/dist/bundle.js:4536:13) at processImmediate (internal/timers.js:439:21)
Let me know if you need more info.
Desktop (please complete the following information):
- OS: Fedora
- Version: 33
Regards, Peter
Activity
kittaakos commentedon Dec 14, 2020
@peter76, how did you start debugging? Debugging should be disabled from the toolbar when you select the Nano board. It works with boards that support debugging: Zero, MKR1000.
Did you start debugging manually from the Debug view?
peter76 commentedon Dec 14, 2020
@kittaakos , I just checked, but I didn't start debuggging. When I now start Arduino-pro-ide I get an empty sketch, with no board selected and debugging greyed out in the toolbar, like in your screesnshot.
When I select the nano, or any other board, I get the "Couldn't start client arduino language server" message.
But I guess from the command line output you see that debugging is enabled?
Thanks for looking into this, the ide looks very promising:-)
Regards, Peter
kittaakos commentedon Dec 14, 2020
👍
OK. I need to set up a Linux VM and try it out. Thank you for your persistence on this bug and convincing me it's not a debugger issue.
peter76 commentedon Dec 14, 2020
Ok, thanks, let me know if I can do anything on my side
McWeird commentedon Dec 14, 2020
In case it is of any help I'm also running into this with 0.1.3 on Ubuntu 20.04, but it appears to be only in the cases where the sketches include libraries. Let me know if i can be of any help.
peter76 commentedon Dec 14, 2020
That's strange... I just created a new user account and downloaded 0.1.3 and ran the ide in this new account,
but exactly the same, just with an empty sketch... I mean, no libraries or anything.
kittaakos commentedon Dec 15, 2020
@peter76, @McWeird how did you unpack the IDE? Maybe you have the same issue as described here. Could you please run:
peter76 commentedon Dec 15, 2020
@kittaakos, I unpacked the ide with Fedoras standard unarchiver. If I run your command above I get:
clangd version 9.0.0 (tags/RELEASE_900/final)
So that seems to be ok. I also checked if the symbolic links are in place from the other bug you mention, here is the out put:
lrwxrwxrwx. 1 peter peter 14 11 dec 20:44 libc++abi.so -> libc++abi.so.1
lrwxrwxrwx. 1 peter peter 16 11 dec 20:44 libc++abi.so.1 -> libc++abi.so.1.0
-rw-r--r--. 1 peter peter 308288 22 sep 2019 libc++abi.so.1.0
-rw-r--r--. 1 peter peter 28 11 dec 14:15 libc++.so
lrwxrwxrwx. 1 peter peter 13 11 dec 20:44 libc++.so.1 -> libc++.so.1.0
-rw-r--r--. 1 peter peter 1017080 22 sep 2019 libc++.so.1.0
lrwxrwxrwx. 1 peter peter 15 11 dec 20:44 libtinfo.so.5 -> libtinfo.so.5.9
-rwxr-xr-x. 1 peter peter 193928 21 jan 2020 libtinfo.so.5.9
I have Visual Studio Code installed system wide, could there be a conflict with that?
peter76 commentedon Dec 15, 2020
@kittaakos , I just redownloaded the ide and unpacked it through the command-line with
unzip
, but get the same error about the language server.kittaakos commentedon Dec 15, 2020
OK, thanks for checking. We found a Linux machine that fails with the same issue; we're on it.
kittaakos commentedon Dec 15, 2020
OK, it seems there is an issue if you have
clangd
in thePATH
. At least on our side, we could consistently reproduce the defect. The Arduino LS does not start if,clangd
(11.x
) is available from thePATH
, the LS does not start.clangd
is not in thePATH
, it works.10 remaining items