valentjn / vscode-ltex

LTeX: Grammar/spell checker :mag::heavy_check_mark: for VS Code using LanguageTool with support for LaTeX :mortar_board:, Markdown :pencil:, and others
https://valentjn.github.io/ltex
Mozilla Public License 2.0
817 stars 29 forks source link

Can not run ltex remotely on Raspberry Pi with Ubuntu #853

Open mgorfer opened 1 year ago

mgorfer commented 1 year ago

Enter a summary of the issue in the title field above and replace this sentence with the bug report from your clipboard.Describe the bug A clear and concise description of what the bug is.

Steps to reproduce Steps to reproduce the behavior:

  1. Use VSCode Remote to connect via ssh to my Raspberry Pi running Ubuntu.
  2. Open a .md file
  3. ltex tries to load but fails with ltex-ls terminated with non-zero exit code 126.

Deleting all VSCode files on my Raspberry Pi and reinstalling all extensions clean did not solve the problem.

If I manually call ubuntu@ubuntu:~$ /home/ubuntu/.vscode-server/extensions/valentjn.vscode-ltex-13.1.0/lib/ltex-ls-15.2.0/bin/ltex-ls --version I get {"ltex-ls": "15.2.0", "java": "17.0.8.1"}.

When I do this on my Laptop with Manjaro Linux. /home/user/.vscode/extensions/valentjn.vscode-ltex-13.1.0/lib/ltex-ls-15.2.0/bin/ltex-ls --version I get {"ltex-ls": "15.2.0", "java": "11.0.12"}.

Expected behavior Ltex starts and shows me the spell checking in my .md file. It works fine locally on my Laptop with Manjaro Linux and also remotely on other Servers running Linux.

Sample document If the bug occurs for a specific document (e.g. LaTeX), please paste it here. If your document is very long or confidential, please create and attach a smaller example for which the bug still occurs so that we can reproduce it.

```markdown # Header This is an mistake. The bananas is tasty. We look forward to welcome you. Are human beings any different than animals? ```

LTeX configuration Please paste all configuration settings starting with ltex. from your settings.json. You can help us by temporarily removing some irrelevant settings from your settings.json and see if the bug still occurs.

``` { "enabled": [ "bibtex", "context", "context.tex", "html", "latex", "markdown", "org", "restructuredtext", "rsweave", "python", "dockercompose", "python" ], "language": "en-US", "dictionary": {}, "disabledRules": {}, "enabledRules": {}, "hiddenFalsePositives": {}, "bibtex": { "fields": {} }, "latex": { "commands": {}, "environments": {} }, "markdown": { "nodes": {} }, "configurationTarget": { "dictionary": "workspaceFolderExternalFile", "disabledRules": "workspaceFolderExternalFile", "hiddenFalsePositives": "workspaceFolderExternalFile" }, "additionalRules": { "enablePickyRules": false, "motherTongue": "de-AT", "languageModel": "", "neuralNetworkModel": "", "word2VecModel": "" }, "ltex-ls": { "path": "", "logLevel": "fine", "languageToolHttpServerUri": "", "languageToolOrgUsername": "", "languageToolOrgApiKey": "" }, "java": { "path": "", "initialHeapSize": 64, "maximumHeapSize": 512 }, "sentenceCacheSize": 2000, "completionEnabled": false, "diagnosticSeverity": "information", "checkFrequency": "edit", "clearDiagnosticsWhenClosingFile": true, "statusBarItem": false, "trace": { "server": "verbose" } } ```

"LTeX Language Server" log file First, reproduce the bug. Then, go to ViewOutput and select LTeX Language Server in the drop-down list. Paste this log here:

The server does not start, so I have no log file here.

"LTeX Language Client" log file First, set the ltex.trace.server setting in your settings.json to "verbose". Then, reload the VS Code window and reproduce the bug. Go to ViewOutput and select LTeX Language Client in the drop-down list. Paste this log here (note: it will contain your checked document):

