eshaz / wasm-audio-decoders

Browser and NodeJS Web Assembly audio decoder libraries that are highly optimized for size and performance.
175 stars 19 forks source link

crc error #109

Closed tomfun-sqdl closed 4 months ago

tomfun-sqdl commented 4 months ago

I used opus encoder recently and everything was well. Now I have 3 cases:

  1. Load via wget the script from the dist and use it
  2. Load via wget the script from your site and use it
  3. directly use script with your site

1 and 2 gives error:

opus-decoder.min__.js:2 `simple-yenc`
Decode failed crc32 validation
Expected: -929534100; Got: -702781872
Visit https://github.com/eshaz/simple-yenc for more information

opus-decoder.min.js:2 Uncaught Error: Decode failed crc32 validation
...

Error: image image

Dockerfile:

RUN ...
    && wget https://github.com/eshaz/wasm-audio-decoders/raw/master/src/opus-decoder/dist/opus-decoder.min.js -O /opt/noVNC/opus-decoder.min.js \
    && wget https://eshaz.github.io/wasm-audio-decoders/opus-decoder.min.js -O /opt/noVNC/opus-decoder.min__.js \
    ...

# COPY html file

Html:

<script type="text/javascript" src="opus-decoder.min.js"></script>
<!--<script type="text/javascript" src="opus-decoder.min__.js"></script>-->
<!--<script type="text/javascript" src="https://eshaz.github.io/wasm-audio-decoders/opus-decoder.min.js"></script>-->

Work well case: Screenshot_2024-05-16_00-50-23 image

I checked hashsum of all sources - no luck - all files are identical: image

$ sha256sum opus-decoder.min.js d1c927cc580a9b71f4041ac46f442fb3add7671280856d8ebbd24cec676f3a00 opus-decoder.min.js

I restarted PC by the way :)

What it can be??

tomfun-sqdl commented 4 months ago

Seems I found the bug:

<script type="text/javascript" src="opus-decoder.min.js" charset="UTF-8"></script>