Page freezes on clicking Start in stream wasm demo (Windows) + `libstream.worker.js` file missing
envgap__ggml-org__whisper.cpp-3123
01 / FAILURE SIGNATURE
As reported upstream
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'buffer')
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
cb2bd11ee86c6d2a8c8c22ea3043682cbf127bcd- Manifest
examples/command.wasm/CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
ggml-org/whisper.cpp #3123 · read the original issue
---
### Bug: Page freezes on clicking Start in stream wasm demo (Windows) + `libstream.worker.js` file missing
Hi, I tried to follow the instructions in the `stream wasm` section of the `whisper.cpp` README to run real-time transcription in the browser, but encountered some problems.
---
### Problem Description
After compiling and running the browser demo as instructed, the page completely freezes after clicking the **Start** button. A few seconds later, the browser shows a message like:
> *"This page isn't responding. Do you want to wait or close it?"*
When inspecting the console via F12, I found the following error related to `stream.js`:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'buffer')
A screenshot of the error is attached below:


---
### Missing File: `libstream.worker.js`
In the README, it says:
> *"To run the example in a different server, you need to copy the following files to the server's HTTP path:"*
However, I couldn’t find `libstream.worker.js` anywhere in the build output. I’m not sure if it should have been auto-generated, manually created, or if I'm missing a build step.
---
### Build Environment
* **OS**: Windows 11
* **Browser**: Edge
* **Build Steps**:
git clone https://github.com/ggerganov/whisper.cpp
cd whisper.cpp
mkdir build-em && cd build-em
emcmake cmake ..
ninja -j 8
* **Missing File**: `libstream.worker.js`
---
### Questions
1. What could be the cause of the `Emval.toHandle(handle[key])` error?
2. Should `libstream.worker.js` be automatically generated during the build process? If not, where can I find or how can I create it?
---
Thank you in advance for your help and for this amazing project! 🙏
Let me know if more logs or system info are needed — I’d be happy to provide them.
---
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]