Failed to initialize language server - How to troubleshoot? · Issue #21 · microsoft/copilot-eclipse-feedback · GitHub
Skip to content
This repository was archived by the owner on Apr 28, 2026. It is now read-only.
This repository was archived by the owner on Apr 28, 2026. It is now read-only.

Failed to initialize language server - How to troubleshoot? #21

Closed

Description

@bobfields

How do I troubleshoot this? It seems to happen on a couple specific projects. Eclipse -clean, restart, copilot SSL, copilot workspace context does not make any difference. Something with the preferences seems to affect the copilot initialization. It works when I restart with a clean workspace with no preferences, but I really don't want to do that because I have extensive customizations for eclipse preferences. And I can't figure out which preferences are causing this problem. I'm on the current Eclipse and copilot plugin version, authenticating to github.com for copilot license initialization. Windows 11, Java 17 and 21. This is the only detail I have from the error logs:

!ENTRY com.microsoft.copilot.eclipse 4 0 2025-08-19 14:50:02.067
!MESSAGE [Error] Failed to start copilot language server.
!STACK 0
java.lang.IllegalStateException: Failed to start copilot language server.
	at com.microsoft.copilot.eclipse.ui.CopilotUi$1.run(CopilotUi.java:73)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

!ENTRY org.eclipse.core.jobs 4 2 2025-08-19 14:50:02.074
!MESSAGE An internal error occurred during: "Copilot initialization".
!STACK 0
java.lang.IllegalStateException: Failed to start copilot language server.
	at com.microsoft.copilot.eclipse.ui.CopilotUi$1.run(CopilotUi.java:73)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

!ENTRY com.microsoft.copilot.eclipse 1 0 2025-08-19 14:50:02.221
!MESSAGE [Info] Starting language server with binary lsp agent.

Activity

  1. jdneo commented on Aug 21, 2025

    @jdneo
    Member

    Is there any more logs reported by copilot plugin for this session?

  2. bros-swissas commented on Aug 22, 2025

    @bros-swissas

    That is from the Eclipse error log. There is also a dedicated log for "Copilot MCP".
    In Eclipse go to the "Console" and there Press on the small "Computer" icon "Display Selected Console"
    In that menu select "Copilot (MCP)". There you may get more details about what goes wrong. Good luck

  3. haubi commented on Sep 12, 2025

    @haubi

    Same problem here, on Linux.
    Seems like a matter of timing around the execution of that com.microsoft.copilot.eclipse.ui.CopilotUi$1.run(),
    or, therein, a missing explicit await or dependency on the language server startup:
    When I manually, in a debugger, put a breakpoint in org.eclipse.core.internal.jobs.Worker.run(), and delay the execution of that com.microsoft.copilot.eclipse.ui.CopilotUi$1.run() compared to other jobs, so the language server really was started up first, that "Copilot initialization" seems to succeed in this instance of the Eclipse IDE.

  4. haubi commented on Sep 12, 2025

    @haubi

    And: There doesn't seem to be a Console for "Copilot (MCP)" at all.
    Do I need to configure something to enable that Console?

  5. jdneo commented on Sep 15, 2025

    @jdneo
    Member

    Michael Haubenwallner (@haubi) There should be some error logs in the Error Log view, could you pls check and maybe share a screenshot?

  6. haubi commented on Sep 15, 2025

    @haubi

    The message box is:
    Image
    The Error Log view shows:
    Image
    And the workspace .metadata/.log file contains:

    !SESSION 2025-09-15 08:42:17.878 -----------------------------------------------
    eclipse.buildId=4.35.0.I20250228-0140
    java.version=21.0.7
    java.vendor=Eclipse Adoptium
    BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en
    Command-line arguments:  -os linux -ws gtk -arch x86_64
    
    !ENTRY com.microsoft.copilot.eclipse 4 0 2025-09-15 08:42:29.258
    !MESSAGE [Error] Failed to start copilot language server.
    !STACK 0
    java.lang.IllegalStateException: Failed to start copilot language server.
            at com.microsoft.copilot.eclipse.ui.CopilotUi$1.run(CopilotUi.java:78)
            at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
    
    !ENTRY org.eclipse.core.jobs 4 2 2025-09-15 08:42:29.265
    !MESSAGE An internal error occurred during: "Copilot initialization".
    !STACK 0
    java.lang.IllegalStateException: Failed to start copilot language server.
            at com.microsoft.copilot.eclipse.ui.CopilotUi$1.run(CopilotUi.java:78)
            at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
    
    !ENTRY com.microsoft.copilot.eclipse 1 0 2025-09-15 08:42:29.273
    !MESSAGE [Info] Starting language server with binary lsp agent.
    
    !ENTRY com.microsoft.copilot.eclipse 1 0 2025-09-15 08:42:29.274
    !MESSAGE [Info] Found native binary in fragment bundle: com.microsoft.copilot.eclipse.core.agent.linux.x64
    
    !ENTRY com.microsoft.copilot.eclipse 1 0 2025-09-15 08:42:29.280
    !MESSAGE [Info] Lsp agent started successfully.
    
    !ENTRY org.eclipse.lsp4e 1 0 2025-09-15 08:42:30.941
    !MESSAGE [Info] [lsp] GitHub Copilot Language Server 1.363.0 initialized
    
    !ENTRY org.eclipse.ui 2 2 2025-09-15 08:44:05.048
    !MESSAGE Invalid preference category path: org.eclipse.ease.preferences.global (bundle: org.eclipse.ease.lang.python.jython, page: org.eclipse.ease.lang.python.jython.libraryPrefPage)
    
    !ENTRY org.eclipse.ui 2 2 2025-09-15 08:44:05.048
    !MESSAGE Invalid preference category path: org.eclipse.wst.html.ui.preferences.web (bundle: org.eclipse.wst.jsdt.ui, page: org.eclipse.wst.jsdt.ui.preferences.JavaBasePreferencePage)
    
    
  7. haubi commented on Sep 15, 2025

    @haubi

    Meanwhile I've found https://github.com/orgs/community/discussions/151288#discussioncomment-14287359
    which describes what I can reproduce on Linux:

    • During initial workspace setup, the Chat view is not initialized yet, and the Language Server is started later on.
    • Restarting Eclipse does not show the problem again, because Chat view is already registered for early loading, but
    • closing the Chat view brings back the problem after Eclipse restart.
  8. jdneo commented on Sep 15, 2025

    @jdneo
    Member

    Hi Michael Haubenwallner (@haubi), thank you for reporting this.

    I tried several times to reproduce the issue and do have success for one time.

    I guess it's related with the race condition between the activation of core and ui plugin. (Though the ui will wait for the job from core completed, but it is not enough if the wait logic is called before core gets activates.)

    I will work on a fix and release it to the nightly build channel once it's merged. Would it be possible for you help verify the fix once it's available? Thanks!

  9. jdneo commented on Sep 15, 2025

    @jdneo
    Member

    Andrey Loskutov (@iloveeclipse) Have you ever encountered this problem before?

    I'm planing to add

    // Explicitly activate the core bundle first
    Bundle coreBundle = Platform.getBundle(CopilotCore.PLUGIN_ID);
    if (coreBundle != null && coreBundle.getState() != Bundle.ACTIVE
            && coreBundle.getState() != Bundle.STARTING) {
        coreBundle.start(Bundle.START_TRANSIENT);
    }

    before

    Job.getJobManager().join(CopilotCore.INIT_JOB_FAMILY, null);

    In CopilotUi.start()

    Does the change make sense from your point of view?

  10. iloveeclipse commented on Sep 15, 2025

    @iloveeclipse

    Does the change make sense from your point of view

    Core bundle should be already automatically started if any of the classes from it are used by Copilot UI. So I would not add any manual "hacks" to start it.

  11. jdneo commented on Sep 15, 2025

    @jdneo
    Member

    Bob Fields (@bobfields) Michael Haubenwallner (@haubi) Is the problem stably reproducible on your side?

  12. haubi commented on Sep 15, 2025

    @haubi

    It is stably reproducible when our own plugin is installed, but IIRC I've also seen it once with some vanilla upstream setup, although not stably reproducible there.

    Maybe irrelevant, but what I've also discovered is a difference on which thread executes com.microsoft.copilot.eclipse.ui.CopilotUi.start() method, i.e. which thread does activate the com.microsoft.copilot.eclipse.ui bundle:

    • from within thread main : seems to work (more likely),
    • from within thread Worker-#: Executing the early startup extensions: seems to break (more likely)

    However, I've no idea about the conditions for which thread is the first one to activate (need) some bundle.

  13. jdneo commented on Sep 19, 2025

    @jdneo
    Member

    I paid attention to this issue recently. Though that it cannot be stably reproduced, but I did encounter it several times.

    But I've no idea why it will happen.

    Given that the MANIFEST.MF declares that UI requires core, will OSGi guarantee that the CopilotCore.start() will be executed before CopilotUi.start()? Andrey Loskutov (@iloveeclipse) do you have any insight?

  14. iloveeclipse commented on Sep 19, 2025

    @iloveeclipse

    Given that the MANIFEST.MF declares that UI requires core, will OSGi guarantee that the CopilotCore.start() will be executed before CopilotUi.start()

    The point is not about dependency (which is correct), but about class loading.
    CopilotCore.start() will be executed before CopilotUi.start() if some of the classes from CopilotCore bundle would be used by any other bundle (e.g. UI plugin code executed on start() would refer to some core plugin API). (Another possibility would be to specify start level of core bundle, but this is not what you want to do in your code.)

  15. jdneo commented on Sep 22, 2025

    @jdneo
    Member

    UI plugin code executed on start() would refer to some core plugin API

    UI do refer some code from core

    Image

    Is this what you mean?

  16. iloveeclipse commented on Sep 22, 2025

    @iloveeclipse

    Is this what you mean?

    No. Imports are not doing anything, they are needed only at compile time for compiler. I mean UI calling some code from core bundle.

  17. iloveeclipse commented on Sep 22, 2025

    @iloveeclipse

    But it's wrapped in a job

    Just move CopilotCore.getPlugin() outside of the job and you are done.

  18. bobfields commented on Oct 2, 2025

    @bobfields
    Author

    When it actually does initialize, now I get this error, not sure how to manually install the missing dependency:
    Failed to install terminal bundle
    Could not resolve module: com.microsoft.copilot.eclipse.ui.terminal [1095]
    Unresolved requirement: Require-Bundle: org.eclipse.terminal.view.ui
    The initialization error varies by the projects loaded in the Workspace. Exporting preferences, creating a new workspace, and importing preferences still shows the issue. Clean does not help. Closing all projects and restarting (with or without clean) does not seem to help. Removing Kimin Ryu (@workspace) from context does not help. There is no additional info in the error log. The only thing that works is starting over with a fresh workspace, where I lose all my preferences and test/run configurations.
    This is very frustrating because VSCode does not work well with Java/Maven projects where the repo and settings are customized.
    Is there some other plugin I can disable or other workspace setting I can change?
    Please help fix this issue.

  19. iloveeclipse commented on Oct 2, 2025

    @iloveeclipse

    Unresolved requirement: Require-Bundle: org.eclipse.terminal.view.ui

    It is this issue: #26
    You need terminal bundles from latest 4.37 Eclipse update site.

  20. bobfields commented on Oct 6, 2025

    @bobfields
    Author

    In real simple terms...
    Add update site 'https://download.eclipse.org/releases/latest'
    Select the TM Terminal features to install. - This fixes the terminal bundle error.

    Another user suggested having the Copilot chat view open/selected before restarting. Somehow that means it gets initialized first in the Eclipse UI when starting. I was going crazy trying to figure out why initialization would fail with no workspace projects, just after importing workspace preferences. That seems to 'fix' the issue, I just have to make sure Copilot chat is selected before shutting down the workspace.

  21. haubi commented on Oct 10, 2025

    @haubi

    But it's wrapped in a job

    Just move CopilotCore.getPlugin() outside of the job and you are done.

    Sheng Chen (@jdneo) Kindly asking if there is some newer version than 0.11.0 around meanwhile, supposed to have this issue fixed?

  22. jdneo commented on Oct 13, 2025

    @jdneo
    Member

    Hi Michael Haubenwallner (@haubi)

    We just published a nightly build, could you please check if the issue is fixed?

    https://marketplace.eclipse.org/content/github-copilot-nightly

  23. cypher256 commented on Oct 13, 2025

    @cypher256

    The issue I reported below has been completely resolved in this nightly build.
    Thank you so much!
    https://github.com/orgs/community/discussions/151288#discussioncomment-14287359

  24. haubi commented on Oct 13, 2025

    @haubi

    Hi @haubi

    We just published a nightly build, could you please check if the issue is fixed?

    https://marketplace.eclipse.org/content/github-copilot-nightly

    Yes, initialization seems to work more robust now, thanks!

    (have not tested any functionality yet, need to clarify legal & licensing here still)

  25. jdneo commented on Oct 14, 2025

    @jdneo
    Member

    need to clarify legal & licensing here still

    Michael Haubenwallner (@haubi) what legal concern do you have? Anything we can help?

  26. haubi commented on Oct 16, 2025

    @haubi

    need to clarify legal & licensing here still

    @haubi what legal concern do you have? Anything we can help?

    As far as I understand, the concern is about whether to give Copilot access to our proprietary code, as well as the licensing costs.
    So far, solving these concerns is nothing I'm involved with, and they are being worked out by other channels.
    But thanks for the offer!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions