Skip to content

insufficient error logging for diagnostic #1242

Closed

Description

@akosyakov

We are running this extension in Gitpod and users start reporting crashes with gitpod-io/gitpod#1073 While trying to investigate we could not find any traces of the extension logging errors during the incident. It only helped to ask a user to enable verbose tracing.

Would it be possible to use Window.logMessage LSP api to log errors always? It would help with diagnostic, probably revealing the output view with an error in the case of a crash would be good too.

At the end a user figured out that an error was: Error opening zip file or JAR manifest missing : /tmp/vscode-extensions/GabrielBB.vscode-lombok@0.9.9/extension//server/lombok.jar

Although he does not seem to install such extension in the workspace: gitpod-io/gitpod#1073 (comment)

What could be the reason for that? Does java extension automatically expect lombok extension to be installed if a project makes use of lombok?

Activity

  1. akosyakov commented on Jan 17, 2020

    @akosyakov
    ContributorAuthor

    Root cause of the crash was that lombok extension was uninstalled from the disk, but user settings java.jdt.ls.vmargs still points to -noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication -javaagent:\"/tmp/vscode-extensions/GabrielBB.vscode-lombok@0.9.9/extension//server/lombok.jar\". Not sure whether the java extension could check whether javagent file actually exist on the disk before appending it vm args.

  2. fbricon commented on Jan 17, 2020

    @fbricon
    Collaborator

    vscode-java doesn't append the lombok javaagent to vmargs. It's done by the GabrielBB.vscode-lombok extension automatically.
    But sure, we might be able to validate javaagents paths before launching the server and display an error is the agent is missing.

  3. akosyakov commented on Jan 17, 2020

    @akosyakov
    ContributorAuthor

    @fbricon Is there a way to improve error logging or showing errors to a user? It was a bit of hassle to get the error.

  4. fbricon commented on Jan 17, 2020

    @fbricon
    Collaborator

    not sure why it doesn't work, but the error logs are supposed to open when the server fails to start. cc @akaroml

  5. akosyakov commented on Jan 17, 2020

    @akosyakov
    ContributorAuthor

    not sure why it doesn't work, but the error logs are supposed to open when the server fails to start.

    ok, will check maybe issue in Theia implementation of output API

  6. akaroml commented on Feb 17, 2020

    @akaroml
    Contributor

    @fbricon Is there a way to improve error logging or showing errors to a user? It was a bit of hassle to get the error.

    There are different log channels:

    1. Java: Open all log files command to see the client and server logs, especially for the launching stage
    2. Output channel Langauge Support for Java to see the logs, for the running stage
    3. Java: Show Build Job Status command, to see the progress of backend jobs

    I understand this is a bit too many choices but first, let's see if any of them could help you.

  7. akosyakov commented on Feb 17, 2020

    @akosyakov
    ContributorAuthor

    @akaroml the issue is not about that there is no way to get information, the root cause was already found by enable verbose tracing and looking at the output view. But that a user failed to do it on himself. He gets a notification that a language server crashed and that's it. He could resolve it only after filing an issue and getting my help.

  8. akaroml commented on Feb 17, 2020

    @akaroml
    Contributor

    @akaroml the issue is not about that there is no way to get information, the root cause was already found by enable verbose tracing and looking at the output view. But that a user failed to do it on himself. He gets a notification that a language server crashed and that's it. He could resolve it only after filing an issue and getting my help.

    Thanks @akosyakov, and I could definitely echo that. We had several tries like the Troubleshooting Guide and the item 1 & 3 mentioned above. There will be continued effort to improve this. Ideas and PRs are always appreciated.

  9. robstryker commented on Nov 4, 2026

    @robstryker
    Contributor

    I don't think it's appropriate for us to try to validate java.jdt.ls.vmargs args. The users get a display error, and the should be sufficient to begin investigations and add verbose logging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions