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

[CheCode] Websocket closed & project not showing in file explorer #21977

Closed
AObuchow opened this issue Feb 1, 2023 · 2 comments
Closed

[CheCode] Websocket closed & project not showing in file explorer #21977

AObuchow opened this issue Feb 1, 2023 · 2 comments
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. status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github.

Comments

@AObuchow
Copy link

AObuchow commented Feb 1, 2023

Describe the bug

I recently have been experiencing a The workbench failed to connect to the server (Error: Websocket close with status code 1006) error when using a DevWorkspace that has Che Code being contributed. Upon refreshing the page, the same error would pop up, or one that says The workbench failed to connect to the server (Error: Canceled).

Here are screenshots of the errors:
image
image

Two other behaviours I noticed:

  1. The editor starts up, but the project name in the file explorer has yellowed text. When clicking on the project in the file explorer, I got the following error:
    image
    This behaviour wasn't always reproducible, however - I only got it to occur once in testing.

  2. When using a DevWorkspace that defined multiple projects, only a single project appears in the file explorer. Opening a terminal and navigating to the projects folder shows that all projects have been cloned to the file system correctly. Perhaps this is just a result of the DevWorkspace configuration, rather than a bug?

I apologize that this bug report is a bit unclear (3 different types of issue behaviours are described) - I am not sure yet if this all results from Che Code bug(s) or a DevWorkspace that isn't correctly configured. The DevWorkspaces used to reproduce these issues used to use Theia and are now using Che Code.

Che version

7.60@latest

Steps to reproduce

To reproduce the The workbench failed to connect to the server (Error: Websocket close with status code 1006) and The workbench failed to connect to the server (Error: Canceled) errors:

  1. Install DWO 0.18.0
  2. Apply the following DevWorkspace:
kind: DevWorkspace
apiVersion: workspace.devfile.io/v1alpha2
metadata:
  name: code-latest
spec:
  started: true
  template:
    projects:
      - name: web-nodejs-sample
        git:
          remotes:
            origin: "https://github.com/che-samples/web-nodejs-sample.git"
    components:
      - name: dev
        container:
          image: quay.io/devfile/universal-developer-image:latest
    commands:
      - id: say-hello
        exec:
          component: dev
          commandLine: echo "Hello from $(pwd)"
          workingDir: ${PROJECT_SOURCE}/app
  contributions:
    - name: che-code
      uri: https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/che-incubator/che-code/latest/devfile.yaml
      components:
        - name: che-code-runtime-description
          container:
            env:
              - name: CODE_HOST
                value: 0.0.0.0
  1. Wait for the workspace to start then try opening the workspace URL. The error pop-ups should appear. I found that this happened more frequently on Firefox, but still happened sometimes on Chrome.

I also experienced the websocket error in testing another issue. The following factory link resulted in similar behaviour.

To reproduce the behaviour where only a single project is shown in the file explorer, despite the DevWorkspace defining multiple projects:

  1. Install DWO 0.18.0
  2. Apply the following DevWorkspace:
kind: DevWorkspace
apiVersion: workspace.devfile.io/v1alpha2
metadata:
  name: git-clone-sample-devworkspace
spec:
  started: true
  template:
    projects:
      - name: web-nodejs-sample
        git:
          remotes:
            origin: "https://github.com/che-samples/web-nodejs-sample.git"
      - name: devworkspace-operator
        git:
          checkoutFrom:
            remote: amisevsk
            revision: clone-projects-on-start
          remotes:
            origin: "https://github.com/devfile/devworkspace-operator.git"
            amisevsk: "https://github.com/amisevsk/devworkspace-operator.git"
    commands:
      - id: say-hello
        exec:
          component: che-code-runtime-description
          commandLine: echo "Hello from $(pwd)"
          workingDir: ${PROJECT_SOURCE}/app
  contributions:
    - name: che-code
      uri: https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/che-incubator/che-code/latest/devfile.yaml
      components:
        - name: che-code-runtime-description
          container:
            env:
              - name: CODE_HOST
                value: 0.0.0.0
  1. Wait for the workspace URL to become available kubectl get dw -n $NAMESPACE -w
  2. Open the workspace URL, and see that there is only the web-nodejs-sample project in the file explorer and that the devworkspace-operator project is missing in the file explorer.

image

Expected behavior

No websocket related error popups should be showing (these prevent you from actually using the editor) and all projects defined in the DevWorkspace should be viewable from the file explorer.

Runtime

OpenShift

Screenshots

No response

Installation method

other (please specify in additional context)

Environment

Linux

Eclipse Che Logs

No response

Additional context

These issues came up while updating the DevWorkspace repo samples to use che code rather than theia: devfile/devworkspace-operator#1025 (comment)

The issue also occurred in testing another bug: #21971 (comment)

@AObuchow AObuchow added kind/bug Outline of a bug - must adhere to the bug report template. area/editor/vscode Issues related to the Code OSS editor of Che labels Feb 1, 2023
@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 Feb 1, 2023
@l0rd
Copy link
Contributor

l0rd commented Feb 1, 2023

I think it's important to mention that in this case the routing class is basic (and not che) and that the protocol is HTTP rather than HTTPS. May be related to #21853 cc @azatsarynnyy

@AObuchow
Copy link
Author

AObuchow commented Feb 1, 2023

Closing this after further feedback from @amisevsk devfile/devworkspace-operator#1025 (comment).

@AObuchow AObuchow closed this as completed Feb 1, 2023
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. status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github.
Projects
None yet
Development

No branches or pull requests

3 participants