Closed kabel-knrd closed 3 weeks ago
valentjn#80 was solved by commit 31faf19b8c06965588fe90c55e3a832fcfaa9921, so I don't think this is the reason.
I have some questions:
Hi!
Thanks for the quick answer!
Interestingly, it seems, that after some time LTeX is more or less working. For e.g. the word VLAN I get a warning for a possible spelling mistake (see Screenshot below). So I think, I wasn't patient enough and the first error message is a false alarm?
Here is the corresponding log message of the Server:
And of the Client:
Sorry, mis-click for closing the issue....
According to the log, the first try to start LTeX+ failed and the second try worked. Normally, it should work on the first try and that's why it took a while.
Does this happen each time you start VS Code? Or is it sometimes working immediately and sometimes not?
I have the same issue. This behaviour started only a few days ago. Before, it was working flawlessly. My logs look exactly the same as described in the first post.
Does this happen each time you start VS Code? Or is it sometimes working immediately and sometimes not?
As far as I'm aware, this happens now every time I start VS Code.
When I launch VS Code and the extension fails to start, > LTeX: Show Status Information
gives:
Running > LTeX: Reset and Restart
now actually solves the problem and a new > LTeX: Show Status Information
gives:
Version information
Same as above, except for VS Code: 1.94.2.
The error message indicates a timeout:
Error: spawnSync C:\Windows\system32\cmd.exe ETIMEDOUT
That surprises me, because the timeout is set to 15 seconds, which is quite long.
Can you both try to execute the start-up script manually? Simply open the Powershell or CMD in Windows, navigate to folder C:\Users\YOUR_USERNAME\.vscode\extensions\ltex-plus.vscode-ltex-plus-LTEX+_VERSION\lib\ltex-ls-plus-LTEX+LS_VERSION\bin
and execute .\ltex-ls-plus.bat --version
Does the script show the versions for ltex-ls and java like shown in the screenshot? Does it take longer than 15 seconds?
Hi!
Does this happen each time you start VS Code? Or is it sometimes working immediately and sometimes not?
As far as I noticed, it happens eacht time.
Does the script show the versions for ltex-ls and java like shown in the screenshot? Does it take longer than 15 seconds?
It took about 3 sec to get the following error message.
The error message seems to be caused by an older Java version installed on your computer. Starting from LTeX+ 15.1, Java 21 is used instead of Java 11. I thought that the Java JRE bundled with ltex-ls-plus is taken if nothing else is specified. As a preliminary workaround until there is fix, use the setting ltex.java.path and point it to C:\Users\USERNAME\.vscode\extensions\ltex-plus.vscode-ltex-plus-LTEX+_VERSION\lib\ltex-ls-plus-LTEX+_LS_VERSION\jdk-JDK_VERSION
Please let us know if this setting fixes your issue.
As far as I can tell at the moment, the workaround works!
Thanks!
Great, I will provide a fix in the upcoming days to make your workaround obsolete. I will let you know once you can test the nightly build.
I don't know why, but I can no longer reproduce the issue. I have not (intentionally) updated any software / reinstalled Java, ...
Does the script show the versions for ltex-ls and java like shown in the screenshot? Does it take longer than 15 seconds?
The command takes less than 2 seconds and outputs:
> .\ltex-ls-plus.bat --version
{
"ltex-ls": "18.1.0",
"java": "21.0.4"
}
(I have Eclipse Temurin v21 installed and on Path.)
A colleague of mine with a similar setup had the same problem. Every time she launched VS Code, LTeX+ failed to start. Today, we clicked the blue "Try again" button, and the extension started successfully on the second try (as already reported). This seems to have magically solved the problem: LTeX+ now starts normally on the first try on her machine too.
In any case, thanks a lot for your help and keeping LTeX+ alive!
@GrSto That is really strange, but I am happy that your issue is solved 👍
@kabel-knrd What happens if you click on "Try again"?
In the meanwhile, I removed all Java installations from my computer and installed Java 8. I am sorry, but I cannot reproduce the issue in VS Code. It's working perfectly fine. Because vscode-ltex-plus passes env['JAVA_HOME']: undefined
, ltex-ls-plus takes the bundled Java installation.
If I open ltex-ls-plus.bat --version
manually as described in https://github.com/ltex-plus/vscode-ltex-plus/issues/60#issuecomment-2411015151, I get the same error message. When you execute the command manually, ltex-ls-plus takes the java installation from JAVA_HOME defined in the environment variables in the Windows system settings. This behavior is described in the documentation: https://ltex-plus.github.io/ltex-plus/ltex-ls-plus/server-usage.html#startup
Therefore, the error message when executing the command manually is not a bug but it works as defined.
Hi!
Sorry for my late response!
So I started VS Code and got the error message again, sadly. When clicking "Try again" at the Error-Pop-Up, LTeX starts correctly without any issues.
Ok, let's have a last try and increase the timeout.
Please go to C:\Users\USERNAME\.vscode\extensions\ltex-plus.vscode-ltex-plus-15.2.0\dist
and open the file extension.js
with an editor. Replace all occurrences of timeout: 15000
with timeout: 30000
. This way, the timeout is set to 30 seconds instead of 15 seconds. If that doesn't help either, I don't know what to do.
Hi! Per the maintainer guidelines, this issue is automatically closed because it has been stale for too long. The most common reason for an issue to become stale is missing information from its submitter (see one of the previous comments). If the missing information is provided, the issue will be reopened again. Thank you!
Describe the bug Unable to start LTeX+ on Windows due to probably a Java issues (see log).
Steps to reproduce Start VS Code and LTeX+. After a short moment the error messages gets displayed.
Expected behavior LTeX+ starts correctly.
LTeX+ configuration Default config.
"LTeX+ Language Server" log file Drop Down of Server Log is empty.
"LTeX+ Language Client" log file Following the Client Log:
Version information List here the version information of the relevant software.
Additional context/information While googling the issue I found an old GitHub-Issue on the valentjn/vscode-ltex Repo. Maybe this is related? https://github.com/valentjn/vscode-ltex/issues/80
Thank you very much for taking over and keeping LTeX+ alive and going! :)