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

LTeX fails on Windows if paths contain spaces #80

Closed
martenls opened this issue Jul 20, 2020 · 7 comments
Closed

LTeX fails on Windows if paths contain spaces #80

martenls opened this issue Jul 20, 2020 · 7 comments
Assignees
Labels
1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-confirmed Issue status: Confirmed, reproducible bug in LTeX 3-fixed Issue resolution: Issue has been fixed on the develop branch
Milestone

Comments

@martenls
Copy link

The extension fails to start if the java path contains spaces.

This happens with the default configuration (my user folder contains a space) as well as when I set the java path manually to something like C:\Program Files\AdoptOpenJDK\jdk-11.0.8.10-hotspot.
When I copy the jdk from the extension folder to C:\tools\jdk-11.0.7+10-jre and set the path manually, everything works as expected.

I tried escaping the path with extra ' but it did not help.

"LTeX Language Client" log file

2020-07-20T17:03:45.783Z Info: Searching for Java in 'c:\Users\Marten Schmidt\.vscode\extensions\valentjn.vscode-ltex-6.0.2\lib'...
2020-07-20T17:03:45.784Z Info: Java found in 'c:\Users\Marten Schmidt\.vscode\extensions\valentjn.vscode-ltex-6.0.2\lib\jdk-11.0.7+10-jre'.
2020-07-20T17:03:45.784Z Info: Using ltex-ls from 'c:\Users\Marten Schmidt\.vscode\extensions\valentjn.vscode-ltex-6.0.2\lib\ltex-ls-6.0.2'.
2020-07-20T17:03:45.784Z Info: Using Java from 'c:\Users\Marten Schmidt\.vscode\extensions\valentjn.vscode-ltex-6.0.2\lib\jdk-11.0.7+10-jre'.
2020-07-20T17:03:45.784Z Info: Testing ltex-ls...
2020-07-20T17:03:45.784Z Info:   Command: "c:\\Users\\Marten Schmidt\\.vscode\\extensions\\valentjn.vscode-ltex-6.0.2\\lib\\ltex-ls-6.0.2\\bin\\ltex-ls.bat"
2020-07-20T17:03:45.784Z Info:   Arguments: ["--version"]
2020-07-20T17:03:45.784Z Info:   env['JAVA_HOME']: "c:\\Users\\Marten Schmidt\\.vscode\\extensions\\valentjn.vscode-ltex-6.0.2\\lib\\jdk-11.0.7+10-jre"
2020-07-20T17:03:45.784Z Info:   env['JAVA_OPTS']: "-Xms64m -Xmx512m"
2020-07-20T17:03:45.830Z Info: Test failed.
2020-07-20T17:03:45.830Z Info: Exit code of ltex-ls: 9009
2020-07-20T17:03:45.830Z Info: stdout of ltex-ls:
2020-07-20T17:03:45.830Z Info: 
2020-07-20T17:03:45.830Z Info: stderr of ltex-ls:
2020-07-20T17:03:45.830Z Info: Der Befehl "c:\Users\Marten" ist entweder falsch geschrieben oder
2020-07-20T17:03:45.830Z Info: konnte nicht gefunden werden.
2020-07-20T17:03:45.830Z Info: 
2020-07-20T17:03:45.830Z Error: The download/extraction/run of Java failed!
2020-07-20T17:03:45.830Z Error: Error details:
2020-07-20T17:03:45.831Z Error: Error: Could not run ltex-ls.
2020-07-20T17:03:45.831Z Error: 	at w.<anonymous> (c:\Users\Marten Schmidt\.vscode\extensions\valentjn.vscode-ltex-6.0.2\dist\extension.js:1:290092)
2020-07-20T17:03:45.831Z Error: 	at Generator.next (<anonymous>)
2020-07-20T17:03:45.831Z Error: 	at o (c:\Users\Marten Schmidt\.vscode\extensions\valentjn.vscode-ltex-6.0.2\dist\extension.js:1:281234)
2020-07-20T17:03:45.831Z Error: 	at processTicksAndRejections (internal/process/task_queues.js:85:5)
2020-07-20T17:03:45.831Z Info: You might want to try offline installation, see $https://valentjn.github.io/vscode-ltex/docs/installation-how-to-use.html#offline-installation.

Version information

  • Operating system: Windows 2004 (Build 19041.388)
  • VS Code: 1.47.2
  • vscode-ltex: 6.02
@martenls martenls added 1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-unconfirmed Issue status: Bug that needs to be reproduced (all new bugs have this label) labels Jul 20, 2020
@valentjn valentjn added 2-confirmed Issue status: Confirmed, reproducible bug in LTeX and removed 2-unconfirmed Issue status: Bug that needs to be reproduced (all new bugs have this label) labels Jul 20, 2020
@valentjn valentjn self-assigned this Jul 20, 2020
@valentjn valentjn added this to the 6.1.0 milestone Jul 20, 2020
@valentjn valentjn added the 3-fixed Issue resolution: Issue has been fixed on the develop branch label Jul 20, 2020
@valentjn
Copy link
Owner

Thanks for the report. This was another regression from 6.0.0 and the switch to Maven/AppAssembler (see #75 (comment)).

@valentjn valentjn changed the title LTeX fails if Java path contains spaces LTeX fails on Windows if paths contain spaces Jul 20, 2020
@valentjn
Copy link
Owner

Fix released in 6.1.0.

@martenls
Copy link
Author

I just downloaded the new version but the extension unfortunately still fails to start. I got a new error message, however:

"LTeX Language Client" log file

2020-07-26T18:29:05.241Z Info: Searching for Java in 'c:\Users\Marten Schmidt\.vscode\extensions\valentjn.vscode-ltex-6.1.0\lib'...
2020-07-26T18:29:05.241Z Info: Java found in 'c:\Users\Marten Schmidt\.vscode\extensions\valentjn.vscode-ltex-6.1.0\lib\jdk-11.0.8+10-jre'.
2020-07-26T18:29:05.241Z Info: Using ltex-ls from 'c:\Users\Marten Schmidt\.vscode\extensions\valentjn.vscode-ltex-6.1.0\lib\ltex-ls-6.1.0'.
2020-07-26T18:29:05.241Z Info: Using Java from 'c:\Users\Marten Schmidt\.vscode\extensions\valentjn.vscode-ltex-6.1.0\lib\jdk-11.0.8+10-jre'.
2020-07-26T18:29:05.241Z Info: Testing ltex-ls...
2020-07-26T18:29:05.241Z Info:   Command: "c:\\Users\\Marten Schmidt\\.vscode\\extensions\\valentjn.vscode-ltex-6.1.0\\lib\\ltex-ls-6.1.0\\bin\\ltex-ls.bat"
2020-07-26T18:29:05.241Z Info:   Arguments: ["--version"]
2020-07-26T18:29:05.241Z Info:   env['JAVA_HOME']: "c:\\Users\\Marten Schmidt\\.vscode\\extensions\\valentjn.vscode-ltex-6.1.0\\lib\\jdk-11.0.8+10-jre"
2020-07-26T18:29:05.241Z Info:   env['JAVA_OPTS']: "-Xms64m -Xmx512m"
2020-07-26T18:29:05.365Z Info: Test failed.
2020-07-26T18:29:05.365Z Info: Exit code of ltex-ls: 1
2020-07-26T18:29:05.365Z Info: stdout of ltex-ls:
2020-07-26T18:29:05.365Z Info: 
2020-07-26T18:29:05.365Z Info: stderr of ltex-ls:
2020-07-26T18:29:05.365Z Info: Fehler: Hauptklasse Schmidt\.vscode\extensions\valentjn.vscode-ltex-6.1.0\lib\ltex-ls-6.1.0\etc;c:\Users\Marten konnte nicht gefunden oder geladen werden
2020-07-26T18:29:05.365Z Info: Ursache: java.lang.ClassNotFoundException: Schmidt\/vscode\extensions\valentjn/vscode-ltex-6/1/0\lib\ltex-ls-6/1/0\etc;c:\Users\Marten
2020-07-26T18:29:05.365Z Info: 
2020-07-26T18:29:05.365Z Error: The download/extraction/run of Java failed!
2020-07-26T18:29:05.365Z Info: You might want to try offline installation, see $https://valentjn.github.io/vscode-ltex/docs/installation-how-to-use.html#offline-installation.

@valentjn valentjn reopened this Jul 26, 2020
@valentjn valentjn removed the 3-fixed Issue resolution: Issue has been fixed on the develop branch label Jul 26, 2020
@valentjn valentjn modified the milestones: 6.1.0, 6.1.1 Jul 26, 2020
@valentjn valentjn added the 3-fixed Issue resolution: Issue has been fixed on the develop branch label Jul 26, 2020
@valentjn
Copy link
Owner

Thanks for the info. The problem is that Travis can't test on Windows at all due to microsoft/vscode#77499 still not fixed, so I have to test manually. I think it works now...

@valentjn
Copy link
Owner

Fix released in 6.1.1.

@martenls
Copy link
Author

It works now, perfect! Thanks for the quick fix!

me-johnomar added a commit to me-johnomar/ltex-ls that referenced this issue Jan 31, 2024
me-johnomar added a commit to me-johnomar/ltex-ls that referenced this issue Jan 31, 2024
@Uchiha-Senju
Copy link

Uchiha-Senju commented Aug 15, 2024

Hi, broken again in v13.1.0. Or maybe nobody expected spaces in the username 😅 ?
Installed from the offline windows vsix from the latest release. Applied hotfixes to èxtension.js as described by @tobiscode in #884.

2024-08-15T10:12:17.524Z Info: Setting LTeX UI language to 'en-us'.
2024-08-15T10:12:17.524Z Info: Loading i18n messages...
2024-08-15T10:12:17.527Z Info: Loading default i18n messages...
2024-08-15T10:12:17.535Z Info: 
2024-08-15T10:12:17.535Z Info: ltex.ltex-ls.path not set.
2024-08-15T10:12:17.535Z Info: Searching for ltex-ls in 'c:\Users\Varad Mahashabde\.vscode\extensions\valentjn.vscode-ltex-13.1.0\lib'...
2024-08-15T10:12:17.536Z Info: ltex-ls found in 'c:\Users\Varad Mahashabde\.vscode\extensions\valentjn.vscode-ltex-13.1.0\lib\ltex-ls-15.2.0'.
2024-08-15T10:12:17.536Z Info: 
2024-08-15T10:12:17.536Z Info: Using ltex-ls from 'c:\Users\Varad Mahashabde\.vscode\extensions\valentjn.vscode-ltex-13.1.0\lib\ltex-ls-15.2.0'.
2024-08-15T10:12:17.536Z Info: Using Java bundled with ltex-ls as ltex.java.path is not set.
2024-08-15T10:12:17.541Z Info: Testing ltex-ls...
2024-08-15T10:12:17.542Z Info:   Command: "c:\\Users\\Varad Mahashabde\\.vscode\\extensions\\valentjn.vscode-ltex-13.1.0\\lib\\ltex-ls-15.2.0\\bin\\ltex-ls.bat"
2024-08-15T10:12:17.542Z Info:   Arguments: ["--version"]
2024-08-15T10:12:17.542Z Info:   env['JAVA_HOME']: undefined
2024-08-15T10:12:17.542Z Info:   env['JAVA_OPTS']: "-Xms64m -Xmx512m"
2024-08-15T10:12:17.624Z Error: Test failed.
2024-08-15T10:12:17.625Z Error: Error details:
2024-08-15T10:12:17.625Z Info: ltex-ls terminated with non-zero exit code 1.
2024-08-15T10:12:17.625Z Info: stdout of ltex-ls:
2024-08-15T10:12:17.625Z Info: 
2024-08-15T10:12:17.625Z Info: stderr of ltex-ls:
2024-08-15T10:12:17.625Z Info: 'c:\Users\Varad' is not recognized as an internal or external command,
2024-08-15T10:12:17.625Z Info: operable program or batch file.
2024-08-15T10:12:17.625Z Info: 
2024-08-15T10:12:17.625Z Info: You might want to try offline installation, see https://valentjn.github.io/vscode-ltex/docs/installation-and-usage.html#offline-installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-bug 🐛 Issue type: Bug report (something isn't working as expected) 2-confirmed Issue status: Confirmed, reproducible bug in LTeX 3-fixed Issue resolution: Issue has been fixed on the develop branch
Projects
None yet
Development

No branches or pull requests

3 participants