You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in worker-mainimportScripts is used to load the plugin-vscode-init-fe.ts. However, this does not work for instances, where Theia is not hosted at the base-url (or origin), like the try.theia-cloud.io deployment, where each instance of Theia is hosted under ws.theia-cloud.io/<pod-id>.
After a quick investigation the problem seems to be that importScripts is called with /context/<file-name>, which is a absolute path. Hence it resolves to only base-url/context/<file-name>, whereas we would need base-url/<pod-id>/context/<file-name>. This could be fixed by simply calling importScripts with ./context/<file-name>. I already tested this and it seems to work.
Does anyone have any concerns about that change? It should not change the behavior for other use cases, but fix the issue for that specifc scenario.
I can gladly contribute this.
Steps to Reproduce:
Use a hosted Theia instance that is running under a path (e.g. https://try.theia-cloud.io/ - path meaning, that the pods are running under ws.theia-cloud.io/<pod-id> and not just ws.theia-cloud.io)
Install a frontend-only vscode extension
Observe that the console throws and error that the plugin-vscode-init-fe.js fails to load.
Additional Information
Operating System:
Theia Version:
The text was updated successfully, but these errors were encountered:
Before we tried to load absolute paths e.g. `/context/`.
This is a problem, when working in deployed use cases, where Theia might be hosted under a path (e.g. try.theia-cloud.io).
Because then the loaded path will be from the root of the page and not, like wanted, from the current path.
Simply changing it to relative paths (e.g. `./context/`) solves this issue.
Fixeseclipse-theia#13813
Bug Description:
Currently in worker-main importScripts is used to load the plugin-vscode-init-fe.ts. However, this does not work for instances, where Theia is not hosted at the base-url (or origin), like the
try.theia-cloud.io
deployment, where each instance of Theia is hosted underws.theia-cloud.io/<pod-id>
.After a quick investigation the problem seems to be that
importScripts
is called with/context/<file-name>
, which is a absolute path. Hence it resolves to onlybase-url/context/<file-name>
, whereas we would needbase-url/<pod-id>/context/<file-name>
. This could be fixed by simply callingimportScripts
with./context/<file-name>
. I already tested this and it seems to work.Does anyone have any concerns about that change? It should not change the behavior for other use cases, but fix the issue for that specifc scenario.
I can gladly contribute this.
Steps to Reproduce:
https://try.theia-cloud.io/
- path meaning, that the pods are running underws.theia-cloud.io/<pod-id>
and not justws.theia-cloud.io
)plugin-vscode-init-fe.js
fails to load.Additional Information
The text was updated successfully, but these errors were encountered: