VSCode Extension on MacOSX - Couldn't start client Kotlin Language Server
Closed this issue · 2 comments
rmaclean commented
So on MacOSX, the extension just does not run when installed from the store. I get a notification with Couldn't start client Kotlin Language Server
The cause is that the kotlin-language-server is not marked as executable, so doing the following chmod +x ~/.vscode/extensions/fwcd.kotlin-0.1.3/build/install/kotlin-language-server/bin/kotlin-language-server
helped resolve this particular issue.
Not sure how, but if you can give me a pointer, happy to do a PR to add this into the build maybe?
In the developer tools console this is the stack trace
INFO no standard startup: not just one text editor
extensionService.ts:870 [xabikos.JavaScriptSnippets]: Unknown language in `contributes.JavaScriptSnippets.language`. Provided value: vue
w._logMessageInConsole @ extensionService.ts:870
console.ts:136 [Extension Host] Activating Kotlin language server...
console.ts:136 [Extension Host] Looking for java in PATH
console.ts:136 [Extension Host] /Users/rmaclean/.vscode/extensions/fwcd.kotlin-0.1.3/build/install/kotlin-language-server/bin/kotlin-language-server
notificationsAlerts.ts:42 Couldn't start client Kotlin Language Server
e.onDidNotificationChange @ notificationsAlerts.ts:42
console.ts:136 [Extension Host] rejected promise not handled within 1 second
t.log @ console.ts:136
mainThreadExtensionService.ts:43 [fwcd.kotlin]spawn EACCES
e.$onExtensionRuntimeError @ mainThreadExtensionService.ts:43
mainThreadExtensionService.ts:44 Error: spawn EACCES
at exports._errnoException (util.js:1050:11)
at ChildProcess.spawn (internal/child_process.js:319:11)
at Object.exports.spawn (child_process.js:390:9)
at _getServerWorkingDir.then.serverWorkingDir (/Users/rmaclean/.vscode/extensions/fwcd.kotlin-0.1.3/node_modules/vscode-languageclient/lib/main.js:346:40)
at <anonymous>
e.$onExtensionRuntimeError @ mainThreadExtensionService.ts:44
fwcd commented
@rmaclean According to this stackoverflow thread, the solution is apparently to call chmod
through Gradle:
task filepermission(type: Exec) {
commandLine 'chmod', '700', '<file_path>'
}
Not sure if this will work on Windows though...