Web Worker ES Module Import Error is not displayed
Categories
(Core :: DOM: Workers, defect, P3)
Tracking
()
People
(Reporter: brandmairstefan, Unassigned)
References
(Depends on 1 open bug)
Details
Attachments
(1 file)
792 bytes,
application/x-zip-compressed
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0
Steps to reproduce:
I created a web worker, and used an import statement inside the web worker script.
The import statement in the attached example is
import { fuu } from "./test.js";
which misspells the "foo" function from test.js.
Actual results:
Since the import statement was incorrect, the worker immediately terminated. The dev tools console did not show any error message.
Expected results:
The worker should have immediately terminated, and the dev tools console should show an error message.
Updated•5 months ago
|
Reporter | ||
Comment 1•5 months ago
|
||
Online reproduction demo https://stefnotch.github.io/web-worker-es-module-import-issue/
Chrome has the issue, so I opened a report over there as well https://bugs.chromium.org/p/chromium/issues/detail?id=1514833
Reporter | ||
Comment 3•2 months ago
|
||
The Chrome bug seems to be an older bug already. The bug I opened over there was closed as a duplicate of https://issues.chromium.org/issues/40184459
And adding a bit of extra info for anyone who stumbles upon this:
This error can be caught with an onerror
event listener. However, the error will not contain any useful information whatsoever.
Comment 4•12 days ago
|
||
I can confirm comment 0 and comment 3; we fire an error event on the worker that is useless. This is likely related to bug 1271441. There also was some older spec discussion at least as it relates to SharedWorker error reporting which may have some relevant incidental discussion since it's largely the same spec text.
Description
•