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

Getting error when trying to open a .ino file with the arduino language server #180

Open
3 tasks done
ghost opened this issue Mar 11, 2024 · 5 comments
Open
3 tasks done
Labels
type: imperfection Perceived defect in any part of project

Comments

@ghost
Copy link

ghost commented Mar 11, 2024

Describe the problem

Failed to run client.before_init for settings/plugins/lspconfig
vim/shared.lua:0: Cannot deepcopy object of type userdata

stack traceback:
vim/shared.lua: in function 'deepcopy'
vim/shared.lua: in function 'deepcopy'
vim/shared.lua: in function 'deepcopy'
vim/shared.lua: in function 'deepcopy'
vim/shared.lua: in function 'deepcopy'
vim/shared.lua: in function 'deepcopy'
...nvim/lazy/neoconf.nvim/lua/neoconf/plugins/lspconfig.lua:44: in function 'on_config'
....local/share/nvim/lazy/neoconf.nvim/lua/neoconf/util.lua:47: in function <....local/share/nvim/lazy/neoconf.nvim/lua/neoconf/util.lua:46>
[C]: in function 'func'
...al/share/nvim/lazy/nvim-lspconfig/lua/lspconfig/util.lua:54: in function 'func'
...al/share/nvim/lazy/nvim-lspconfig/lua/lspconfig/util.lua:54: in function <...al/share/nvim/lazy/nvim-lspconfig/lua/lspconfig/util.lua:52>
[C]: in function 'pcall'
...share/nvim/lazy/nvim-lspconfig/lua/lspconfig/configs.lua:207: in function 'make_config'
...share/nvim/lazy/nvim-lspconfig/lua/lspconfig/manager.lua:203: in function 'add'
...share/nvim/lazy/nvim-lspconfig/lua/lspconfig/manager.lua:278: in function <...share/nvim/lazy/nvim-lspconfig/lua/lspconfig/manager.lua:267>
[C]: in function 'pcall'
...l/share/nvim/lazy/nvim-lspconfig/lua/lspconfig/async.lua:5: in function <...l/share/nvim/lazy/nvim-lspconfig/lua/lspconfig/async.lua:4>

To reproduce

I am using Astrovim, and installed arduino language server with mason.

Expected behavior

For the Language server to start and work. Right now it doesn't. it can just make the syntax. But no completion

Arduino Language Server version

0.7.6

Arduino CLI version

arduino-cli Version: 0.35.3 Commit: 95cfd654 Date: 2024-02-19T13:24:18Z

Operating system

Linux

Operating system version

Linux Mint with i3

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details
@ghost ghost added the type: imperfection Perceived defect in any part of project label Mar 11, 2024
@mroavi
Copy link

mroavi commented May 5, 2024

I have the same issue. This LSP message gets displayed as soon as I open the .ino file:

Client 1 quit with exit code 2 and signal 0

This Arduino LSP was working fine a few months back.

@anmoljhamb
Copy link

I may have a possible fix. For everyone who is facing this issue, I was having the exact same issue, and JUST COULDN'T FIGURE IT OUT. But finally! I have managed to fix it for myself.

My config was just the fact that I was using NeoVim with the Arduino LSP, and the Arduino-cli to to upload sketches. But to check it out, I downloaded the official ide, and turns out that the LSP wasn't working EVEN THERE! So, I tried compiling a Hello, World program, and it showed me an error saying, "serial not found", turns out, my system-wide install of python was missing the pyserial library. Which is really simple to fix! Just try the
python3 -m pip install pyserial --break-system-packages.

Note: The pipx install didn't work, and had to use the --break-system-packages instead.
Just try restarting your IDE after it, and it should work!! If it doesn't, I recommend trying out by compiling a hello world program in the official ide!

@anmoljhamb
Copy link

@mroavi Let me know if my suggested fix works for you!!

@mroavi
Copy link

mroavi commented May 8, 2024

I already had pyserial globally installed 😔.

❯ python3 -m pip install pyserial --break-system-packages
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pyserial in /usr/lib/python3.12/site-packages (3.5)

I still get

Client 1 quit with exit code 2 and signal 0

when I open an .ino file in neovim.

Here is my LSP log:

