-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
No longer runs on Windows #884
Comments
Same issue here. Thanks for the pointer, never coded JS before but I was able to fix my local installation with the following changes to --- a/extension.js.old
+++ b/extension.js
@@ -13516,6 +13516,7 @@ class DependencyManager {
const executableOptions = {
encoding: 'utf-8',
timeout: 15000,
+ shell: true
};
if (executable.options != null) {
executableOptions.cwd = executable.options.cwd;
@@ -13615,6 +13616,7 @@ class DependencyManager {
const executableOptions = {
encoding: 'utf-8',
timeout: 15000,
+ shell: true
};
const childProcess = ((process.platform == 'win32')
? ChildProcess.spawnSync('wmic', ['process', 'list', 'FULL'], executableOptions)
@@ -24684,7 +24686,9 @@ class LanguageClient extends commonClient_1.CommonLanguageClient {
if (node.args) {
node.args.forEach(element => args.push(element));
}
- const execOptions = Object.create(null);
+ const execOptions = {
+ shell: true
+ };
execOptions.cwd = serverWorkingDir;
execOptions.env = getEnvironment(options.env, false);
const runtime = this._getRuntimePath(node.runtime, serverWorkingDir);
@@ -24817,6 +24821,7 @@ class LanguageClient extends commonClient_1.CommonLanguageClient {
let args = command.args || [];
let options = Object.assign({}, command.options);
options.cwd = options.cwd || serverWorkingDir;
+ options.shell = true;
let serverProcess = cp.spawn(command.command, args, options);
if (!serverProcess || !serverProcess.pid) {
return Promise.reject(`Launching server using command ${command.command} failed.`); I'm hoping this will work until the package is properly patched. |
Thanks a lot! |
Maybe same issue with Log:
|
Same issue here. Installing an earlier version of VSCode (1.91) solves the issue. |
I tried to run the
Seems that the UTF-8 charset is not supported. |
I got a different error
|
Same Issue |
any update so far? Thanks. |
same issue |
Same issue. Updating the extensions.js file makes the error disappear. However, ltex still doesn't seem to run properly, as no errors in LaTeX documents (with deliberate typos) are detected. |
same issue |
Interesting, for me it fixes the issue and errors and warnings are properly shown. Yours might be a separate issue then. |
Same issue here, but the errors come from a different place:
The fix from @tobiscode didn't help, but still thank you! If I try to run the EDIT: After applying the fix from @tobiscode and restarting VS Code twice, it worked. |
Ran into the same issue, suggestion used by @tobiscode worked. @michens , there is an ltex-neo project that may be accepting fixes, but is currently experiencing the same issue. Currently I'm looking for an alternative that can spellcheck markdown. |
I have the same issue. I tried I thought it was a problem of Java because of the output of VSCode |
I encountered this too. Good work by michens and thanks to tobiscode for the diff to fix. |
Here's some overly detailed steps, in case it helps anyone:
Change line 13516:
to
Change line 13616:
to
Change line 24689:
to
Change line 24823:
to
|
Thank you @JakeSteam that worked! Once again, it loads up with no issues and works as intended. Life Saver! |
same issue |
I've applied the above fix locally to the
"Long Name Here" is used as a substitute for my actual Username for privacy reasons. I believe that this problem arises due to presence of whitespace in Would there be a possible workaround for this problem while waiting (hopefully) for a fix? I'm thinking that modifying the batch file itself or something in |
您好,邮件已收到,我一定尽快回复。
|
Applied the fixes stated, and while it did get past the originally posted error, there do seem to still be issues starting the local ltex server/client. Would love to see this holistically fixed in mainline. Thanks for the work so far! |
Running the batch file itself works, (so it's not referencing it's own path), meaning there is something in |
As this repo seems to be unmaintained (and neo-ltex might as well), I created a fork: |
Thank you @spitzerd! Your new fork of the LTeX extension for VSCode works for me with the latest VSCode 1.92. I confirm that the original LTeX extension gave the error described in this issue. |
This seems like an easy fix. Has anyone tried sending a pull request (PR)? |
Thank you @spitzerd for your fork keeping Ltex alive, but after installing Ltex+ this error comes up : Exception in thread "main" java.lang.UnsupportedClassVersionError: org/bsplines/ltexls/LtexLanguageServerLauncher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 Thank you anyone for advice. |
@veronidan |
Describe the bug
New versions of Node require setting "shell: true" when calling spawn/spawnSync on a .bat file such as "ltex-ls.bat".
Steps to reproduce
Run on Windows.
Expected behavior
That it works.
Sample document
N/A
LTeX configuration
N/A
"LTeX Language Server" log file
No log file created as server never starts
"LTeX Language Client" log file
2024-07-29T17:17:28.190Z Info: Setting LTeX UI language to 'en'.
2024-07-29T17:17:28.190Z Info: Loading i18n messages...
2024-07-29T17:17:28.190Z Info: Loading default i18n messages...
2024-07-29T17:17:28.194Z Info:
2024-07-29T17:17:28.194Z Info: ltex.ltex-ls.path not set.
2024-07-29T17:17:28.194Z Info: Searching for ltex-ls in 'c:\Users...'...
2024-07-29T17:17:28.194Z Info: ltex-ls found in 'c:\Users...'.
2024-07-29T17:17:28.194Z Info:
2024-07-29T17:17:28.194Z Info: Using ltex-ls from 'c:\Users...'.
2024-07-29T17:17:28.194Z Info: Using Java bundled with ltex-ls as ltex.java.path is not set.
2024-07-29T17:17:28.196Z Info: Testing ltex-ls...
2024-07-29T17:17:28.196Z Info: Command: "c:\Users\...\lib\ltex-ls-15.2.0\bin\ltex-ls.bat"
2024-07-29T17:17:28.196Z Info: Arguments: ["--version"]
2024-07-29T17:17:28.196Z Info: env['JAVA_HOME']: undefined
2024-07-29T17:17:28.196Z Info: env['JAVA_OPTS']: "-Xms64m -Xmx512m"
2024-07-29T17:17:28.196Z Error: Test failed.
2024-07-29T17:17:28.196Z Error: Error details:
2024-07-29T17:17:28.201Z Error: Error: spawnSync c:\Users...\lib\ltex-ls-15.2.0\bin\ltex-ls.bat EINVAL
2024-07-29T17:17:28.201Z Error: at Object.spawnSync (node:internal/child_process:1124:20)
2024-07-29T17:17:28.201Z Error: at Object.spawnSync (node:child_process:914:24)
2024-07-29T17:17:28.201Z Error: at DependencyManager. (c:\Users...\dist\extension.js:15912:43)
2024-07-29T17:17:28.201Z Error: at Generator.next ()
2024-07-29T17:17:28.201Z Error: at fulfilled (c:\Users...\dist\extension.js:15367:32)
2024-07-29T17:17:28.202Z Info: ltex-ls did not print expected version information to stdout.
2024-07-29T17:17:28.202Z Info: stdout of ltex-ls:
2024-07-29T17:17:28.202Z Info:
2024-07-29T17:17:28.202Z Info: stderr of ltex-ls:
2024-07-29T17:17:28.202Z Info:
2024-07-29T17:17:28.202Z Info: You might want to try offline installation, see https://valentjn.github.io/vscode-ltex/docs/installation-and-usage.html#offline-installation.
Version information
Additional context/information
Easy enough to solve by patching extension.js file locally.
See node-red/node-red@bd58431 for pattern to fix.
Will submit PR if this project is active and accepting PRs.
The text was updated successfully, but these errors were encountered: