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

Java Plugin not Being Started #14944

Closed
5 of 26 tasks
dmytro-ndp opened this issue Oct 21, 2019 · 14 comments
Closed
5 of 26 tasks

Java Plugin not Being Started #14944

dmytro-ndp opened this issue Oct 21, 2019 · 14 comments
Assignees
Labels
area/plugins e2e-test/failure Issues that is related to a test failures reported by our CI platform and our QE. kind/bug Outline of a bug - must adhere to the bug report template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code.

Comments

@dmytro-ndp
Copy link
Contributor

dmytro-ndp commented Oct 21, 2019

Describe the bug

Java LS server didn't start from the first time of workspace loading and required refreshing of browser's tab:
https://codeready-workspaces-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/che-regular-tests/view/K8S/job/Single-Che-master-check-E2E-Happy-path-tests-against-k8s/2581/ :

Language server validation
        ▼ ProjectTree.expandPathAndOpenFileInAssociatedWorkspace "petclinic/src/main/java/org/springframework/samples/petclinic"
        ▼ ProjectTree.expandItem "petclinic/src"
        ▼ ProjectTree.waitItemExpanded "petclinic/src"
        ▼ ProjectTree.expandItem "petclinic/src/main"
        ▼ ProjectTree.waitItemExpanded "petclinic/src/main"
        ▼ ProjectTree.expandItem "petclinic/src/main/java"
        ▼ ProjectTree.waitItemExpanded "petclinic/src/main/java"
        ▼ ProjectTree.expandItem "petclinic/src/main/java/org"
        ▼ ProjectTree.waitItemExpanded "petclinic/src/main/java/org"
        ▼ ProjectTree.expandItem "petclinic/src/main/java/org/springframework"
        ▼ ProjectTree.waitItemExpanded "petclinic/src/main/java/org/springframework"
        ▼ ProjectTree.expandItem "petclinic/src/main/java/org/springframework/samples"
        ▼ ProjectTree.waitItemExpanded "petclinic/src/main/java/org/springframework/samples"
        ▼ ProjectTree.expandItem "petclinic/src/main/java/org/springframework/samples/petclinic"
        ▼ ProjectTree.waitItemExpanded "petclinic/src/main/java/org/springframework/samples/petclinic"
        ▼ ProjectTree.clickOnItem "petclinic/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java"
        ▼ ProjectTree.waitItemSelected "petclinic/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java"
        ▼ Editor.waitEditorOpened "PetClinicApplication.java"
        ▼ Editor.waitTab "PetClinicApplication.java"
        ▼ Editor.selectTab "PetClinicApplication.java"
        ▼ Ide.closeAllNotifications
        ▼ Editor.waitTab "PetClinicApplication.java"
        ▼ Editor.clickOnTab "PetClinicApplication.java"
        ▼ Ide.closeAllNotifications
        ▼ Editor.waitTabFocused "PetClinicApplication.java"
        ▼ Ide.checkLsInitializationStart
        ▼ Ide.waitStatusBarContains "Starting Java Language Server"
        ▼ Ide.waitAndSwitchToIdeFrame
    1) Java LS initialization


  3 passing (7m)
  1 failing

  1) Language server validation
       Java LS initialization:
     TimeoutError: Waiting to be able to switch to frame
Wait timed out after 240002ms
      at /tmp/e2e/node_modules/selenium-webdriver/lib/promise.js:2201:17

Workaround

Refreshing browser's tab restores LS server initialization https://github.com/eclipse/che/blob/master/e2e/pageobjects/ide/Ide.ts#L220-L226.

Screencast

https://youtu.be/KBL5ug1idEI

Screenshot

screenshot-Java_LS_initialization (3)

Related issue

#14283

Che version

  • latest
  • nightly
  • other: please specify

Logs and configs

https://codeready-workspaces-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/che-regular-tests/view/K8S/job/Single-Che-master-check-E2E-Happy-path-tests-against-k8s/2581/artifact/logs-and-configs/

Che version

  • latest
  • nightly
  • other: please specify

Steps to reproduce

