Sometimes only blank page is visible when opening workspace
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
- open a workspace
Expected behavior
Workspace opening correctly all the times
Runtime
OpenShift
Screenshots
The workspace is marked as running:
The logs are empty (for all containers):
There is no Events visible:
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_
@apupier just to clarify:
- You opened a workspace by providing the git URL https://github.com/apache/camel-examples or https://github.com/apupier/devspaces-camel-minimal/tree/withUser1000?rgh-link-date=2024-03-26T13%3A20%3A57Z
- You see the workspace starting page
- Once the workspace starting page completes all the steps, you are left with a blank page
- Additionally: if you go back to the Dashboard and checking the workspace's logs, they are empty and so are the events list.
Is that all accurate?
- You opened a workspace by providing the git URL https://github.com/apache/camel-examples or https://github.com/apupier/devspaces-camel-minimal/tree/withUser1000?rgh-link-date=2024-03-26T13%3A20%3A57Z
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
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
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:
- Deploy Che on CRC
- On the dashboard, create an empty workspace and wait until the VS Code editor appear in a new tab.
- Go back to the dashboard tab, and stop the workspace. Do not close the VS Code editor tab
- 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 guidewarning in the dashboard. - Keep all of the VS Code tabs open (this is important).
- Go to the dashboard tab and delete all workspaces.
- 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.
- Create a new empty workspace, and keep refreshing the page as needed until the VS Code editor appears.
- When loading the VS Code editor, sometimes there are 401 errors in the Network Tab in web developer tools.