americanexpress / jest-image-snapshot

✨ Jest matcher for image comparisons. Most commonly used for visual regression testing.
Apache License 2.0
3.81k stars 197 forks source link

TypeError: Cannot read property 'interlace' of undefined #262

Closed MoSattler closed 3 years ago

MoSattler commented 3 years ago

The library does not work for me. Whenever I want to check a png diff, I get this error. I am happy to send the PNG in question via email if it helps debugging the issue.

TypeError: Cannot read property 'interlace' of undefined
    at module.exports (/home/user/project/node_modules/pngjs/lib/parser-sync.js:79:16)
    at Object.exports.read (/home/user/project/node_modules/pngjs/lib/png-sync.js:10:10)
    at diffImageToSnapshot (/home/user/project/node_modules/jest-image-snapshot/src/diff-snapshot.js:220:39)
    at /home/user/project/node_modules/jest-image-snapshot/src/diff-process.js:27:20
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
MoSattler commented 3 years ago

Deleting the old snapshot folder fixed the issue