-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnhandledRejection due to Unexpected end of input #366
Comments
I checked all the files with both There is a reported issue for the |
I think the issue may be here, because Lines 76 to 78 in 3f4935d
|
FWIW i had to use the following script to find the offending file: const fs = require('fs');
const { PNG } = require('pngjs');
const filename = process.argv[2];
const png = new PNG();
fs.createReadStream(filename)
.pipe(png)
.on('parsed', () => {
console.log(`Successfully parsed ${filename}`);
})
.on('error', (error) => {
console.log(error);
console.error(`Error parsing PNG-file: ${filename}!`);
}); |
@sk- Thanks!! If you are ok, could you please provide your invalid files to reproduce in my env. |
@bokuweb Unfortunately I don't have the files anymore. But It seemed like a truncated png file as when I opened it, it showed only half of it. Note that an empty file with a |
@sk- I see, I'll try it later. thanks. |
Describe the bug
When running
reg-cli
with a bunch of rendered images I get anUnhandledRejection
error and the application freezes. I realized that empty pngs trigger this, which I was able to solve by first deleting those files. But it also seems that corrupt files also trigger the error. I'm not sure which file is triggering the error.Reproduced step
Steps to reproduce the behavior:
Expected behavior
Invalid image files should not crash or hand the process.
Actual behavior
The text was updated successfully, but these errors were encountered: