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

Theia fails to load plugins when it's run as DevWorkspace on OpenShift behind OAuth #20448

Closed
sleshchenko opened this issue Sep 9, 2021 · 4 comments
Assignees
Labels
area/plugins kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. sprint/current

Comments

@sleshchenko
Copy link
Member

Describe the bug

Theia fails to load plugins when it's run as DevWorkspace on OpenShift behind OAuth

Che version

next (development version)

Steps to reproduce

  1. Deploy Che with DevWorkspace on OpenShift.
  2. Run any Theia based workspace.
  3. Toggle Plugins view

Expected behavior

Plugins are displayed.

Runtime

OpenShift

Screenshots

Screenshot_20210909_161100
Screenshot_20210909_161128
Screenshot_20210909_161431

Installation method

chectl/next

Environment

other (please specify in additional context)

Eclipse Che Logs

No response

Additional context

OpenShift 4.8 on RHPDS

@sleshchenko sleshchenko added kind/bug Outline of a bug - must adhere to the bug report template. area/plugins labels Sep 9, 2021
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Sep 9, 2021
@dmytro-ndp dmytro-ndp added severity/P1 Has a major impact to usage or development of the system. team/plugins and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Sep 9, 2021
@svor svor mentioned this issue Sep 23, 2021
25 tasks
@svor
Copy link
Contributor

svor commented Sep 24, 2021

It is also reproducible on Minikube (v1.22.0):
screenshot-192 168 49 2 nip io-2021 09 24-10_47_50

@vitaliy-guliy
Copy link
Contributor

vitaliy-guliy commented Oct 1, 2021

Che-Theia fails when the plugin service tries to get default registry with following reading of workspace settings

2021-10-01 15:03:46.582 root INFO workspaceService.getWorkspaceSettings() not supported
2021-10-01 15:03:46.583 root ERROR TypeError: Cannot read property 'endsWith' of undefined
at ChePluginServiceImpl.normalizeEnding (/home/theia/node_modules/@eclipse-che/theia-plugin-ext/lib/node/che-plugin-service.js:54:17)
at ChePluginServiceImpl.getDefaultRegistry (/home/theia/node_modules/@eclipse-che/theia-plugin-ext/lib/node/che-plugin-service.js:70:31)
at async JsonRpcProxyFactory.onRequest (/home/theia/node_modules/@theia/core/lib/common/messaging/proxy-factory.js:127:24)
2021-10-01 15:03:46.583 root ERROR Request getDefaultRegistry failed with error: Params:
2021-10-01 15:03:46.706 root INFO Error: Request 'getDefaultRegistry' failed
at Proxy.<anonymous> (https://192.168.49.2.nip.io/workspace302787d26f2e4c4a/theia-ide/3100/theia.93e2aa1e710fddda4853.js:1:1384506)
at A.initDefaults (https://192.168.49.2.nip.io/workspace302787d26f2e4c4a/theia-ide/3100/theia.93e2aa1e710fddda4853.js:1:690893)
at A.updateCache (https://192.168.49.2.nip.io/workspace302787d26f2e4c4a/theia-ide/3100/theia.93e2aa1e710fddda4853.js:1:691508)
at m.updateCache (https://192.168.49.2.nip.io/workspace302787d26f2e4c4a/theia-ide/3100/theia.93e2aa1e710fddda4853.js:1:712419)
at m.onAfterShow (https://192.168.49.2.nip.io/workspace302787d26f2e4c4a/theia-ide/3100/theia.93e2aa1e710fddda4853.js:1:712040)
at m.e.processMessage (https://192.168.49.2.nip.io/workspace302787d26f2e4c4a/theia-ide/3100/vendors.4213f7c2e21cba6b228d.js:2:570964)
at f (https://192.168.49.2.nip.io/workspace302787d26f2e4c4a/theia-ide/3100/vendors.4213f7c2e21cba6b228d.js:2:406803)
at Object.t [as sendMessage] (https://192.168.49.2.nip.io/workspace302787d26f2e4c4a/theia-ide/3100/vendors.4213f7c2e21cba6b228d.js:2:405779)
at m.e.show (https://192.168.49.2.nip.io/workspace302787d26f2e4c4a/theia-ide/3100/vendors.4213f7c2e21cba6b228d.js:2:569784)
at f.t._onCurrentChanged (https://192.168.49.2.nip.io/workspace302787d26f2e4c4a/theia-ide/3100/vendors.4213f7c2e21cba6b228d.js:2:468766)

It's reasonable that this error is appeared, because of WorkspaceService.getWorkspaceSettings() method is not properly implemented https://github.com/eclipse-che/che-theia/blob/main/extensions/eclipse-che-theia-remote-impl-k8s/src/node/k8s-workspace-service-impl.ts#L74

@vitaliy-guliy
Copy link
Contributor

vitaliy-guliy commented Oct 12, 2021

I was able to display the plugin list, but the installation does not work because of major differences between devfile V1 and V2.

In V1 we add the plugin to the devfile directly. In V2 the extension should be added to .vscode/extensions.json as in example https://github.com/che-samples/java-spring-petclinic/blob/devfilev2/.vscode/extensions.json#L2.

The solution of adding the plugin/extension needs to be precisely discussed.
We need to decide as well what shall we do with plugins, that are working in the dedicated container.

Screenshot from 2021-10-12 17-10-58

@vitaliy-guliy
Copy link
Contributor

Issue on fixing the plugin installation in devfile V2 workspace #20638

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugins kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. sprint/current
Projects
None yet
Development

No branches or pull requests

5 participants