Problem
The Java and Kotlin by IntelliJ IDEA extension for Visual Studio Code fails to start its language server. The extension's Output channel (View | Output) shows:
[error] Server initialization failed.
Message: Bundled license agreement (EULA.txt) is not accepted: expected hash 34d850193ee04897, got <none>. Pass the accepted EULA hash as `eulaHash` in LSP initializationOptions.
Code: -32803
[error] Connection to server got closed. Server will not be restarted.
Accompanying symptoms:
- The error appears after a VS Code restart, an extension update, or an extension reinstall.
- The EULA acceptance dialog never appears again, so the agreement cannot be accepted from the UI.
- Reinstalling the extension, deleting the downloaded server, clearing caches, and running IntelliJ (Developer): Reset EULA Acceptance do not change the outcome.
- The same project may still work in another editor that runs its own separate copy of the downloaded server.
The server log (Log file: <path> line in the Output channel) contains the underlying reason, which the error message above does not mention:
WARN - #c.j.l.s.a.i.c.InitializeOptions - Failed to parse initialization options: {"runMainCodeLens":true,"intellijExtensions":true,"buildTools":{},"projects":[{}],"disableRocksDBWriteAheadLog":false}
kotlinx.serialization.MissingFieldException: Fields [type, path] are required for type with serial name 'com.jetbrains.ls.snapshot.api.impl.core.ConfiguredProject'
Cause
One of the extension's intellij.* entries in the VS Code settings JSON holds a value that does not match its schema — for example an empty object in the intellij.projects array:
"intellij.projects": [
{}
]
When any initialization option fails to parse, the server receives none of them, including the recorded EULA acceptance, and therefore reports the bundled license agreement as not accepted. The reported error names the license agreement, not the invalid setting.
Resolution
-
Open the extension's Output channel (View | Output, see User interface) and open the file named on the
Log file: <path>line. AFailed to parse initialization optionswarning identifies the malformed value; theMissingFieldExceptionnames the missing fields. -
Open the settings JSON via the Command Palette (Ctrl+Shift+P, macOS Cmd+Shift+P) → Preferences: Open User Settings (JSON). Check the workspace file
.vscode/settings.jsonas well — either scope can carry the malformed value. Settings file locations lists the paths. -
Correct or remove the invalid
intellij.*entries. Eachintellij.projectsentry requires bothtype(gradle,maven,bazel,jps,gomodules, orjson) andpath(URI of the workspace root or build file):
"intellij.projects": [
{
"type": "maven",
"path": "file:///proj-dir/pom.xml"
}
]
Entries without type and path, including empty objects, are invalid. When no externally configured project is needed, set the value to an empty array or delete the key:
"intellij.projects": []
-
Verify the other
intellij.*values against their schemas —intellij.buildTooltakes a build tool name,nullfor automatic detection, or""to disable project import. Editing the file in VS Code surfaces schema violations inline. -
Save the file and run Developer: Reload Window from the Command Palette, or restart Visual Studio Code. The EULA dialog appears again on the next project open.
Deleting Code/User/settings.json or the whole VS Code user data directory also clears the malformed value, but discards all other editor settings and is not required.
Comments
0 comments
Please sign in to leave a comment.