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

Opening links doesn't work in the Che-Code editor #22986

Open
RomanNikitenko opened this issue May 28, 2024 · 3 comments
Open

Opening links doesn't work in the Che-Code editor #22986

RomanNikitenko opened this issue May 28, 2024 · 3 comments
Assignees
Labels
area/editor/vscode Issues related to the Code OSS editor of Che 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. team/B This team is responsible for the Web Terminal, the DevWorkspace Operator and the IDEs.

Comments

@RomanNikitenko
Copy link
Member

RomanNikitenko commented May 28, 2024

Describe the bug

It's not possible to open a link in the Che-Code editor.

Che version

7.86@latest

Steps to reproduce

Click on a link of a md file (just for example, you can try another way to test it) => nothing happens = a new tab is not opened

Expected behavior

Opening links should work for the Che-Code editor

Runtime

I was able to reproduce the problem on the dogfooding instance

@RomanNikitenko RomanNikitenko added 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. area/editor/vscode Issues related to the Code OSS editor of Che team/B This team is responsible for the Web Terminal, the DevWorkspace Operator and the IDEs. labels May 28, 2024
@svor
Copy link
Contributor

svor commented Aug 30, 2024

Command related links also don't work in the editor:

screencast-che-dogfooding.apps.che-dev.x6e0.p1.openshiftapps.com-2024.08.30-13_58_47.webm

@vitaliy-guliy vitaliy-guliy self-assigned this Sep 2, 2024
@vitaliy-guliy
Copy link
Contributor

It looks like it depends on cross-domain secutiry policy.
Normally the webview static resources are loaded from the CDN https://github.com/che-incubator/che-code/blob/main/code/product.json#L34 which has a different domain.

Having a quick debug I see the clicking the link is blocked somewhere under the hood ( it needs the additional investigation ).

As a workaround it is possible to configure webview resources to be loaded from the current cluster.
To do that it needs to define WEBVIEW_LOCAL_RESOURCES environment variable for the tools container and restart the workspace from local devfile.

components:
  - name: tools
    container:
      image: registry.redhat.io/devspaces/udi-rhel8:3.15
      endpoints:
        - exposure: public
          name: nodejs
          protocol: https
          targetPort: 3000
      env:
        - name: WEBVIEW_LOCAL_RESOURCES
          value: "true"
      memoryLimit: '1Gi'
      memoryRequest: '512Mi'
      cpuLimit: '0.5'
      cpuRequest: '0.25'
      mountSources: true
      volumeMounts:
        - name: npm
          path: /home/user/.npm

@vitaliy-guliy
Copy link
Contributor

Reopening it as the webviews do not work when static resources were taken from the same domain as editor and the browser do not trust self-signed certificate.

@vitaliy-guliy vitaliy-guliy reopened this Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/vscode Issues related to the Code OSS editor of Che 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. team/B This team is responsible for the Web Terminal, the DevWorkspace Operator and the IDEs.
Projects
Status: ✅ Done
Development

No branches or pull requests

3 participants