``` 2023-09-15T10:18:11.575Z Info: Setting LTeX UI language to 'en'. 2023-09-15T10:18:11.577Z Info: Loading i18n messages... 2023-09-15T10:18:11.582Z Info: Loading default i18n messages... 2023-09-15T10:18:11.611Z Info: 2023-09-15T10:18:11.613Z Info: ltex.ltex-ls.path not set. 2023-09-15T10:18:11.615Z Info: Searching for ltex-ls in '/home/ubuntu/.vscode-server/extensions/valentjn.vscode-ltex-13.1.0/lib'... 2023-09-15T10:18:11.618Z Info: ltex-ls found in '/home/ubuntu/.vscode-server/extensions/valentjn.vscode-ltex-13.1.0/lib/ltex-ls-15.2.0'. 2023-09-15T10:18:11.618Z Info: 2023-09-15T10:18:11.619Z Info: Using ltex-ls from '/home/ubuntu/.vscode-server/extensions/valentjn.vscode-ltex-13.1.0/lib/ltex-ls-15.2.0'. 2023-09-15T10:18:11.619Z Info: Using Java bundled with ltex-ls as ltex.java.path is not set. 2023-09-15T10:18:11.819Z Info: Testing ltex-ls... 2023-09-15T10:18:11.820Z Info: Command: "/home/ubuntu/.vscode-server/extensions/valentjn.vscode-ltex-13.1.0/lib/ltex-ls-15.2.0/bin/ltex-ls" 2023-09-15T10:18:11.821Z Info: Arguments: ["--version"] 2023-09-15T10:18:11.821Z Info: env['JAVA_HOME']: undefined 2023-09-15T10:18:11.821Z Info: env['JAVA_OPTS']: "-Xms64m -Xmx512m" 2023-09-15T10:18:12.430Z Error: Test failed. 2023-09-15T10:18:12.431Z Error: Error details: 2023-09-15T10:18:12.431Z Info: ltex-ls terminated with non-zero exit code 126. 2023-09-15T10:18:12.431Z Info: stdout of ltex-ls: 2023-09-15T10:18:12.431Z Info: 2023-09-15T10:18:12.431Z Info: stderr of ltex-ls: 2023-09-15T10:18:12.431Z Info: /home/ubuntu/.vscode-server/extensions/valentjn.vscode-ltex-13.1.0/lib/ltex-ls-15.2.0/bin/ltex-ls: 121: exec: /home/ubuntu/.vscode-server/extensions/valentjn.vscode-ltex-13.1.0/lib/ltex-ls-15.2.0/jdk-11.0.12+7/bin/java: Exec format error 2023-09-15T10:18:12.431Z Info: 2023-09-15T10:18:12.434Z Info: You might want to try offline installation, see https://valentjn.github.io/vscode-ltex/docs/installation-and-usage.html#offline-installation. 2023-09-15T10:19:46.943Z Info: Creating bug report... 2023-09-15T10:19:46.945Z Info: LTeX Status 2023-09-15T10:19:46.945Z Info: ---------------------------------------- 2023-09-15T10:19:46.945Z Info: Info about vscode-ltex: 2023-09-15T10:19:46.945Z Info: - Path to extension directory: /home/ubuntu/.vscode-server/extensions/valentjn.vscode-ltex-13.1.0 2023-09-15T10:19:46.946Z Info: - Path to directory with LTeX user settings (global storage directory): /home/ubuntu/.vscode-server/data/User/globalStorage/valentjn.vscode-ltex 2023-09-15T10:19:46.946Z Info: - Path to directory with LTeX workspace settings (for the currently opened workspace): /home/ubuntu/.vscode 2023-09-15T10:19:46.947Z Info: - Path to directory with LTeX workspace folder settings (for the workspace folder of the currently active text editor): /home/ubuntu/.vscode 2023-09-15T10:19:46.947Z Info: - Version: 13.1.0 2023-09-15T10:19:46.947Z Info: Info about ltex-ls: 2023-09-15T10:19:46.948Z Info: - Version: n/a 2023-09-15T10:19:46.948Z Info: - Process ID: n/a 2023-09-15T10:19:46.948Z Info: - Wall clock duration: n/a 2023-09-15T10:19:46.948Z Info: - CPU duration: n/a 2023-09-15T10:19:46.948Z Info: - CPU usage: n/a 2023-09-15T10:19:46.949Z Info: - Total allocated memory: n/a 2023-09-15T10:19:46.949Z Info: - Used memory: n/a 2023-09-15T10:19:46.949Z Info: - Is busy checking: n/a 2023-09-15T10:19:46.949Z Info: - Document URI being checked: n/a 2023-09-15T10:19:46.949Z Info: Currently watched external setting files: n/a 2023-09-15T10:19:46.949Z Info: ---------------------------------------- 2023-09-15T10:20:56.218Z Info: Creating bug report... 2023-09-15T10:20:56.219Z Info: LTeX Status 2023-09-15T10:20:56.219Z Info: ---------------------------------------- 2023-09-15T10:20:56.219Z Info: Info about vscode-ltex: 2023-09-15T10:20:56.219Z Info: - Path to extension directory: /home/ubuntu/.vscode-server/extensions/valentjn.vscode-ltex-13.1.0 2023-09-15T10:20:56.219Z Info: - Path to directory with LTeX user settings (global storage directory): /home/ubuntu/.vscode-server/data/User/globalStorage/valentjn.vscode-ltex 2023-09-15T10:20:56.220Z Info: - Path to directory with LTeX workspace settings (for the currently opened workspace): /home/ubuntu/.vscode 2023-09-15T10:20:56.220Z Info: - Path to directory with LTeX workspace folder settings (for the workspace folder of the currently active text editor): /home/ubuntu/.vscode 2023-09-15T10:20:56.220Z Info: - Version: 13.1.0 2023-09-15T10:20:56.220Z Info: Info about ltex-ls: 2023-09-15T10:20:56.220Z Info: - Version: n/a 2023-09-15T10:20:56.220Z Info: - Process ID: n/a 2023-09-15T10:20:56.220Z Info: - Wall clock duration: n/a 2023-09-15T10:20:56.220Z Info: - CPU duration: n/a 2023-09-15T10:20:56.220Z Info: - CPU usage: n/a 2023-09-15T10:20:56.220Z Info: - Total allocated memory: n/a 2023-09-15T10:20:56.220Z Info: - Used memory: n/a 2023-09-15T10:20:56.220Z Info: - Is busy checking: n/a 2023-09-15T10:20:56.220Z Info: - Document URI being checked: n/a 2023-09-15T10:20:56.221Z Info: Currently watched external setting files: n/a 2023-09-15T10:20:56.221Z Info: ---------------------------------------- 2023-09-15T10:21:02.933Z Info: Creating bug report... 2023-09-15T10:21:02.933Z Info: LTeX Status 2023-09-15T10:21:02.933Z Info: ---------------------------------------- 2023-09-15T10:21:02.933Z Info: Info about vscode-ltex: 2023-09-15T10:21:02.933Z Info: - Path to extension directory: /home/ubuntu/.vscode-server/extensions/valentjn.vscode-ltex-13.1.0 2023-09-15T10:21:02.933Z Info: - Path to directory with LTeX user settings (global storage directory): /home/ubuntu/.vscode-server/data/User/globalStorage/valentjn.vscode-ltex 2023-09-15T10:21:02.933Z Info: - Path to directory with LTeX workspace settings (for the currently opened workspace): /home/ubuntu/.vscode 2023-09-15T10:21:02.934Z Info: - Path to directory with LTeX workspace folder settings (for the workspace folder of the currently active text editor): /home/ubuntu/.vscode 2023-09-15T10:21:02.934Z Info: - Version: 13.1.0 2023-09-15T10:21:02.934Z Info: Info about ltex-ls: 2023-09-15T10:21:02.934Z Info: - Version: n/a 2023-09-15T10:21:02.934Z Info: - Process ID: n/a 2023-09-15T10:21:02.934Z Info: - Wall clock duration: n/a 2023-09-15T10:21:02.934Z Info: - CPU duration: n/a 2023-09-15T10:21:02.934Z Info: - CPU usage: n/a 2023-09-15T10:21:02.934Z Info: - Total allocated memory: n/a 2023-09-15T10:21:02.934Z Info: - Used memory: n/a 2023-09-15T10:21:02.934Z Info: - Is busy checking: n/a 2023-09-15T10:21:02.934Z Info: - Document URI being checked: n/a 2023-09-15T10:21:02.934Z Info: Currently watched external setting files: n/a 2023-09-15T10:21:02.934Z Info: ---------------------------------------- ```

Version information List here the version information of the relevant software.

Additional context/information You can add any other context or information about the problem here.

knjmooney commented 1 year ago

Probably because the raspberry pi is Arm64.

I worked around it by downloading and unpacking the compressed archive of JDK 21 and setting

"ltex.java.path": "/path/to/jdk-21"

Downloads of Java are here https://www.oracle.com/java/technologies/downloads/