jamsinclair / jSquash

Browser & Web Worker focussed wasm bundles derived from the Squoosh App.
Apache License 2.0
222 stars 14 forks source link

decoding Jpeg on CloudFlare workers throws error cannot call .bind of undefined #18

Open matthewhardern opened 1 year ago

matthewhardern commented 1 year ago

Trying to decode jpg using the jpg decoder, getting constructor.bind.apply(constructor,argsList) coming out as undefined at some point. First its Uint8ClampedArray, then undefined. This is in mozjpeg_dec.js

[Function: function Uint8ClampedArray() { [native code] }]
undefined

What would you need to debug this?

jamsinclair commented 1 year ago

What would you need to debug this?

A reproduction or an example of the worker script would be very useful 🙇 . We need some more data and context to debug.

I have made some updates recently. I wonder if you follow along with the Cloudflare Examples whether that will solve your issue. See Usage in Cloudflare Workers