CodinGame / monaco-vscode-api

VSCode public API plugged on the monaco editor
MIT License
226 stars 31 forks source link

Failed to construct 'Worker': Script at 'extension-file://...' #369

Closed hackwaly closed 6 months ago

hackwaly commented 6 months ago

I'm using registerExtension via vite vsixPlugin.

I got error in browser

Activating extension 'moonbit.moonbit-lang' failed: Failed to construct 'Worker': Script at 'extension-file://moonbit.moonbit-lang/browser/lsp-server.js' cannot be accessed from origin 'http://localhost:5173'..

I see registerFileUrl generated as well in .vsix?import.

The extension trying to start a webworker at extension main.

CGNonofr commented 6 months ago

Did you properly configure the extension host worker?

CGNonofr commented 6 months ago

FYI, if the extension host worker is not available, it will try to run the extension in the main thread extension host, which is not able to properly replace extension Worker urls by proper ones