Click to expand!
[START][2024-05-08 19:24:17] LSP logging initiated
[ERROR][2024-05-08 19:24:17] .../vim/lsp/rpc.lua:734	"rpc"	"arduino-language-server"	"stderr"	"19:24:17.661564 \27[97mLS: : Initial board configuration: \27[0m\n19:24:17.661601 \27[97mLS: : arduino-language-server Version: 0.7.6 Commit: 9c2f44d Date: 2024-02-06T14:12:58Z\27[0m\n19:24:17.661607 \27[97mLS: : Language server temp directory: /tmp/arduino-language-server3627381172\27[0m\n19:24:17.661614 \27[97mLS: : Language server build path: /tmp/arduino-language-server3627381172/build\27[0m\n19:24:17.661616 \27[97mLS: : Language server build sketch root: /tmp/arduino-language-server3627381172/build/sketch\27[0m\n19:24:17.661618 \27[97mLS: : Language server FULL build path: /tmp/arduino-language-server3627381172/fullbuild\27[0m\n19:24:17.661812 IN Elapsed: 29.688µs\n19:24:17.661913 \27[92mIDE --> LS REQU initialize 1\27[0m\n19:24:17.662410 \27[92m                initialize 1: \27[93mwrite-locked\27[0m\27[0m\n19:24:17.662439 \27[92m                initialize 1: \27[93mwrite-unlocked\27[0m\27[0m\n19:24:17.662734 \27[92m                initialize 1: initialization parameters: {\"capabilities\":{\"textDocumentSync\":{\"openClose\":true,\"change\":2,\"save\":{\"includeText\":true}},\"completionProvider\":{\"triggerCharacters\":[\".\",\"\\u003c\",\"\\u003e\",\":\",\"\\\"\",\"/\"],\"allCommitCharacters\":[\" \",\"\\t\",\"(\",\")\",\"[\",\"]\",\"{\",\"}\",\"\\u003c\",\"\\u003e\",\":\",\";\",\",\",\"+\",\"-\",\"/\",\"*\",\"%\",\"^\",\"\\u0026\",\"#\",\"?\",\".\",\"=\",\"\\\"\",\"'\",\"|\"],\"completionItem\":{}},\"hoverProvider\":{},\"signatureHelpProvider\":{\"triggerCharacters\":[\"(\",\",\"]},\"definitionProvider\":{},\"documentHighlightProvider\":{},\"documentSymbolProvider\":{},\"codeActionProvider\":{\"codeActionKinds\":[\"quickfix\",\"refactor\",\"info\"]},\"documentFormattingProvider\":{},\"documentRangeFormattingProvider\":{},\"documentOnTypeFormattingProvider\":{\"firstTriggerCharacter\":\"\\n\"},\"renameProvider\":{},\"executeCommandProvider\":{\"commands\":[\"clangd.applyFix\",\"clangd.applyTweak\"]},\"workspaceSymbolProvider\":{}},\"serverInfo\":{\"name\":\"arduino-language-server\",\"version\":\"0.7.6\"}}\27[0m\n19:24:17.662745 \27[32mIDE <-- LS RESP initialize 1\27[0m\n19:24:17.662775 OUT Elapsed: 3.913µs\n19:24:17.663042 \27[96mINIT --- : initializing workbench: file:///home/mroavi/Dropbox/tue/phd/software/arduino/neovim-lsp-example\27[0m\n19:24:17.663058 \27[96mINIT --- : \27[93mread-locked\27[0m\27[0m\n19:24:17.663062 \27[96mINIT --- : \27[93mread-unlocked\27[0m\27[0m\n19:24:17.663128 \27[96mINIT --- : running: /bin/arduino-cli --config-file /home/mroavi/.arduino15/arduino-cli.yaml compile --fqbn  --only-compilation-database --source-override /tmp/3055197579 --build-path /tmp/arduino-language-server3627381172/fullbuild --format json /home/mroavi/Dropbox/tue/phd/software/arduino/neovim-lsp-example\27[0m\n"
[ERROR][2024-05-08 19:24:17] .../vim/lsp/rpc.lua:734	"rpc"	"arduino-language-server"	"stderr"	"19:24:17.894528 IN Elapsed: 231.744707ms\n19:24:17.894622 \27[92mIDE --> LS NOTIF initialized\27[0m\n19:24:17.894631 \27[92m                 initialized: Notification is not propagated to clangd\27[0m\n19:24:17.894639 IN Elapsed: 5.478µs\n"
[ERROR][2024-05-08 19:24:17] .../vim/lsp/rpc.lua:734	"rpc"	"arduino-language-server"	"stderr"	"19:24:17.894653 \27[92mIDE --> LS NOTIF textDocument/didOpen\27[0m\n19:24:17.894695 \27[92m                 textDocument/didOpen: \27[93mwrite-locked\27[0m\27[0m\n19:24:17.894697 \27[92m                 textDocument/didOpen: (throttled: waiting for clangd)\27[0m\n19:24:17.894703 \27[92m                 textDocument/didOpen: \27[93munlocked (waiting clangd)\27[0m\27[0m\n"
[ERROR][2024-05-08 19:24:18] .../vim/lsp/rpc.lua:734	"rpc"	"arduino-language-server"	"stderr"	"19:24:18.848176 \27[96mINIT --- : arduino-cli output: {\n  \"compiler_out\": \"\",\n  \"compiler_err\": \"\",\n  \"builder_result\": {\n    \"build_path\": \"/tmp/arduino-language-server3627381172/fullbuild\",\n    \"board_platform\": {\n      \"id\": \"arduino:avr\",\n      \"version\": \"1.8.6\",\n      \"install_dir\": \"/home/mroavi/.arduino15/packages/arduino/hardware/avr/1.8.6\"\n    },\n    \"build_platform\": {\n      \"id\": \"arduino:avr\",\n      \"version\": \"1.8.6\",\n      \"install_dir\": \"/home/mroavi/.arduino15/packages/arduino/hardware/avr/1.8.6\"\n    },\n    \"build_properties\": [\n      \"_id=uno\",\n      \"archive_file_path=/tmp/arduino-language-server3627381172/fullbuild/{archive_file}\",\n      \"bootloader.extended_fuses=0xFD\",\n      \"bootloader.file=optiboot/optiboot_atmega328.hex\",\n      \"bootloader.high_fuses=0xDE\",\n      \"bootloader.lock_bits=0x0F\",\n      \"bootloader.low_fuses=0xFF\",\n      \"bootloader.tool=avrdude\",\n      \"bootloader.tool.default=avrdude\",\n      \"bootloader.unlock_bits=0x3F\",\n      \"build.arch=AVR\",\n      \"build.board=AVR_UNO\",\n      \"build.core=arduino\",\n      \"build.core.path=/home/mroavi/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino\",\n      \"build.extra_flags=\",\n      \"build.f_cpu=16000000L\",\n      \"build.fqbn=arduino:avr:uno\",\n      \"build.library_discovery_phase=0\",\n      \"build.mcu=atmega328p\",\n      \"build.path=/tmp/arduino-language-server3627381172/fullbuild\",\n      \"build.project_name=neovim-lsp-example.ino\",\n      \"build.source.path=/home/mroavi/Dropbox/tue/phd/software/arduino/neovim-lsp-example\",\n      \"build.system.path=/home/mroavi/.arduino15/packages/arduino/hardware/avr/1.8.6/system\",\n      \"build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER=\\\"Unknown\\\"' '-DUSB_PRODUCT={build.usb_product}'\",\n      \"build.usb_manufacturer=\\\"Unknown\\\"\",\n      \"build.variant=standard\",\n      \"build.variant.path=/home/mroavi/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard\",\n      \"compiler.S.extra_flags=\",\n      \"compiler.S.flags=-c -g -x assembler-with-cpp -flto -MMD\",\n      \"compiler.ar.cmd=avr-gcc-ar\",\n      \"compiler.ar.extra_flags=\",\n      \"compiler.ar.flags=rcs\",\n      \"compiler.c.cmd=avr-gcc\",\n      \"compiler.c.elf.cmd=avr-gcc\",\n      \"compiler.c.elf.extra_flags=\",\n      \"compiler.c.elf.flags=-w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections\",\n      \"compiler.c.extra_flags=\",\n      \"compiler.c.flags=-c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects\",\n      \"compiler.cpp.cmd=avr-g++\",\n      \"compiler.cpp.extra_flags=\",\n      \"compiler.cpp.flags=-c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto\",\n      \"compiler.elf2hex.cmd=avr-objcopy\",\n      \"compiler.elf2hex.extra_flags=\",\n      \"compiler.elf2hex.flags=-O ihex -R .eeprom\",\n      \"compiler.ldflags=\",\n      \"compiler.libraries.ldflags=\",\n      \"compiler.objcopy.cmd=avr-objcopy\",\n      \"compiler.objcopy.eep.extra_flags=\",\n      \"compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0\",\n      \"compiler.path=/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/\",\n      \"compiler.size.cmd=avr-size\",\n      \"compiler.warning_flags=-w\",\n      \"compiler.warning_flags.all=-Wall -Wextra\",\n      \"compiler.warning_flags.default=\",\n      \"compiler.warning_flags.more=-Wall\",\n      \"compiler.warning_flags.none=-w\",\n      \"extra.time.dst=3600\",\n      \"extra.time.local=1715196258\",\n      \"extra.time.utc=1715189058\",\n      \"extra.time.zone=3600\",\n      \"ide_version=10607\",\n      \"name=Arduino Uno\",\n      \"pid.0=0x0043\",\n      \"pid.1=0x0001\",\n      \"pid.2=0x0043\",\n      \"pid.3=0x0243\",\n      \"pid.4=0x006A\",\n      \"pluggable_discovery.required.0=builtin:serial-discovery\",\n      \"pluggable_discovery.required.1=builtin:mdns-discovery\",\n      \"pluggable_monitor.required.serial=builtin:serial-monitor\",\n      \"preproc.includes.flags=-w -x c++ -M -MG -MP\",\n      \"preproc.macros.flags=-w -x c++ -E -CC\",\n      \"recipe.S.o.pattern=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc\\\" -c -g -x assembler-with-cpp -flto -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   {includes} \\\"{source_file}\\\" -o \\\"{object_file}\\\"\",\n      \"recipe.ar.pattern=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar\\\" rcs  \\\"/tmp/arduino-language-server3627381172/fullbuild/{archive_file}\\\" \\\"{object_file}\\\"\",\n      \"recipe.c.combine.pattern=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc\\\" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p   -o \\\"/tmp/arduino-language-server3627381172/fullbuild/neovim-lsp-example.ino.elf\\\" {object_files}  \\\"/tmp/arduino-language-server3627381172/fullbuild/{archive_file}\\\" \\\"-L/tmp/arduino-language-server3627381172/fullbuild\\\" -lm\",\n      \"recipe.c.o.pattern=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc\\\" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   {includes} \\\"{source_file}\\\" -o \\\"{object_file}\\\"\",\n      \"recipe.cpp.o.pattern=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++\\\" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   {includes} \\\"{source_file}\\\" -o \\\"{object_file}\\\"\",\n      \"recipe.objcopy.eep.pattern=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy\\\" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0  \\\"/tmp/arduino-language-server3627381172/fullbuild/neovim-lsp-example.ino.elf\\\" \\\"/tmp/arduino-language-server3627381172/fullbuild/neovim-lsp-example.ino.eep\\\"\",\n      \"recipe.objcopy.hex.pattern=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy\\\" -O ihex -R .eeprom  \\\"/tmp/arduino-language-server3627381172/fullbuild/neovim-lsp-example.ino.elf\\\" \\\"/tmp/arduino-language-server3627381172/fullbuild/neovim-lsp-example.ino.hex\\\"\",\n      \"recipe.output.save_file=neovim-lsp-example.ino.standard.hex\",\n      \"recipe.output.tmp_file=neovim-lsp-example.ino.hex\",\n      \"recipe.preproc.includes=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++\\\" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   {includes} \\\"{source_file}\\\"\",\n      \"recipe.preproc.macros=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++\\\" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   {includes} \\\"{source_file}\\\" -o \\\"{preprocessed_file_path}\\\"\",\n      \"recipe.size.pattern=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-size\\\" -A \\\"/tmp/arduino-language-server3627381172/fullbuild/neovim-lsp-example.ino.elf\\\"\",\n      \"recipe.size.regex=^(?:\\\\.text|\\\\.data|\\\\.bootloader)\\\\s+([0-9]+).*\",\n      \"recipe.size.regex.data=^(?:\\\\.data|\\\\.bss|\\\\.noinit)\\\\s+([0-9]+).*\",\n      \"recipe.size.regex.eeprom=^(?:\\\\.eeprom)\\\\s+([0-9]+).*\",\n      \"runtime.hardware.path=/home/mroavi/.arduino15/packages/arduino/hardware/avr\",\n      \"runtime.ide.path=/usr/bin\",\n      \"runtime.ide.version=10607\",\n      \"runtime.os=linux\",\n      \"runtime.platform.path=/home/mroavi/.arduino15/packages/arduino/hardware/avr/1.8.6\",\n      \"runtime.tools.arduinoOTA-1.3.0.path=/home/mroavi/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0\",\n      \"runtime.tools.arduinoOTA.path=/home/mroavi/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0\",\n      \"runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7\",\n      \"runtime.tools.avr-gcc.path=/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7\",\n      \"runtime.tools.avrdude-6.3.0-arduino17.path=/home/mroavi/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17\",\n      \"runtime.tools.avrdude.path=/home/mroavi/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17\",\n      \"runtime.tools.ctags-5.8-arduino11.path=/home/mroavi/.arduino15/packages/builtin/tools/ctags/5.8-arduino11\",\n      \"runtime.tools.ctags.path=/home/mroavi/.arduino15/packages/builtin/tools/ctags/5.8-arduino11\",\n      \"runtime.tools.dfu-discovery-0.1.2.path=/home/mroavi/.arduino15/packages/builtin/tools/dfu-discovery/0.1.2\",\n      \"runtime.tools.dfu-discovery.path=/home/mroavi/.arduino15/packages/builtin/tools/dfu-discovery/0.1.2\",\n      \"runtime.tools.mdns-discovery-1.0.9.path=/home/mroavi/.arduino15/packages/builtin/tools/mdns-discovery/1.0.9\",\n      \"runtime.tools.mdns-discovery.path=/home/mroavi/.arduino15/packages/builtin/tools/mdns-discovery/1.0.9\",\n      \"runtime.tools.serial-discovery-1.4.0.path=/home/mroavi/.arduino15/packages/builtin/tools/serial-discovery/1.4.0\",\n      \"runtime.tools.serial-discovery.path=/home/mroavi/.arduino15/packages/builtin/tools/serial-discovery/1.4.0\",\n      \"runtime.tools.serial-monitor-0.13.0.path=/home/mroavi/.arduino15/packages/builtin/tools/serial-monitor/0.13.0\",\n      \"runtime.tools.serial-monitor.path=/home/mroavi/.arduino15/packages/builtin/tools/serial-monitor/0.13.0\",\n      \"sketch_path=/home/mroavi/Dropbox/tue/phd/software/arduino/neovim-lsp-example\",\n      \"software=ARDUINO\",\n      \"tools.arduino_ota.cmd=/home/mroavi/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0/bin/arduinoOTA\",\n      \"tools.arduino_ota.upload.pattern=\\\"{cmd}\\\" -address {upload.port.address} -port {upload.port.properties.port} -sketch \\\"/tmp/arduino-language-server3627381172/fullbuild/neovim-lsp-example.ino.hex\\\" -upload {upload.port.properties.endpoint_upload} -sync {upload.port.properties.endpoint_sync} -reset {upload.port.properties.endpoint_reset} -sync_exp {upload.port.properties.sync_return}\",\n      \"tools.avrdude.bootloader.params.quiet=-q -q\",\n      \"tools.avrdude.bootloader.params.verbose=-v\",\n      \"tools.avrdude.bootloader.pattern=\\\"{cmd.path}\\\" \\\"-C{config.path}\\\" {bootloader.verbose} -patmega328p -c{protocol} {program.extra_params} \\\"-Uflash:w:/home/mroavi/.arduino15/packages/arduino/hardware/avr/1.8.6/bootloaders/optiboot/optiboot_atmega328.hex:i\\\" -Ulock:w:0x0F:m\",\n      \"tools.avrdude.cmd.path={path}/bin/avrdude\",\n      \"tools.avrdude.config.path={path}/etc/avrdude.conf\",\n      \"tools.avrdude.erase.params.quiet=-q -q\",\n      \"tools.avrdude.erase.params.verbose=-v\",\n      \"tools.avrdude.erase.pattern=\\\"{cmd.path}\\\" \\\"-C{config.path}\\\" {erase.verbose} -patmega328p -c{protocol} {program.extra_params} -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m\",\n      \"tools.avrdude.network_cmd=/home/mroavi/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0/bin/arduinoOTA\",\n      \"tools.avrdude.path=/home/mroavi/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17\",\n      \"tools.avrdude.program.params.noverify=-V\",\n      \"tools.avrdude.program.params.quiet=-q -q\",\n      \"tools.avrdude.program.params.verbose=-v\",\n      \"tools.avrdude.program.pattern=\\\"{cmd.path}\\\" \\\"-C{config.path}\\\" {program.verbose} {program.verify} -patmega328p -c{protocol} {program.extra_params} \\\"-Uflash:w:/tmp/arduino-language-server3627381172/fullbuild/neovim-lsp-example.ino.hex:i\\\"\",\n      \"tools.avrdude.program.verify=\",\n      \"tools.avrdude.upload.network_pattern=\\\"{network_cmd}\\\" -address {serial.port} -port {upload.network.port} -sketch \\\"/tmp/arduino-language-server3627381172/fullbuild/neovim-lsp-example.ino.hex\\\" -upload {upload.network.endpoint_upload} -sync {upload.network.endpoint_sync} -reset {upload.network.endpoint_reset} -sync_exp {upload.network.sync_return}\",\n      \"tools.avrdude.upload.params.noverify=-V\",\n      \"tools.avrdude.upload.params.quiet=-q -q\",\n      \"tools.avrdude.upload.params.verbose=-v\",\n      \"tools.avrdude.upload.pattern=\\\"{cmd.path}\\\" \\\"-C{config.path}\\\" {upload.verbose} {upload.verify} -patmega328p -carduino \\\"-P{serial.port}\\\" -b115200 -D \\\"-Uflash:w:/tmp/arduino-language-server3627381172/fullbuild/neovim-lsp-example.ino.hex:i\\\"\",\n      \"tools.avrdude.upload.verify=\",\n      \"tools.avrdude_remote.upload.pattern=/usr/bin/run-avrdude /tmp/sketch.hex {upload.verbose} -patmega328p\",\n      \"upload.maximum_data_size=2048\",\n      \"upload.maximum_size=32256\",\n      \"upload.protocol=arduino\",\n      \"upload.speed=115200\",\n      \"upload.tool=avrdude\",\n      \"upload.tool.default=avrdude\",\n      \"upload.tool.network=arduino_ota\",\n      \"upload_port.0.pid=0x0043\",\n      \"upload_port.0.vid=0x2341\",\n      \"upload_port.1.pid=0x0001\",\n      \"upload_port.1.vid=0x2341\",\n      \"upload_port.2.pid=0x0043\",\n      \"upload_port.2.vid=0x2A03\",\n      \"upload_port.3.pid=0x0243\",\n      \"upload_port.3.vid=0x2341\",\n      \"upload_port.4.pid=0x006A\",\n      \"upload_port.4.vid=0x2341\",\n      \"upload_port.5.board=uno\",\n      \"version=1.8.6\",\n      \"vid.0=0x2341\",\n      \"vid.1=0x2341\",\n      \"vid.2=0x2A03\",\n      \"vid.3=0x2341\",\n      \"vid.4=0x2341\"\n    ]\n  },\n  \"upload_result\": null,\n  \"success\": true\n}\n\27[0m\n"
[ERROR][2024-05-08 19:24:18] .../vim/lsp/rpc.lua:734	"rpc"	"arduino-language-server"	"stderr"	"19:24:18.848281 \27[96mINIT --- : Updated 'libraries.cache'. Copied: /tmp/arduino-language-server3627381172/fullbuild/libraries.cache to /tmp/arduino-language-server3627381172/build/libraries.cache\27[0m\n19:24:18.848290 \27[96mINIT --- : \27[93mread-locked\27[0m\27[0m\n19:24:18.848296 \27[96mINIT --- : \27[93mread-unlocked\27[0m\27[0m\n19:24:18.848345 \27[96mINIT --- : running: /bin/arduino-cli --config-file /home/mroavi/.arduino15/arduino-cli.yaml compile --fqbn  --only-compilation-database --source-override /tmp/1887009348 --build-path /tmp/arduino-language-server3627381172/build --format json --skip-libraries-discovery /home/mroavi/Dropbox/tue/phd/software/arduino/neovim-lsp-example\27[0m\n"
[ERROR][2024-05-08 19:24:19] .../vim/lsp/rpc.lua:734	"rpc"	"arduino-language-server"	"stderr"	"19:24:20.003195 \27[96mINIT --- : arduino-cli output: {\n  \"compiler_out\": \"\",\n  \"compiler_err\": \"\",\n  \"builder_result\": {\n    \"build_path\": \"/tmp/arduino-language-server3627381172/build\",\n    \"board_platform\": {\n      \"id\": \"arduino:avr\",\n      \"version\": \"1.8.6\",\n      \"install_dir\": \"/home/mroavi/.arduino15/packages/arduino/hardware/avr/1.8.6\"\n    },\n    \"build_platform\": {\n      \"id\": \"arduino:avr\",\n      \"version\": \"1.8.6\",\n      \"install_dir\": \"/home/mroavi/.arduino15/packages/arduino/hardware/avr/1.8.6\"\n    },\n    \"build_properties\": [\n      \"_id=uno\",\n      \"archive_file_path=/tmp/arduino-language-server3627381172/build/{archive_file}\",\n      \"bootloader.extended_fuses=0xFD\",\n      \"bootloader.file=optiboot/optiboot_atmega328.hex\",\n      \"bootloader.high_fuses=0xDE\",\n      \"bootloader.lock_bits=0x0F\",\n      \"bootloader.low_fuses=0xFF\",\n      \"bootloader.tool=avrdude\",\n      \"bootloader.tool.default=avrdude\",\n      \"bootloader.unlock_bits=0x3F\",\n      \"build.arch=AVR\",\n      \"build.board=AVR_UNO\",\n      \"build.core=arduino\",\n      \"build.core.path=/home/mroavi/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino\",\n      \"build.extra_flags=\",\n      \"build.f_cpu=16000000L\",\n      \"build.fqbn=arduino:avr:uno\",\n      \"build.library_discovery_phase=0\",\n      \"build.mcu=atmega328p\",\n      \"build.path=/tmp/arduino-language-server3627381172/build\",\n      \"build.project_name=neovim-lsp-example.ino\",\n      \"build.source.path=/home/mroavi/Dropbox/tue/phd/software/arduino/neovim-lsp-example\",\n      \"build.system.path=/home/mroavi/.arduino15/packages/arduino/hardware/avr/1.8.6/system\",\n      \"build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER=\\\"Unknown\\\"' '-DUSB_PRODUCT={build.usb_product}'\",\n      \"build.usb_manufacturer=\\\"Unknown\\\"\",\n      \"build.variant=standard\",\n      \"build.variant.path=/home/mroavi/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard\",\n      \"compiler.S.extra_flags=\",\n      \"compiler.S.flags=-c -g -x assembler-with-cpp -flto -MMD\",\n      \"compiler.ar.cmd=avr-gcc-ar\",\n      \"compiler.ar.extra_flags=\",\n      \"compiler.ar.flags=rcs\",\n      \"compiler.c.cmd=avr-gcc\",\n      \"compiler.c.elf.cmd=avr-gcc\",\n      \"compiler.c.elf.extra_flags=\",\n      \"compiler.c.elf.flags=-w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections\",\n      \"compiler.c.extra_flags=\",\n      \"compiler.c.flags=-c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects\",\n      \"compiler.cpp.cmd=avr-g++\",\n      \"compiler.cpp.extra_flags=\",\n      \"compiler.cpp.flags=-c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto\",\n      \"compiler.elf2hex.cmd=avr-objcopy\",\n      \"compiler.elf2hex.extra_flags=\",\n      \"compiler.elf2hex.flags=-O ihex -R .eeprom\",\n      \"compiler.ldflags=\",\n      \"compiler.libraries.ldflags=\",\n      \"compiler.objcopy.cmd=avr-objcopy\",\n      \"compiler.objcopy.eep.extra_flags=\",\n      \"compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0\",\n      \"compiler.path=/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/\",\n      \"compiler.size.cmd=avr-size\",\n      \"compiler.warning_flags=-w\",\n      \"compiler.warning_flags.all=-Wall -Wextra\",\n      \"compiler.warning_flags.default=\",\n      \"compiler.warning_flags.more=-Wall\",\n      \"compiler.warning_flags.none=-w\",\n      \"extra.time.dst=3600\",\n      \"extra.time.local=1715196259\",\n      \"extra.time.utc=1715189059\",\n      \"extra.time.zone=3600\",\n      \"ide_version=10607\",\n      \"name=Arduino Uno\",\n      \"pid.0=0x0043\",\n      \"pid.1=0x0001\",\n      \"pid.2=0x0043\",\n      \"pid.3=0x0243\",\n      \"pid.4=0x006A\",\n      \"pluggable_discovery.required.0=builtin:serial-discovery\",\n      \"pluggable_discovery.required.1=builtin:mdns-discovery\",\n      \"pluggable_monitor.required.serial=builtin:serial-monitor\",\n      \"preproc.includes.flags=-w -x c++ -M -MG -MP\",\n      \"preproc.macros.flags=-w -x c++ -E -CC\",\n      \"recipe.S.o.pattern=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc\\\" -c -g -x assembler-with-cpp -flto -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   {includes} \\\"{source_file}\\\" -o \\\"{object_file}\\\"\",\n      \"recipe.ar.pattern=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc-ar\\\" rcs  \\\"/tmp/arduino-language-server3627381172/build/{archive_file}\\\" \\\"{object_file}\\\"\",\n      \"recipe.c.combine.pattern=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc\\\" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p   -o \\\"/tmp/arduino-language-server3627381172/build/neovim-lsp-example.ino.elf\\\" {object_files}  \\\"/tmp/arduino-language-server3627381172/build/{archive_file}\\\" \\\"-L/tmp/arduino-language-server3627381172/build\\\" -lm\",\n      \"recipe.c.o.pattern=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc\\\" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   {includes} \\\"{source_file}\\\" -o \\\"{object_file}\\\"\",\n      \"recipe.cpp.o.pattern=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++\\\" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   {includes} \\\"{source_file}\\\" -o \\\"{object_file}\\\"\",\n      \"recipe.objcopy.eep.pattern=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy\\\" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0  \\\"/tmp/arduino-language-server3627381172/build/neovim-lsp-example.ino.elf\\\" \\\"/tmp/arduino-language-server3627381172/build/neovim-lsp-example.ino.eep\\\"\",\n      \"recipe.objcopy.hex.pattern=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy\\\" -O ihex -R .eeprom  \\\"/tmp/arduino-language-server3627381172/build/neovim-lsp-example.ino.elf\\\" \\\"/tmp/arduino-language-server3627381172/build/neovim-lsp-example.ino.hex\\\"\",\n      \"recipe.output.save_file=neovim-lsp-example.ino.standard.hex\",\n      \"recipe.output.tmp_file=neovim-lsp-example.ino.hex\",\n      \"recipe.preproc.includes=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++\\\" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -w -x c++ -M -MG -MP -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   {includes} \\\"{source_file}\\\"\",\n      \"recipe.preproc.macros=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++\\\" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   {includes} \\\"{source_file}\\\" -o \\\"{preprocessed_file_path}\\\"\",\n      \"recipe.size.pattern=\\\"/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-size\\\" -A \\\"/tmp/arduino-language-server3627381172/build/neovim-lsp-example.ino.elf\\\"\",\n      \"recipe.size.regex=^(?:\\\\.text|\\\\.data|\\\\.bootloader)\\\\s+([0-9]+).*\",\n      \"recipe.size.regex.data=^(?:\\\\.data|\\\\.bss|\\\\.noinit)\\\\s+([0-9]+).*\",\n      \"recipe.size.regex.eeprom=^(?:\\\\.eeprom)\\\\s+([0-9]+).*\",\n      \"runtime.hardware.path=/home/mroavi/.arduino15/packages/arduino/hardware/avr\",\n      \"runtime.ide.path=/usr/bin\",\n      \"runtime.ide.version=10607\",\n      \"runtime.os=linux\",\n      \"runtime.platform.path=/home/mroavi/.arduino15/packages/arduino/hardware/avr/1.8.6\",\n      \"runtime.tools.arduinoOTA-1.3.0.path=/home/mroavi/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0\",\n      \"runtime.tools.arduinoOTA.path=/home/mroavi/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0\",\n      \"runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7\",\n      \"runtime.tools.avr-gcc.path=/home/mroavi/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7\",\n      \"runtime.tools.avrdude-6.3.0-arduino17.path=/home/mroavi/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17\",\n      \"runtime.tools.avrdude.path=/home/mroavi/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17\",\n      \"runtime.tools.ctags-5.8-arduino11.path=/home/mroavi/.arduino15/packages/builtin/tools/ctags/5.8-arduino11\",\n      \"runtime.tools.ctags.path=/home/mroavi/.arduino15/packages/builtin/tools/ctags/5.8-arduino11\",\n      \"runtime.tools.dfu-discovery-0.1.2.path=/home/mroavi/.arduino15/packages/builtin/tools/dfu-discovery/0.1.2\",\n      \"runtime.tools.dfu-discovery.path=/home/mroavi/.arduino15/packages/builtin/tools/dfu-discovery/0.1.2\",\n      \"runtime.tools.mdns-discovery-1.0.9.path=/home/mroavi/.arduino15/packages/builtin/tools/mdns-discovery/1.0.9\",\n      \"runtime.tools.mdns-discovery.path=/home/mroavi/.arduino15/packages/builtin/tools/mdns-discovery/1.0.9\",\n      \"runtime.tools.serial-discovery-1.4.0.path=/home/mroavi/.arduino15/packages/builtin/tools/serial-discovery/1.4.0\",\n      \"runtime.tools.serial-discovery.path=/home/mroavi/.arduino15/packages/builtin/tools/serial-discovery/1.4.0\",\n      \"runtime.tools.serial-monitor-0.13.0.path=/home/mroavi/.arduino15/packages/builtin/tools/serial-monitor/0.13.0\",\n      \"runtime.tools.serial-monitor.path=/home/mroavi/.arduino15/packages/builtin/tools/serial-monitor/0.13.0\",\n      \"sketch_path=/home/mroavi/Dropbox/tue/phd/software/arduino/neovim-lsp-example\",\n      \"software=ARDUINO\",\n      \"tools.arduino_ota.cmd=/home/mroavi/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0/bin/arduinoOTA\",\n      \"tools.arduino_ota.upload.pattern=\\\"{cmd}\\\" -address {upload.port.address} -port {upload.port.properties.port} -sketch \\\"/tmp/arduino-language-server3627381172/build/neovim-lsp-example.ino.hex\\\" -upload {upload.port.properties.endpoint_upload} -sync {upload.port.properties.endpoint_sync} -reset {upload.port.properties.endpoint_reset} -sync_exp {upload.port.properties.sync_return}\",\n      \"tools.avrdude.bootloader.params.quiet=-q -q\",\n      \"tools.avrdude.bootloader.params.verbose=-v\",\n      \"tools.avrdude.bootloader.pattern=\\\"{cmd.path}\\\" \\\"-C{config.path}\\\" {bootloader.verbose} -patmega328p -c{protocol} {program.extra_params} \\\"-Uflash:w:/home/mroavi/.arduino15/packages/arduino/hardware/avr/1.8.6/bootloaders/optiboot/optiboot_atmega328.hex:i\\\" -Ulock:w:0x0F:m\",\n      \"tools.avrdude.cmd.path={path}/bin/avrdude\",\n      \"tools.avrdude.config.path={path}/etc/avrdude.conf\",\n      \"tools.avrdude.erase.params.quiet=-q -q\",\n      \"tools.avrdude.erase.params.verbose=-v\",\n      \"tools.avrdude.erase.pattern=\\\"{cmd.path}\\\" \\\"-C{config.path}\\\" {erase.verbose} -patmega328p -c{protocol} {program.extra_params} -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m\",\n      \"tools.avrdude.network_cmd=/home/mroavi/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0/bin/arduinoOTA\",\n      \"tools.avrdude.path=/home/mroavi/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17\",\n      \"tools.avrdude.program.params.noverify=-V\",\n      \"tools.avrdude.program.params.quiet=-q -q\",\n      \"tools.avrdude.program.params.verbose=-v\",\n      \"tools.avrdude.program.pattern=\\\"{cmd.path}\\\" \\\"-C{config.path}\\\" {program.verbose} {program.verify} -patmega328p -c{protocol} {program.extra_params} \\\"-Uflash:w:/tmp/arduino-language-server3627381172/build/neovim-lsp-example.ino.hex:i\\\"\",\n      \"tools.avrdude.program.verify=\",\n      \"tools.avrdude.upload.network_pattern=\\\"{network_cmd}\\\" -address {serial.port} -port {upload.network.port} -sketch \\\"/tmp/arduino-language-server3627381172/build/neovim-lsp-example.ino.hex\\\" -upload {upload.network.endpoint_upload} -sync {upload.network.endpoint_sync} -reset {upload.network.endpoint_reset} -sync_exp {upload.network.sync_return}\",\n      \"tools.avrdude.upload.params.noverify=-V\",\n      \"tools.avrdude.upload.params.quiet=-q -q\",\n      \"tools.avrdude.upload.params.verbose=-v\",\n      \"tools.avrdude.upload.pattern=\\\"{cmd.path}\\\" \\\"-C{config.path}\\\" {upload.verbose} {upload.verify} -patmega328p -carduino \\\"-P{serial.port}\\\" -b115200 -D \\\"-Uflash:w:/tmp/arduino-language-server3627381172/build/neovim-lsp-example.ino.hex:i\\\"\",\n      \"tools.avrdude.upload.verify=\",\n      \"tools.avrdude_remote.upload.pattern=/usr/bin/run-avrdude /tmp/sketch.hex {upload.verbose} -patmega328p\",\n      \"upload.maximum_data_size=2048\",\n      \"upload.maximum_size=32256\",\n      \"upload.protocol=arduino\",\n      \"upload.speed=115200\",\n      \"upload.tool=avrdude\",\n      \"upload.tool.default=avrdude\",\n      \"upload.tool.network=arduino_ota\",\n      \"upload_port.0.pid=0x0043\",\n      \"upload_port.0.vid=0x2341\",\n      \"upload_port.1.pid=0x0001\",\n      \"upload_port.1.vid=0x2341\",\n      \"upload_port.2.pid=0x0043\",\n      \"upload_port.2.vid=0x2A03\",\n      \"upload_port.3.pid=0x0243\",\n      \"upload_port.3.vid=0x2341\",\n      \"upload_port.4.pid=0x006A\",\n      \"upload_port.4.vid=0x2341\",\n      \"upload_port.5.board=uno\",\n      \"version=1.8.6\",\n      \"vid.0=0x2341\",\n      \"vid.1=0x2341\",\n      \"vid.2=0x2A03\",\n      \"vid.3=0x2341\",\n      \"vid.4=0x2341\"\n    ]\n  },\n  \"upload_result\": null,\n  \"success\": true\n}\n\27[0m\n"
[ERROR][2024-05-08 19:24:20] .../vim/lsp/rpc.lua:734	"rpc"	"arduino-language-server"	"stderr"	"19:24:20.007136 \27[96mINIT --- : running: /bin/arduino-cli --config-file /home/mroavi/.arduino15/arduino-cli.yaml config dump --format json\27[0m\n"
[ERROR][2024-05-08 19:24:20] .../vim/lsp/rpc.lua:734	"rpc"	"arduino-language-server"	"stderr"	"19:24:20.019640 \27[96mINIT --- : Arduino Data Dir -> /home/mroavi/.arduino15\27[0m\n"
[ERROR][2024-05-08 19:24:20] .../vim/lsp/rpc.lua:734	"rpc"	"arduino-language-server"	"stderr"	"19:24:20.019694 \27[96mINIT --- :     Starting clangd: /home/mroavi/.local/share/nvim/mason/packages/clangd/clangd_17.0.3/bin/clangd -log=verbose --pch-storage=memory --compile-commands-dir=/tmp/arduino-language-server3627381172/build -j 1 -query-driver=/home/mroavi/.arduino15/packages/**\27[0m\n"
[ERROR][2024-05-08 19:24:20] .../vim/lsp/rpc.lua:734	"rpc"	"arduino-language-server"	"stderr"	"19:24:20.019958 Panic: running clangd: fork/exec /home/mroavi/.local/share/nvim/mason/packages/clangd/clangd_17.0.3/bin/clangd: no such file or directory\n\ngoroutine 34 [running]:\nruntime/debug.Stack()\n\t/usr/local/go/src/runtime/debug/stack.go:24 +0x65\ngithub.com/arduino/arduino-language-server/streams.CatchAndLogPanic()\n\t/home/build/streams/panics.go:29 +0x74\npanic({0xa36500, 0xc0001b4c90})\n\t/usr/local/go/src/runtime/panic.go:844 +0x258\ngithub.com/arduino/arduino-language-server/ls.newClangdLSPClient({0xc45e20, 0xc000400000}, 0xc0001b4ac0, 0xc0001c2300)\n\t/home/build/ls/lsp_client_clangd.go:86 +0xea5\ngithub.com/arduino/arduino-language-server/ls.(*INOLanguageServer).initializeReqFromIDE.func1()\n\t/home/build/ls/ls.go:222 +0x428\ncreated by github.com/arduino/arduino-language-server/ls.(*INOLanguageServer).initializeReqFromIDE\n\t/home/build/ls/ls.go:189 +0x20a\n\n"
[ERROR][2024-05-08 19:24:20] .../vim/lsp/rpc.lua:734	"rpc"	"arduino-language-server"	"stderr"	"19:24:20.020043 \27[92m                 textDocument/didOpen: \27[93mlocked (waiting clangd)\27[0m\27[0m\n19:24:20.020054 \27[92m                 textDocument/didOpen: clangd startup failed: quitting Language server\27[0m\n"

@mroavi
Copy link

mroavi commented May 8, 2024

I finally fixed my problem. When I updated the LSPs installed in my Mason setup, clangd was updated, and the path to its executable changed. I updated it to the new path, and everything works fine now. Sorry for the noise. The problem I was having is different from the one that the OP described. I assumed it was the same since we both experienced the issue on the exact same day. My mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants