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

arduino-language server gets stuck on "initializing languageserver.arduino" #3594

Closed
drank40 opened this issue Jan 22, 2022 · 6 comments
Closed

Comments

@drank40
Copy link

drank40 commented Jan 22, 2022

Info :

vim version: NVIM v0.6.1
node version: v17.3.0
coc.nvim version: 0.0.80-472fd14967
coc.nvim directory: /home/renny/.vim/plugged/coc.nvim
term: rxvt-unicode-256color
platform: linux

Log of coc.nvim

2022-01-22T19:33:10.375 INFO (pid:73015) [services] - registered service "languageserver.arduino"
2022-01-22T19:33:10.378 INFO (pid:73015) [services] - arduino state change: stopped => starting
2022-01-22T19:33:10.766 INFO (pid:73015) [plugin] - coc.nvim initialized with node: v17.3.0 after 432ms
2022-01-22T19:33:10.783 INFO (pid:73015) [language-client-index] - Language server "languageserver.arduino" started with 73034
2022-01-22T19:34:35.295 INFO (pid:73015) [attach] - receive notification: runCommand [ 'workspace.showOutput' ]
2022-01-22T19:34:39.294 WARN (pid:73015) [plugin] - Slow action "runCommand" cost 3998ms
2022-01-22T19:36:00.102 INFO (pid:73015) [attach] - receive notification: showInfo []

Describe the bug

If i try to open any .ino file the language server always shows "initializing languageserver.arduino" and never actually starts working. This used to work, so there must have been some sort of change recently that introduced this bug.
Im interfacing the language server with the default coc-settings.json suggested by the documentation.

Reproduce the bug

This a log provided by coc, and it seems as if the language server panics regardless of the command sent.

log.txt

A minimal nvimrc

mini.vim.txt

@chemzqm
Copy link
Member

chemzqm commented Jan 22, 2022

@drank40
Copy link
Author

drank40 commented Jan 22, 2022

I did come across that page, tho i do not exactly understand where the log of the language server is outputted. this is my current coc-settings.json

{
"languageserver":{
"arduino":{
"command":"/bin/arduino-language-server",
"trace.server": "verbose",
"initializationOptions": {
"cacheDirectory": "/tmp/ardu"
},
"rootPatterns":["*.ino"],
"filetypes":["arduino"],
"args":["-cli", "/bin/arduino-cli", "-clangd", "/bin/clangd", "-cli-config", "/home/renny/.arduino15/arduino-cli.yaml", "-fqbn", "esp8266:esp8266:generic", "-log", "/home/renny/ardu.log"]
}
}
}

@listout
Copy link

listout commented Feb 3, 2022

Don't why it's marked as 'Can't Reproduce', I'm facing the same issue. It's showing [starting] in CocList services


Log of output channel

[Trace - 11:26:54 PM] Sending request 'initialize - (0)'.
Params: {
    "processId": 14643,
    "rootPath": "/tmp/MyFirstSketch",
    "rootUri": "file:///tmp/MyFirstSketch",
    "capabilities": {
        "workspace": {
            "applyEdit": true,
            "workspaceEdit": {
                "documentChanges": true,
                "resourceOperations": [
                    "create",
                    "rename",
                    "delete"
                ],
                "failureHandling": "textOnlyTransactional"
            },
            "didChangeConfiguration": {
                "dynamicRegistration": true
            },
            "didChangeWatchedFiles": {
                "dynamicRegistration": true
            },
            "symbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25,
                        26
                    ]
                },
                "tagSupport": {
                    "valueSet": [
                        1
                    ]
                }
            },
            "codeLens": {
                "refreshSupport": true
            },
            "executeCommand": {
                "dynamicRegistration": true
            },
            "configuration": true,
            "fileOperations": {
                "dynamicRegistration": true,
                "didCreate": true,
                "didRename": true,
                "didDelete": true,
                "willCreate": true,
                "willRename": true,
                "willDelete": true
            },
            "semanticTokens": {
                "refreshSupport": true
            },
            "workspaceFolders": true
        },
        "textDocument": {
            "publishDiagnostics": {
                "relatedInformation": true,
                "versionSupport": false,
                "tagSupport": {
                    "valueSet": [
                        1,
                        2
                    ]
                }
            },
            "synchronization": {
                "dynamicRegistration": true,
                "willSave": true,
                "willSaveWaitUntil": true,
                "didSave": true
            },
            "completion": {
                "dynamicRegistration": true,
                "contextSupport": true,
                "completionItem": {
                    "snippetSupport": true,
                    "commitCharactersSupport": true,
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "deprecatedSupport": true,
                    "preselectSupport": true,
                    "insertReplaceSupport": true,
                    "tagSupport": {
                        "valueSet": [
                            1
                        ]
                    },
                    "resolveSupport": {
                        "properties": [
                            "documentation",
                            "detail",
                            "additionalTextEdits"
                        ]
                    },
                    "insertTextModeSupport": {
                        "valueSet": [
                            1,
                            2
                        ]
                    }
                },
                "completionItemKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25
                    ]
                }
            },
            "hover": {
                "dynamicRegistration": true,
                "contentFormat": [
                    "markdown",
                    "plaintext"
                ]
            },
            "signatureHelp": {
                "dynamicRegistration": true,
                "contextSupport": true,
                "signatureInformation": {
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "activeParameterSupport": true,
                    "parameterInformation": {
                        "labelOffsetSupport": true
                    }
                }
            },
            "definition": {
                "dynamicRegistration": true
            },
            "references": {
                "dynamicRegistration": true
            },
            "documentHighlight": {
                "dynamicRegistration": true
            },
            "documentSymbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25,
                        26
                    ]
                },
                "hierarchicalDocumentSymbolSupport": true,
                "tagSupport": {
                    "valueSet": [
                        1
                    ]
                }
            },
            "codeAction": {
                "dynamicRegistration": true,
                "isPreferredSupport": true,
                "disabledSupport": true,
                "dataSupport": true,
                "honorsChangeAnnotations": false,
                "resolveSupport": {
                    "properties": [
                        "edit"
                    ]
                },
                "codeActionLiteralSupport": {
                    "codeActionKind": {
                        "valueSet": [
                            "",
                            "quickfix",
                            "refactor",
                            "refactor.extract",
                            "refactor.inline",
                            "refactor.rewrite",
                            "source",
                            "source.organizeImports"
                        ]
                    }
                }
            },
            "codeLens": {
                "dynamicRegistration": true
            },
            "formatting": {
                "dynamicRegistration": true
            },
            "rangeFormatting": {
                "dynamicRegistration": true
            },
            "onTypeFormatting": {
                "dynamicRegistration": true
            },
            "rename": {
                "dynamicRegistration": true,
                "prepareSupport": true
            },
            "documentLink": {
                "dynamicRegistration": true,
                "tooltipSupport": true
            },
            "typeDefinition": {
                "dynamicRegistration": true
            },
            "implementation": {
                "dynamicRegistration": true
            },
            "declaration": {
                "dynamicRegistration": true
            },
            "colorProvider": {
                "dynamicRegistration": true
            },
            "foldingRange": {
                "dynamicRegistration": true,
                "rangeLimit": 5000,
                "lineFoldingOnly": true
            },
            "selectionRange": {
                "dynamicRegistration": true
            },
            "callHierarchy": {
                "dynamicRegistration": true
            },
            "linkedEditingRange": {
                "dynamicRegistration": true
            },
            "semanticTokens": {
                "dynamicRegistration": true,
                "tokenTypes": [
                    "namespace",
                    "type",
                    "class",
                    "enum",
                    "interface",
                    "struct",
                    "typeParameter",
                    "parameter",
                    "variable",
                    "property",
                    "enumMember",
                    "event",
                    "function",
                    "method",
                    "macro",
                    "keyword",
                    "modifier",
                    "comment",
                    "string",
                    "number",
                    "regexp",
                    "operator"
                ],
                "tokenModifiers": [
                    "declaration",
                    "definition",
                    "readonly",
                    "static",
                    "deprecated",
                    "abstract",
                    "async",
                    "modification",
                    "documentation",
                    "defaultLibrary"
                ],
                "formats": [
                    "relative"
                ],
                "requests": {
                    "range": true,
                    "full": {
                        "delta": true
                    }
                },
                "multilineTokenSupport": false,
                "overlappingTokenSupport": false
            }
        },
        "window": {
            "showMessage": {
                "messageActionItem": {
                    "additionalPropertiesSupport": false
                }
            },
            "showDocument": {
                "support": false
            },
            "workDoneProgress": true
        },
        "general": {
            "regularExpressions": {
                "engine": "ECMAScript",
                "version": "ES2020"
            },
            "markdown": {
                "parser": "marked",
                "version": "1.1.0"
            }
        }
    },
    "initializationOptions": {},
    "trace": "verbose",
    "workspaceFolders": [
        {
            "uri": "file:///tmp/MyFirstSketch",
            "name": "MyFirstSketch"
        }
    ],
    "locale": "en_US",
    "clientInfo": {
        "name": "coc.nvim",
        "version": "0.0.80"
    },
    "workDoneToken": "1dbde8c6-f56f-46e4-b24d-7d0c1136a29f"
}


2022/02/03 23:26:54 �[97mLS: : Initial board configuration: esp32:esp32:esp32�[0m
2022/02/03 23:26:54 �[97mLS: : Language server build path: /tmp/nvimxpHSwx/arduino-language-server4289281591�[0m
2022/02/03 23:26:54 �[97mLS: : Language server build sketch root: /tmp/nvimxpHSwx/arduino-language-server4289281591/sketch�[0m
2022/02/03 23:26:54 �[97mLS: : Language server compile-commands: /tmp/nvimxpHSwx/arduino-language-server4088609384/compile_commands.json�[0m
2022/02/03 23:26:54 �[92mIDE --> LS REQU initialize 0�[0m

@chemzqm
Copy link
Member

chemzqm commented Feb 3, 2022

The server doesn't send any response.

@listout
Copy link

listout commented Feb 3, 2022

Edit: probably related

So presumably the issue is with server then. Guess we can close this issue.

I'll try out other releases and see if it's an issue with current release (of the server).

@chemzqm
Copy link
Member

chemzqm commented Feb 20, 2022

Language server issue.

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

No branches or pull requests

3 participants