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

Textlint server crashes when a file is opened outside a workspace #65

Open
svrnm opened this issue May 25, 2023 · 0 comments
Open

Textlint server crashes when a file is opened outside a workspace #65

svrnm opened this issue May 25, 2023 · 0 comments

Comments

@svrnm
Copy link

svrnm commented May 25, 2023

I use vscode as a default editor for many files, this means when I click a file or run "code filename" in my shell the file gets opened in VScode outside of a workspace, this leads to a crash with textlint server and the following error:

TypeError: e is not iterable
    at /Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/server.js:1:1775
    at Generator.next (<anonymous>)
    at /Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/server.js:1:1381
    at new Promise (<anonymous>)
    at r (/Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/server.js:1:1126)
    at _ (/Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/server.js:1:1726)
    at /Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/server.js:1:5455
    at Generator.next (<anonymous>)
    at s (/Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/server.js:1:1183)
[Error - 10:39:06 AM] Connection to server got closed. Server will not be restarted.
[Error - 10:39:06 AM] Request textDocument/codeAction failed.
Error: Connection got disposed.
	at Object.dispose (/Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/extension.js:1:67080)
	at Object.dispose (/Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/extension.js:1:147163)
	at w.handleConnectionClosed (/Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/extension.js:1:147376)
	at w.handleConnectionClosed (/Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/extension.js:1:207722)
	at t (/Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/extension.js:1:145465)
	at r.invoke (/Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/extension.js:1:68693)
	at o.fire (/Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/extension.js:1:69454)
	at Y (/Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/extension.js:1:56338)
	at r.invoke (/Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/extension.js:1:68693)
	at o.fire (/Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/extension.js:1:69454)
	at d.fireClose (/Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/extension.js:1:77335)
	at ChildProcess.<anonymous> (/Users/username/.vscode/extensions/taichi.vscode-textlint-0.11.0/dist/extension.js:1:88296)
	at ChildProcess.emit (node:events:525:35)
	at maybeClose (node:internal/child_process:1112:16)
	at Socket.<anonymous> (node:internal/child_process:470:11)
	at Socket.emit (node:events:513:28)
	at Pipe.<anonymous> (node:net:757:14)

The error is caused in configureEngine because folders is null based on the return value of getWorkspaceFolders

The workaround right now is opening the folder containing that file upfront as a workspace and then opening the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant