audioWorklet.addModule aborts with Error: Module resolve hook not set
Categories
(Core :: Web Audio, defect, P3)
Tracking
()
People
(Reporter: johannes.feulner, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0
Steps to reproduce:
Start FF 76.0 (64-Bit)
Navigate to https://ssc.scorio.com/localtest.html
Click on link "Play_Rock ..."
Actual results:
The song is not playing
The console displays:
Error: Module resolve hook not set self-hosted:1235:1
CallModuleResolveHook self-hosted:1235
InnerModuleInstantiation self-hosted:1438
declarationInstantiation self-hosted:1408
AbortError: The operation was aborted. midi.js:1
Expected results:
The song should play via speakers.
Note 1: The implementation of this MIDI-FIle player without AudioWorklet runs well in FF. Can be checked at https://www.midijs.net
Note 2: The AudioWorklet version works well with Google Chrome Version 81.0.4044.129 (Offizieller Build) (64-Bit)
Reporter | ||
Comment 1•4 years ago
|
||
The AudioWorklet (https://ssc.scorio.com/lib/libtimidity-for-worklet.js) was compiled from C source code with EMSDK 1.39.14
Comment 2•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment hidden (obsolete) |
Comment 4•4 years ago
|
||
Because this bug's Severity is normal
and has not been changed, and this bug's priority is --
(none,) indicating it has has not been previously triaged, the bug's Severity is being updated to --
(default, untriaged.)
Reporter | ||
Comment 5•4 years ago
|
||
The same problem (Error: Module resolve hook not set self-hosted:1235:1) has afflicted the Google Web Audio Samples https://googlechromelabs.github.io/web-audio-samples/audio-worklet/design-pattern/wasm/
I found a workaround for this problem by changing the setup to not use ES6 modules at all.
Reporter | ||
Comment 6•4 years ago
|
||
Google's WebAudio Worklet sample includes the emscpripten compiled code via ES6 import into the AudioWorkletProcessor JavaScript file.
I turned it around and append (via --post-js) the AudioWorkletProcessor JavaScript file into the emscripten compiled code. So this works without ES6 modules.
Good news: The worklet runs now fine in Firefox 76 which seems to currently not support ES6 modules in worklets. It also works in Google Chrome.
A quick demo of our MIDI file player with worklet: https://ssc.scorio.com/localtest.html
Wishlist:
- support ES6 modules in worklet
- make worklets visible and debuggable in FF dev console
Comment 7•4 years ago
|
||
Bug 1572644 tracks the feature needed here.
I'll leave this open in case there's something we can do about improving the error message in the mean time.
Bug 1458445 tracks debugger support for worklet scripts.
Updated•4 years ago
|
Comment 8•3 months ago
|
||
Hi Karl, I'm triaging some old module related bugs and I was wondering if we could safely close this bug now? Thanks!
Comment 9•3 months ago
|
||
This has been fixed by bug 1572644, we can close this.
Updated•3 months ago
|
Description
•