Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Language server not started #393

Closed
Closed
@peter76

Description

@peter76

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

self-assigned this
on Dec 14, 2020
kittaakos

kittaakos commented on Dec 14, 2020

@kittaakos
Contributor

@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.

screencast 2020-12-14 16-54-47

Did you start debugging manually from the Debug view?

peter76

peter76 commented on Dec 14, 2020

@peter76
Author

@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

kittaakos commented on Dec 14, 2020

@kittaakos
Contributor

I just checked, but I didn't start debuggging.

👍

When I select the nano, or any other board, I get the "Couldn't start client arduino language server" message.

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

peter76 commented on Dec 14, 2020

@peter76
Author

Ok, thanks, let me know if I can do anything on my side

McWeird

McWeird commented on Dec 14, 2020

@McWeird

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

peter76 commented on Dec 14, 2020

@peter76
Author

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

kittaakos commented on Dec 15, 2020

@kittaakos
Contributor

@peter76, @McWeird how did you unpack the IDE? Maybe you have the same issue as described here. Could you please run:

/path/to/arduino-pro-ide_0.1.3_Linux_64bit/resources/app/node_modules/arduino-ide-extension/build/bin/clangd --version
peter76

peter76 commented on Dec 15, 2020

@peter76
Author

@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

peter76 commented on Dec 15, 2020

@peter76
Author

@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

kittaakos commented on Dec 15, 2020

@kittaakos
Contributor

OK, thanks for checking. We found a Linux machine that fails with the same issue; we're on it.

kittaakos

kittaakos commented on Dec 15, 2020

@kittaakos
Contributor

OK, it seems there is an issue if you have clangd in the PATH. At least on our side, we could consistently reproduce the defect. The Arduino LS does not start if,

  • clangd (11.x) is available from the PATH, the LS does not start.
  • clangd is not in the PATH, it works.

10 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @kittaakos@peter76@McWeird

      Issue actions

        Language server not started · Issue #393 · arduino/arduino-pro-ide