https://github.com/eclipse/che/blob/master/e2e/tests/e2e_happy_path/HappyPath.spec.ts

Devfile

https://github.com/eclipse/che/blob/master/e2e/files/happy-path/happy-path-workspace.yaml

Runtime

  • kubernetes (include output of kubectl version)
  • Openshift (include output of oc version)
  • minikube 1.1.1
  • minishift (include output of minishift version and oc version)
  • docker-desktop + K8S (include output of docker version and kubectl version)
  • other: (please specify)

Installation method

  • chectl:next
  • che-operator
  • minishift-addon
  • I don't know

Environment

  • my computer
    • Windows
    • Linux
    • macOS
  • Cloud
    • Amazon
    • Azure
    • GCE
    • other (please specify)
  • other: CRW CCI
@dmytro-ndp dmytro-ndp added kind/bug Outline of a bug - must adhere to the bug report template. e2e-test/failure Issues that is related to a test failures reported by our CI platform and our QE. labels Oct 21, 2019
@svor
Copy link
Contributor

svor commented Oct 21, 2019

I can reproduce this problem with cpptools plugin as well

Logs from the plugin's container

Starting the deployer with the list of resolvers [ LocalDirectoryPluginDeployerResolver {},
--
  | GithubPluginDeployerResolver { unpackedFolder: '/tmp/github-remote' },
  | HttpPluginDeployerResolver { unpackedFolder: '/tmp/http-remote' },
  | VsCodePluginDeployerResolver { vscodeExtensionsFolder: '/tmp/vscode-extension-marketplace' } ]
  | Theia Endpoint 1/pid listening on port 2503
  | Found the list of default plugins ID on env: undefined
  | Found the list of plugins ID on env: local-dir:///plugins/sidecars/che_incubator_cpptools_latest
  | Found the list of default plugins ID from CLI: undefined
  | unzipping the VS Code extension 'che-incubator.cpptools.latest.bopllwcluv.cdt-gdb-vscode-0.0.90.vsix' to directory: /tmp/vscode-unpacked/che-incubator.cpptools.latest.bopllwcluv.cdt-gdb-vscode-0.0.90.vsix
  | unzipping the VS Code extension 'che-incubator.cpptools.latest.ioxhwpyluu.cdt-vscode-0.0.7.vsix' to directory: /tmp/vscode-unpacked/che-incubator.cpptools.latest.ioxhwpyluu.cdt-vscode-0.0.7.vsix
  | unzipping the VS Code extension 'che-incubator.cpptools.latest.vlwrkdfgfd.llvm-vs-code-extensions.vscode-clangd-0.0.16.vsix' to directory: /tmp/vscode-unpacked/che-incubator.cpptools.latest.vlwrkdfgfd.llvm-vs-code-extensions.vscode-clangd-0.0.16.vsix
  | PluginTheiaDirectoryHandler: accepting plugin with path /tmp/vscode-unpacked/che-incubator.cpptools.latest.bopllwcluv.cdt-gdb-vscode-0.0.90.vsix
  | Resolving "che-incubator.cpptools.latest.bopllwcluv.cdt-gdb-vscode-0.0.90.vsix" as a VS Code extension...
  | Resolved "che-incubator.cpptools.latest.bopllwcluv.cdt-gdb-vscode-0.0.90.vsix" to a VS Code extension "cdt-gdb-vscode@0.0.90" with engines: { vscode: '^1.26.0' }
  | PluginTheiaDirectoryHandler: accepting plugin with path /tmp/vscode-unpacked/che-incubator.cpptools.latest.ioxhwpyluu.cdt-vscode-0.0.7.vsix
  | Resolving "che-incubator.cpptools.latest.ioxhwpyluu.cdt-vscode-0.0.7.vsix" as a VS Code extension...
  | Resolved "che-incubator.cpptools.latest.ioxhwpyluu.cdt-vscode-0.0.7.vsix" to a VS Code extension "cdt-vscode@0.0.7" with engines: { vscode: '^1.30.0' }
  | PluginTheiaDirectoryHandler: accepting plugin with path /tmp/vscode-unpacked/che-incubator.cpptools.latest.vlwrkdfgfd.llvm-vs-code-extensions.vscode-clangd-0.0.16.vsix
  | Resolving "che-incubator.cpptools.latest.vlwrkdfgfd.llvm-vs-code-extensions.vscode-clangd-0.0.16.vsix" as a VS Code extension...
  | Resolved "che-incubator.cpptools.latest.vlwrkdfgfd.llvm-vs-code-extensions.vscode-clangd-0.0.16.vsix" to a VS Code extension "vscode-clangd@0.0.16" with engines: { vscode: '^1.36.0' }
  | the accepted plugins are []
  | the acceptedFrontendPlugins plugins are []
  | the acceptedBackendPlugins plugins are [ PluginDeployerEntryImpl {
  | originId:
  | 'local-dir:///plugins/sidecars/che_incubator_cpptools_latest',
  | pluginId:
  | 'che-incubator.cpptools.latest.bopllwcluv.cdt-gdb-vscode-0.0.90.vsix',
  | map: Map { 'package.json' => [Object] },
  | changes:
  | [ 'PluginVsCodeFileHandler', 'PluginVsCodeDirectoryHandler' ],
  | acceptedTypes: [ 1 ],
  | currentPath:
  | '/tmp/vscode-unpacked/che-incubator.cpptools.latest.bopllwcluv.cdt-gdb-vscode-0.0.90.vsix/extension',
  | initPath:
  | '/plugins/sidecars/che_incubator_cpptools_latest/che-incubator.cpptools.latest.bopllwcluv.cdt-gdb-vscode-0.0.90.vsix',
  | resolved: true,
  | resolvedByName: 'LocalDirectoryPluginDeployerResolver' },
  | PluginDeployerEntryImpl {
  | originId:
  | 'local-dir:///plugins/sidecars/che_incubator_cpptools_latest',
  | pluginId:
  | 'che-incubator.cpptools.latest.ioxhwpyluu.cdt-vscode-0.0.7.vsix',
  | map: Map { 'package.json' => [Object] },
  | changes:
  | [ 'PluginVsCodeFileHandler', 'PluginVsCodeDirectoryHandler' ],
  | acceptedTypes: [ 1 ],
  | currentPath:
  | '/tmp/vscode-unpacked/che-incubator.cpptools.latest.ioxhwpyluu.cdt-vscode-0.0.7.vsix/extension',
  | initPath:
  | '/plugins/sidecars/che_incubator_cpptools_latest/che-incubator.cpptools.latest.ioxhwpyluu.cdt-vscode-0.0.7.vsix',
  | resolved: true,
  | resolvedByName: 'LocalDirectoryPluginDeployerResolver' },
  | PluginDeployerEntryImpl {
  | originId:
  | 'local-dir:///plugins/sidecars/che_incubator_cpptools_latest',
  | pluginId:
  | 'che-incubator.cpptools.latest.vlwrkdfgfd.llvm-vs-code-extensions.vscode-clangd-0.0.16.vsix',
  | map: Map { 'package.json' => [Object] },
  | changes:
  | [ 'PluginVsCodeFileHandler', 'PluginVsCodeDirectoryHandler' ],
  | acceptedTypes: [ 1 ],
  | currentPath:
  | '/tmp/vscode-unpacked/che-incubator.cpptools.latest.vlwrkdfgfd.llvm-vs-code-extensions.vscode-clangd-0.0.16.vsix/extension',
  | initPath:
  | '/plugins/sidecars/che_incubator_cpptools_latest/che-incubator.cpptools.latest.vlwrkdfgfd.llvm-vs-code-extensions.vscode-clangd-0.0.16.vsix',
  | resolved: true,
  | resolvedByName: 'LocalDirectoryPluginDeployerResolver' } ]
  | local path to deploy on remote instance [ '/tmp/vscode-unpacked/che-incubator.cpptools.latest.bopllwcluv.cdt-gdb-vscode-0.0.90.vsix/extension',
  | '/tmp/vscode-unpacked/che-incubator.cpptools.latest.ioxhwpyluu.cdt-vscode-0.0.7.vsix/extension',
  | '/tmp/vscode-unpacked/che-incubator.cpptools.latest.vlwrkdfgfd.llvm-vs-code-extensions.vscode-clangd-0.0.16.vsix/extension' ]
  | Deploying backend plugin "cdt-gdb-vscode@0.0.90" from "/tmp/vscode-unpacked/che-incubator.cpptools.latest.bopllwcluv.cdt-gdb-vscode-0.0.90.vsix/extension/out/extension"
  | Deploying backend plugin "cdt-vscode@0.0.7" from "/tmp/vscode-unpacked/che-incubator.cpptools.latest.ioxhwpyluu.cdt-vscode-0.0.7.vsix/extension/dist/extension.js"
  | Deploying backend plugin "vscode-clangd@0.0.16" from "/tmp/vscode-unpacked/che-incubator.cpptools.latest.vlwrkdfgfd.llvm-vs-code-extensions.vscode-clangd-0.0.16.vsix/extension/out/src/extension"

this problem is reproducible time to time

@AndrienkoAleksandr
Copy link
Contributor

AndrienkoAleksandr commented Oct 21, 2019

Reproducible with php language remote plugin, I think pretty critical for code-ready

@musienko-maxim
Copy link
Contributor

musienko-maxim commented Oct 21, 2019

Logs after first starting workspace and opening a maven project
Starting the deployer with the list of resolvers [ LocalDirectoryPluginDeployerResolver {},
  GithubPluginDeployerResolver { unpackedFolder: '/tmp/github-remote' },
  HttpPluginDeployerResolver { unpackedFolder: '/tmp/http-remote' },
  VsCodePluginDeployerResolver { vscodeExtensionsFolder: '/tmp/vscode-extension-marketplace' } ]
Theia Endpoint 19/pid listening on port 2503
Found the list of default plugins ID on env: undefined
Found the list of plugins ID on env: local-dir:///plugins/sidecars/redhat_java_latest
Found the list of default plugins ID from CLI: undefined
unzipping the VS Code extension 'redhat.java.latest.wqwczbcine.java-0.50.0-1825.vsix' to directory: /tmp/vscode-unpacked/redhat.java.latest.wqwczbcine.java-0.50.0-1825.vsix
unzipping the VS Code extension 'redhat.java.latest.xqqajxsbmd.vscode-java-debug-0.20.0.vsix' to directory: /tmp/vscode-unpacked/redhat.java.latest.xqqajxsbmd.vscode-java-debug-0.20.0.vsix
PluginTheiaDirectoryHandler: accepting plugin with path /tmp/vscode-unpacked/redhat.java.latest.wqwczbcine.java-0.50.0-1825.vsix
Resolving "redhat.java.latest.wqwczbcine.java-0.50.0-1825.vsix" as a VS Code extension...
Resolved "redhat.java.latest.wqwczbcine.java-0.50.0-1825.vsix" to a VS Code extension "java@0.50.0" with engines: { vscode: '^1.36.0' }
PluginTheiaDirectoryHandler: accepting plugin with path /tmp/vscode-unpacked/redhat.java.latest.xqqajxsbmd.vscode-java-debug-0.20.0.vsix
Resolving "redhat.java.latest.xqqajxsbmd.vscode-java-debug-0.20.0.vsix" as a VS Code extension...
Resolved "redhat.java.latest.xqqajxsbmd.vscode-java-debug-0.20.0.vsix" to a VS Code extension "vscode-java-debug@0.20.0" with engines: { vscode: '^1.32.0' }
the accepted plugins are []
the acceptedFrontendPlugins plugins are []
the acceptedBackendPlugins plugins are [ PluginDeployerEntryImpl {
    originId: 'local-dir:///plugins/sidecars/redhat_java_latest',
    pluginId: 'redhat.java.latest.wqwczbcine.java-0.50.0-1825.vsix',
    map: Map { 'package.json' => [Object] },
    changes:
     [ 'PluginVsCodeFileHandler', 'PluginVsCodeDirectoryHandler' ],
    acceptedTypes: [ 1 ],
    currentPath:
     '/tmp/vscode-unpacked/redhat.java.latest.wqwczbcine.java-0.50.0-1825.vsix/extension',
    initPath:
     '/plugins/sidecars/redhat_java_latest/redhat.java.latest.wqwczbcine.java-0.50.0-1825.vsix',
    resolved: true,
    resolvedByName: 'LocalDirectoryPluginDeployerResolver' },
  PluginDeployerEntryImpl {
    originId: 'local-dir:///plugins/sidecars/redhat_java_latest',
    pluginId:
     'redhat.java.latest.xqqajxsbmd.vscode-java-debug-0.20.0.vsix',
    map: Map { 'package.json' => [Object] },
    changes:
     [ 'PluginVsCodeFileHandler', 'PluginVsCodeDirectoryHandler' ],
    acceptedTypes: [ 1 ],
    currentPath:
'/tmp/vscode-unpacked/redhat.java.latest.xqqajxsbmd.vscode-java-debug-0.20.0.vsix/extension',
    initPath:
     '/plugins/sidecars/redhat_java_latest/redhat.java.latest.xqqajxsbmd.vscode-java-debug-0.20.0.vsix',
    resolved: true,
    resolvedByName: 'LocalDirectoryPluginDeployerResolver' } ]
local path to deploy on remote instance [ '/tmp/vscode-unpacked/redhat.java.latest.wqwczbcine.java-0.50.0-1825.vsix/extension',
  '/tmp/vscode-unpacked/redhat.java.latest.xqqajxsbmd.vscode-java-debug-0.20.0.vsix/extension' ]
Deploying backend plugin "java@0.50.0" from "/tmp/vscode-unpacked/redhat.java.latest.wqwczbcine.java-0.50.0-1825.vsix/extension/dist/extension"
Deploying backend plugin "vscode-java-debug@0.20.0" from "/tmp/vscode-unpacked/redhat.java.latest.xqqajxsbmd.vscode-java-debug-0.20.0.vsix/extension/dist/extension"
 

After refreshing a browser LS is launched

@AndrienkoAleksandr AndrienkoAleksandr added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Oct 21, 2019
@ibuziuk ibuziuk added severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code. team/languages and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Oct 21, 2019
@tsmaeder
Copy link
Contributor

It seems that plugin activation is not happening in this case. Couple of datapoints:

  1. It works with vscode-java 0.50 in plain Theia
  2. Activation via the route "workspaceContains" does not work when the files in question (pom.xml and gradle) are added after the ide starts
  3. It seems activation via "language:java" is not happening in Che.

@tsmaeder tsmaeder added area/editor/theia Issues related to the che-theia IDE of Che team/languages and removed team/languages labels Oct 22, 2019
@tsmaeder tsmaeder changed the title Java LS server initialization failed Java Plugin not Being Started Oct 22, 2019
@tsmaeder
Copy link
Contributor

Changed title: Java commands are not registered, which indicates that the vscode-java extensions is never started. Also: plugin activation are not visible in the browser log.

@tsmaeder
Copy link
Contributor

I am having trouble reproducing now. However, one thing I noticed is that in the plugin host image output, the line

PLUGIN_HOST(21): PluginManagerExtImpl/init()

Was missing when the initialization failed. The log comes from plugin-host-rpc.ts#135, and indirectly from PluginManagerExtImpl#$start(), which is in plugin-manager.ts#155.
It seems like in HostedPluginSupport#startPlugins() not all plugin managers are found to call $start on them.

@tsmaeder
Copy link
Contributor

tsmaeder commented Oct 23, 2019

Further info: the $start message seems to be sent to the remote plugin manager, but I don't see the init message that should be displayed if $start is indeed executed in the plugin host.

@dmytro-ndp
Copy link
Contributor Author

The error has been fixed by PR eclipse-che/che-theia#508

@dmytro-ndp
Copy link
Contributor Author

dmytro-ndp commented Mar 20, 2020

It has been reproduced in Eclipse Che 7.11.0-SNAPSHOT:
https://codeready-workspaces-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/basic-MultiUser-Che-check-e2e-tests-against-k8s/1384/consoleFull

          ▼ Ide.checkLsInitializationStart
          ▼ Ide.waitStatusBarContains "Activating Language Support for Java"
