eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.93k stars 1.18k forks source link

Sometimes only blank page is visible when opening workspace #22894

Open apupier opened 3 months ago

apupier commented 3 months ago

Describe the bug

Sometimes when trying to open a workspace, there is a blank page after the progress page.

I reproduced 2 times out of around 40 workspace openings. It was with different repository: https://github.com/apache/camel-examples and https://github.com/apupier/devspaces-camel-minimal/tree/withUser1000

Che version

7.82

Steps to reproduce

  1. open a workspace

Expected behavior

Workspace opening correctly all the times

Runtime

OpenShift

Screenshots

The workspace is marked as running: image The logs are empty (for all containers): image There is no Events visible: image

Installation method

OperatorHub

Environment

Dev Sandbox (workspaces.openshift.com)

Eclipse Che Logs

in browser console log:

The resource from "https://devspaces.apps.sandbox-m2.ll9k.p1.openshiftapps.com/apupier-2/demo-project-minimal-with-user1000/3100/oss-dev/static/out/vs/loader.js" was blocked due to MIME type ("text/plain") mismatch (X-Content-Type-Options: nosniff). 3100
Loading failed for the <script> with source "https://devspaces.apps.sandbox-m2.ll9k.p1.openshiftapps.com/apupier-2/demo-project-minimal-with-user1000/3100/oss-dev/static/out/vs/loader.js". 3100:36:50
The resource from "https://devspaces.apps.sandbox-m2.ll9k.p1.openshiftapps.com/apupier-2/demo-project-minimal-with-user1000/3100/oss-dev/static/out/vs/webPackagePaths.js" was blocked due to MIME type ("text/plain") mismatch (X-Content-Type-Options: nosniff). 3100
Loading failed for the <script> with source "https://devspaces.apps.sandbox-m2.ll9k.p1.openshiftapps.com/apupier-2/demo-project-minimal-with-user1000/3100/oss-dev/static/out/vs/webPackagePaths.js". 3100:37:59
The resource from "https://devspaces.apps.sandbox-m2.ll9k.p1.openshiftapps.com/apupier-2/demo-project-minimal-with-user1000/3100/oss-dev/static/out/vs/code/browser/workbench/workbench.js" was blocked due to MIME type ("text/plain") mismatch (X-Content-Type-Options: nosniff). 3100
Uncaught TypeError: can't convert undefined to object
    <anonymous> https://devspaces.apps.sandbox-m2.ll9k.p1.openshiftapps.com/apupier-2/demo-project-minimal-with-user1000/3100/:40
3100:40:10
Uncaught ReferenceError: define is not defined
    <anonymous> https://devspaces.apps.sandbox-m2.ll9k.p1.openshiftapps.com/apupier-2/demo-project-minimal-with-user1000/3100/oss-dev/static/out/vs/workbench/workbench.web.main.nls.js:3
workbench.web.main.nls.js:3:61
Uncaught ReferenceError: define is not defined
    <anonymous> https://devspaces.apps.sandbox-m2.ll9k.p1.openshiftapps.com/apupier-2/demo-project-minimal-with-user1000/3100/oss-dev/static/out/vs/workbench/workbench.web.main.js:3
    <anonymous> https://devspaces.apps.sandbox-m2.ll9k.p1.openshiftapps.com/apupier-2/demo-project-minimal-with-user1000/3100/oss-dev/static/out/vs/workbench/workbench.web.main.js:2948
workbench.web.main.js:3:204370
Uncaught ReferenceError: define is not defined
    <anonymous> https://devspaces.apps.sandbox-m2.ll9k.p1.openshiftapps.com/apupier-2/demo-project-minimal-with-user1000/3100/oss-dev/static/out/vs/code/browser/workbench/workbench.js:3
    <anonymous> https://devspaces.apps.sandbox-m2.ll9k.p1.openshiftapps.com/apupier-2/demo-project-minimal-with-user1000/3100/oss-dev/static/out/vs/code/browser/workbench/workbench.js:3
workbench.js:3:678


### Additional context

_No response_
AObuchow commented 3 months ago

@apupier just to clarify:

Is that all accurate?

apupier commented 3 months ago

I provided the git url on the "Create workspace" page

  • You see the workspace starting page

yes

  • Once the workspace starting page completes all the steps, you are left with a blank page

yes

  • Additionally: if you go back to the Dashboard and checking the workspace's logs, they are empty and so are the events list.

yes

akurinnoy commented 3 months ago

As I can see, this issue consists of two issues:

Networking Problem The networking problem occurred because the websocket connection was lost, and the dashboard could not re-establish it for some time. This resulted in the dashboard not receiving container logs and events from the workspace pod.

I've opened a separate issue for the websocket problem (https://github.com/eclipse-che/che/issues/22923).

The Blank Page From my investigation, the blank page is the editor page. The editor page was unable to load some essential resources, so it remains blank. I reproduced this problem and noticed 401 statuses for some editor resources (see screenshot below).

cc @dkwon17

Screenshot 2024-04-16 at 14 04 31

dkwon17 commented 3 months ago

The websocket problem and the 401 error problem are problems I've reproduced on CRC when following these steps:

To reproduce the issue I follow these steps:

  1. Deploy Che on CRC
  2. On the dashboard, create an empty workspace and wait until the VS Code editor appear in a new tab.
  3. Go back to the dashboard tab, and stop the workspace. Do not close the VS Code editor tab
  4. Follow steps 2-3 about 5 to 8 times. After this is done, you should have multiple VS Code tabs open for stopped workspaces. You will likely also see the WebSocket connections are failing. Refer to "Network Troubleshooting" in the user guide warning in the dashboard.
  5. Keep all of the VS Code tabs open (this is important).
  6. Go to the dashboard tab and delete all workspaces.
  7. Now, the 401/403 errors should be occurring as long as the VS Code tabs are kept open. Refresh the dashboard to see the 401/403 errors in the Network Tab in the web developer tools.
  8. Create a new empty workspace, and keep refreshing the page as needed until the VS Code editor appears.
  9. When loading the VS Code editor, sometimes there are 401 errors in the Network Tab in web developer tools.