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

Spaces in %UserProfile% breaks LTex Client start up #887

Open
Uchiha-Senju opened this issue Aug 15, 2024 · 6 comments
Open

Spaces in %UserProfile% breaks LTex Client start up #887

Uchiha-Senju opened this issue Aug 15, 2024 · 6 comments
Labels
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)

Comments

@Uchiha-Senju
Copy link

Note: It is highly recommended to follow the instructions at https://valentjn.github.io/ltex/vscode-ltex/contributing.html#how-to-report-bugs and use the LTeX: Report bug in LTeX command from within Visual Studio Code. Per the contribution guidelines, deleting parts of the template or not filling in vital information may result in the issue to be immediately closed as invalid.

Describe the bug
Having spaces in %Userprofile% interrupts the LTex start up

Steps to reproduce
Steps to reproduce the behavior:

  1. Have a username like "John Smith", with the space
  2. Apply hotfixes to extension.js as described by @tobiscode in No longer runs on Windows #884 .
  3. Restart extension
  4. Check the output of LTex Language client and observe the error.

Expected behavior
Start up completes without issue.

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.

Not required.

REPLACE_THIS_WITH_SAMPLE_DOCUMENT

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.

    "ltex.trace.server": "verbose"

"LTeX Language Server" log file
No log file created as server never starts

"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):

2024-08-15T10:40:04.648Z Info: Setting LTeX UI language to 'en-us'.
2024-08-15T10:40:04.648Z Info: Loading i18n messages...
2024-08-15T10:40:04.652Z Info: Loading default i18n messages...
2024-08-15T10:40:04.659Z Info: 
2024-08-15T10:40:04.659Z Info: ltex.ltex-ls.path not set.
2024-08-15T10:40:04.659Z Info: Searching for ltex-ls in 'c:\Users\Varad Mahashabde\.vscode\extensions\valentjn.vscode-ltex-13.1.0\lib'...
2024-08-15T10:40:04.660Z 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:40:04.660Z Info: 
2024-08-15T10:40:04.660Z 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:40:04.660Z Info: Using Java bundled with ltex-ls as ltex.java.path is not set.
2024-08-15T10:40:04.661Z Info: Testing ltex-ls...
2024-08-15T10:40:04.661Z 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:40:04.661Z Info:   Arguments: ["--version"]
2024-08-15T10:40:04.661Z Info:   env['JAVA_HOME']: undefined
2024-08-15T10:40:04.661Z Info:   env['JAVA_OPTS']: "-Xms64m -Xmx512m"
2024-08-15T10:40:04.722Z Error: Test failed.
2024-08-15T10:40:04.722Z Error: Error details:
2024-08-15T10:40:04.723Z Info: ltex-ls terminated with non-zero exit code 1.
2024-08-15T10:40:04.723Z Info: stdout of ltex-ls:
2024-08-15T10:40:04.723Z Info: 
2024-08-15T10:40:04.723Z Info: stderr of ltex-ls:
2024-08-15T10:40:04.723Z Info: 'c:\Users\Varad' is not recognized as an internal or external command,
2024-08-15T10:40:04.723Z Info: operable program or batch file.
2024-08-15T10:40:04.723Z Info: 
2024-08-15T10:40:04.723Z Info: You might want to try offline installation, see https://valentjn.github.io/vscode-ltex/docs/installation-and-usage.html#offline-installation.

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

  • Operating system: Windows_NT x64 10.0.19045
  • VS Code: 1.91.1 (user setup)
  • vscode-ltex: 13.1.0
  • ltex-ls: packaged with offline windows vsix
  • Java: packaged with offline windows vsix

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

Originally posted by @Uchiha-Senju in #80 (comment)

@Uchiha-Senju Uchiha-Senju 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 Aug 15, 2024
@Uchiha-Senju
Copy link
Author

Uchiha-Senju commented Aug 15, 2024

Also observed by @RobuxShooters (comment) in #884

@YaNickname2000
Copy link

YaNickname2000 commented Aug 21, 2024

"Fixable" by changing line 6556 in extension.js
from:
return { command: ltexLsScriptPath, args: [], options: { 'env': env, shell: true } };
to:
return { command: '"'+ltexLsScriptPath+'"', args: [], options: { 'env': env, shell: true } };

@YaNickname2000
Copy link

"Fixable" by changing line 6556 in extension.js from: return { command: ltexLsScriptPath, args: [], options: { 'env': env, shell: true } }; to: return { command: '"'+ltexLsScriptPath+'"', args: [], options: { 'env': env, shell: true } };

Line is likely to be incorrect, because I used the fork https://github.com/ltex-plus/vscode-ltex-plus. But the concept should work here as well

@Uchiha-Senju
Copy link
Author

Uchiha-Senju commented Aug 22, 2024

"Fixable" by changing line 6556 in extension.js from: return { command: ltexLsScriptPath, args: [], options: { 'env': env, shell: true } }; to: return { command: '"'+ltexLsScriptPath+'"', args: [], options: { 'env': env, shell: true } };

Might be a version difference, but this is on line 13612 for me. The fix is indeed successful, atleast from my side.

@spitzerd
Copy link

@YaNickname2000 Thank you for the hint. I will take care in the upcoming days about this issue in the fork LTeX+ https://github.com/ltex-plus/vscode-ltex-plus

spitzerd added a commit to ltex-plus/vscode-ltex-plus that referenced this issue Sep 2, 2024
spitzerd added a commit to ltex-plus/vscode-ltex-plus that referenced this issue Sep 2, 2024
@spitzerd
Copy link

spitzerd commented Sep 8, 2024

The fix is part of the latest release of LTeX+

https://marketplace.visualstudio.com/items?itemName=ltex-plus.vscode-ltex-plus

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-unconfirmed Issue status: Bug that needs to be reproduced (all new bugs have this label)
Projects
None yet
Development

No branches or pull requests

3 participants