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

Web extensions no longer load #12786

Closed
sdirix opened this issue Jul 31, 2023 · 1 comment · Fixed by #12787
Closed

Web extensions no longer load #12786

sdirix opened this issue Jul 31, 2023 · 1 comment · Fixed by #12787
Labels
plug-in system issues related to the plug-in system

Comments

@sdirix
Copy link
Member

sdirix commented Jul 31, 2023

Bug Description:

VS Code web extensions fail to load.

root ERROR Failed to start plugins for 'frontend' host
Error: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:3000/context/plugin-vscode-init-fe.js' failed to load.
    at initialize (http://localhost:3000/packages_plugin-ext_lib_hosted_browser_worker_worker-main_js.js:9770:13)
    at http://localhost:3000/packages_plugin-ext_lib_hosted_browser_worker_worker-main_js.js:9819:21
    at Array.map (<anonymous>)
    at Object.init (http://localhost:3000/packages_plugin-ext_lib_hosted_browser_worker_worker-main_js.js:9813:57)
    at PluginManagerExtImpl.$start (http://localhost:3000/packages_plugin-ext_lib_hosted_browser_worker_worker-main_js.js:19499:59)
    at http://localhost:3000/packages_plugin-ext_lib_common_plugin-api-rpc_js.js:994:71
    at async RpcProtocol.handleRequest (http://localhost:3000/packages_plugin-ext_lib_hosted_browser_worker_worker-main_js.js:3852:28)

The code mentioning plugin-vscode-init-fe.js can be found here.
Executing a manual GET on http://localhost:3000/context/plugin-vscode-init-fe.js also fails.

The error is very likely related to the backend bundling. When deleting examples/browser/lib/backend directory and thereby forcing the non-bundling code path, the http://localhost:3000/context/plugin-vscode-init-fe.j is available again and the VS Code web extension loads.

The file is served here which fails in the bundling case.

Steps to Reproduce:

  1. Add a VS Code web extension to the plugins directory (for example generated via yo code --extensionType web)
  2. Build and start Theia browser example
  3. Check error in the logs

Additional Information

  • Operating System: Linux
  • Theia Version: 6607185
@vince-fugnitto vince-fugnitto added the plug-in system issues related to the plug-in system label Jul 31, 2023
@sdirix
Copy link
Member Author

sdirix commented Aug 1, 2023

Thank you @msujew for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plug-in system issues related to the plug-in system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants