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

[browser][nodejs][MT] Worker script fails to start on NodeJS #87556

Closed
pavelsavara opened this issue Jun 14, 2023 · 4 comments
Closed

[browser][nodejs][MT] Worker script fails to start on NodeJS #87556

pavelsavara opened this issue Jun 14, 2023 · 4 comments
Assignees
Labels
arch-wasm WebAssembly architecture area-VM-threading-mono os-browser Browser variant of arch-wasm
Milestone

Comments

@pavelsavara
Copy link
Member

pavelsavara commented Jun 14, 2023

Log

[11:21:36] info: MONO_WASM: TypeError [ERR_WORKER_PATH]: The worker script or module filename must be an absolute path or a relative path starting with './' or '../'. 
Wrap file:// URLs with `new URL`. Received "file:///root/helix/work/workitem/e/dotnet.native.worker.js"
[11:21:36] info:     at new NodeError (node:internal/errors:387:5)
[11:21:36] info:     at new Worker (node:internal/worker:168:15)
[11:21:36] info:     at Object.xo [as allocateUnusedWorker] (file:///root/helix/work/workitem/e/dotnet.runtime.js:3:48754)
[11:21:36] info:     at Object.allocateUnusedWorker (file:///root/helix/work/workitem/e/dotnet.runtime.js:3:47086)
[11:21:36] info:     at file:///root/helix/work/workitem/e/dotnet.runtime.js:3:211534
[11:21:36] info:     at file:///root/helix/work/workitem/e/dotnet.runtime.js:3:211557
[11:21:36] info:     at async file:///root/helix/work/workitem/e/dotnet.runtime.js:3:211196
[11:21:36] info: Process node exited with 1
@ghost
Copy link

ghost commented Jun 14, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Log

[11:21:36] info: MONO_WASM: TypeError [ERR_WORKER_PATH]: The worker script or module filename must be an absolute path or a relative path starting with './' or '../'. Wrap file:// URLs with `new URL`. Received "file:///root/helix/work/workitem/e/dotnet.native.worker.js"
[11:21:36] info:     at new NodeError (node:internal/errors:387:5)
[11:21:36] info:     at new Worker (node:internal/worker:168:15)
[11:21:36] info:     at Object.xo [as allocateUnusedWorker] (file:///root/helix/work/workitem/e/dotnet.runtime.js:3:48754)
[11:21:36] info:     at Object.allocateUnusedWorker (file:///root/helix/work/workitem/e/dotnet.runtime.js:3:47086)
[11:21:36] info:     at file:///root/helix/work/workitem/e/dotnet.runtime.js:3:211534
[11:21:36] info:     at file:///root/helix/work/workitem/e/dotnet.runtime.js:3:211557
[11:21:36] info:     at async file:///root/helix/work/workitem/e/dotnet.runtime.js:3:211196
[11:21:36] info: Process node exited with 1
Author: pavelsavara
Assignees: pavelsavara, maraf
Labels:

arch-wasm, area-System.Runtime.InteropServices.JavaScript

Milestone: 8.0.0

@pavelsavara
Copy link
Member Author

Even if we fix replacementAllocateUnusedWorker, it will fail with

[Error]: require is not defined in ES module scope, you can use import instead

beacuse dotnet.native.worker.js uses require('worker_threads')

@pavelsavara pavelsavara modified the milestones: 8.0.0, 9.0.0 Jul 12, 2023
@pavelsavara pavelsavara modified the milestones: 9.0.0, Future Aug 8, 2023
@pavelsavara pavelsavara changed the title [browser][nodejs][MT] Worker script or module filename must be an absolute path or a relative path [browser][nodejs][MT] Worker script fails to start on NodeJS Nov 9, 2023
@pavelsavara
Copy link
Member Author

This needs emscripten bump to 3.1.52

@pavelsavara
Copy link
Member Author

duplicate of #92853

@github-actions github-actions bot locked and limited conversation to collaborators Apr 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-VM-threading-mono os-browser Browser variant of arch-wasm
Projects
None yet
Development

No branches or pull requests

2 participants