Known flakiness has occurred https://github.com/eclipse/che/issues/14944
          ▼ DriverHelper.reloadPage
[1584668329.067][SEVERE]: Timed out receiving message from renderer: 0.100
          ▼ Ide.waitStatusBarContains "Activating Language Support for Java"
[1584668329.326][SEVERE]: Timed out receiving message from renderer: 0.100
    1) Java LS initialization


  3 passing (5m)
  1 failing

  1) Language server validation
       Java LS initialization:
     TimeoutError: Waiting for element to be located By(css selector, div[id='theia-statusBar'])
Wait timed out after 180010ms

Refreshing of browser doesn't work in most cases.

@dmytro-ndp dmytro-ndp reopened this Mar 20, 2020
@dmytro-ndp dmytro-ndp added area/plugins and removed team/languages area/editor/theia Issues related to the che-theia IDE of Che labels Mar 20, 2020
@svor
Copy link
Contributor

svor commented Mar 20, 2020

could you provide logs from java-plugin container?

@dmytro-ndp
Copy link
Contributor Author

dmytro-ndp commented Mar 20, 2020

@svor, @benoitf: here java plugin container logs are:

Error while starting endpoint:  Error: No matching bindings found for serviceIdentifier: Symbol(EnvVariablesServer)
    at _validateActiveBindingCount (/remote-endpoint/node_modules/inversify/lib/planning/planner.js:62:23)
    at _getActiveBindings (/remote-endpoint/node_modules/inversify/lib/planning/planner.js:48:5)
    at _createSubRequests (/remote-endpoint/node_modules/inversify/lib/planning/planner.js:91:26)
    at /remote-endpoint/node_modules/inversify/lib/planning/planner.js:115:17
    at Array.forEach (<anonymous>)
    at /remote-endpoint/node_modules/inversify/lib/planning/planner.js:114:26
    at Array.forEach (<anonymous>)
    at _createSubRequests (/remote-endpoint/node_modules/inversify/lib/planning/planner.js:94:20)
    at /remote-endpoint/node_modules/inversify/lib/planning/planner.js:115:17
    at Array.forEach (<anonymous>)

@dmytro-ndp
Copy link
Contributor Author

@svor: issue has been reproduced both with TLS enabled and disabled.

@dmytro-ndp
Copy link
Contributor Author

dmytro-ndp commented Mar 20, 2020

@svor: this time the issue has been introduced by changes in PR eclipse-che/che-theia#676

@svor
Copy link
Contributor

svor commented Mar 20, 2020

this issue is not about Java LS. The problem is about plugin-remote-endpoint . If execute bash-5.0$ ./remote-endpoint/plugin-remote-endpoint in some container which provides remote plugin it returns

Error while starting endpoint:  Error: No matching bindings found for serviceIdentifier: Symbol(EnvVariablesServer)
    at _validateActiveBindingCount (/remote-endpoint/node_modules/inversify/lib/planning/planner.js:62:23)
    at _getActiveBindings (/remote-endpoint/node_modules/inversify/lib/planning/planner.js:48:5)
    at _createSubRequests (/remote-endpoint/node_modules/inversify/lib/planning/planner.js:91:26)
    at /remote-endpoint/node_modules/inversify/lib/planning/planner.js:115:17
    at Array.forEach (<anonymous>)
    at /remote-endpoint/node_modules/inversify/lib/planning/planner.js:114:26
    at Array.forEach (<anonymous>)
    at _createSubRequests (/remote-endpoint/node_modules/inversify/lib/planning/planner.js:94:20)
    at /remote-endpoint/node_modules/inversify/lib/planning/planner.js:115:17
    at Array.forEach (<anonymous>)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugins e2e-test/failure Issues that is related to a test failures reported by our CI platform and our QE. kind/bug Outline of a bug - must adhere to the bug report template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code.
Projects
None yet
Development

No branches or pull requests

7 participants