Skip to content
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

Assertion `Buffer::HasInstance(args[4])' failed when using puppeteer #68

Closed
udiedrichsen opened this issue Apr 9, 2018 · 8 comments
Closed

Comments

@udiedrichsen
Copy link

udiedrichsen commented Apr 9, 2018

See:
puppeteer/puppeteer#2042

jest-image-snapshot version 1.0.1 works without this problem.
All 2.x versions have this issue.

@PixnBits
Copy link
Contributor

PixnBits commented Apr 9, 2018

From GoogleChrome/puppeteer#2042 this looks like an issue running in nodejs v9, did you also encounter this in node v8?

@anescobar1991
Copy link
Member

@udiedrichsen see #31

There are issues when running with node 9 due to pngjs not being compatible. Closing this issue as there is nothing that can be done from our end.

@Schnueggel
Copy link

@anescobar1991 does it not look as if you have a broken dependency in your project? pngjs is not actively maintained anymore? So I wonder if closing this issue is the right step

@anescobar1991
Copy link
Member

@Schnueggel the issue I have is that the "solution" at this point would be to switch to pngjs-nozlib but I am reluctant to do so since there is no guarantee of that library being maintained as I mentioned in a previous issue.

With node 10 being LTS in few months (October) though I may have to find an alternative though as these issues will persist there.

In the meantime I will re-open this issue though as you are right it is a problem that needs to be dealt with and ultimately does affect jest-image-snapshot users.

@anescobar1991 anescobar1991 reopened this Apr 10, 2018
@KaySackey
Copy link

As commented on PNGJS, the creator doesn't do active maintenance anymore, and only accepts pull requests, so I am not sure that staying with that library is the right solution either.

A possible solution would be allowing users to choose their own image-comparison library, so even if the default solution is no longer valid on their platform, they can simply plug in a working one rather than having to fork jest-image-snapshot to do so.

@Schnueggel
Copy link

@anescobar1991 Right now I forked jest-image-snapshot and replaced pngjs with pngjs-nozlib as a quick solution. But pngjs-nozlib seems not to be maintained at all.

A solution could be to make a pull request to pngjs and fix the problem. I took a quick look. But I think I would need some time to find the problem and fix it. I am not sure if I want to spent the time on a project that is not maintained anymore.

@anescobar1991
Copy link
Member

anescobar1991 commented Apr 11, 2018

@Schnueggel Yeah it's tough as there are no png libraries that are well maintained and tested for node (at least that I could find). If anyone knows of any viable alternatives let me know. This is obviously going to affect a lot more libraries than just mine as pngjs seems to be the main png library for node.

@anescobar1991
Copy link
Member

closed with #72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants