Using browser-image-compression npm package causes "infinite wait"
See original GitHub issueHi, I´m using https://www.npmjs.com/package/browser-image-compression for compress some images on my web app. The fact is that when I obfuscate the code, the library call never returns, resulting in an “infinite wait”. I know that is this calls because I put a lot of logs for debug this, but no error is given 😰
Without obfuscating it, it works.
Your Environment
- Obfuscator version used: 0.25.2
- Node version used: 10.16.3
Stack trace
The library doesn’t produce any error, it just gets stuck
Minimal working example that will help to reproduce issue
async reduceImages(files: File[]): Promise<File[]> {
return Promise.all(
files.map(async (file: File) => {
try {
const resizedImage = await this.imageCompression(file, {
maxWidthOrHeight: 1200, // px
});
return resizedImage;
} catch (error) {
this.logger.warn('Resize error:', error);
return file;
}
}),
);
}
I can upload the obfuscated javascript file if needed 👍
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (12 by maintainers)
Top Results From Across the Web
browser-image-compression - npm
Features. You can use this module to compress jpeg and png images by reducing resolution or storage size before uploading to the application ......
Read more >compress base64 image npm - Bro Science Bible
Start using compress-images in your project by running `npm i ... statistics from the GitHub repository for the npm package browser-image-compression, ...
Read more >How to Compress an Image in React (in 2023) | AbstractAPI
Compress Images Using Browser Image Compression · Get Started. First, download the package from NPM. npm install --save browser-image-compression.
Read more >Top 5 browser-image-compression Code Examples - Snyk
Learn more about how to use browser-image-compression, based on browser-image-compression code examples created from the most popular ways it is used in ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, please take a look to:
https://github.com/rricamar/javascript-obfuscator-566
It’s a repo with a minimal working of obfuscation not working. If I use the non-obfuscated option it works. Anything please let me know.
Steps to reproduce:
Ty as always 🙏
Yes, try to disable web worker. And use
0.25.4
version. You should disable web worker anyway.