avajs / ava

Node.js test runner that lets you develop with confidence 🚀
MIT License
20.74k stars 1.41k forks source link

Advanced IPC deseralization may not be working in 3.10.0 #2535

Closed niftylettuce closed 4 years ago

niftylettuce commented 4 years ago
~/Projects/koa-better-error-handler master* 47s
❯ npm test

> koa-better-error-handler@4.0.3 test /Users/jack/Projects/koa-better-error-handler
> ava

⠧ internal/child_process/serialization.js:70
      yield deserializer.readValue();
                         ^

Error: Unable to deserialize cloned data.
    at parseChannelMessages (internal/child_process/serialization.js:70:26)
    at parseChannelMessages.next (<anonymous>)
    at Pipe.channel.onread (internal/child_process.js:566:18)
npm ERR! Test failed.  See above for more details.

From v3.8 to latest, something happened which causes this. If it was this big of a breaking change, then I would think this should have been a major semver bump to v4.0.

I am on node v12.18.0 and see that this was changed here in v3.9 it seems https://github.com/avajs/ava/commit/f06c506d327e89800d9760c678ab0feb78f1a93d#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R10.

This should have definitely been a major semver bump... breaking latest Node LTS stable version is horrible.

niftylettuce commented 4 years ago

ignore

novemberborn commented 4 years ago

The same thing happened in this CI run: https://github.com/avajs/eslint-plugin-ava/runs/843031158?check_suite_focus=true

That ran 12.18.1. Let's keep this open and I'll pin it to see if others are running into the same issue.

The serialization change was introduced in https://github.com/avajs/ava/commit/51fafed989a1b0b9e384dc4c589f3453082dcde1 and it should detect based on the Node.js version… it's definitely not meant to be a breaking change!

niftylettuce commented 4 years ago

Thanks, I thought I was crazy

niftylettuce commented 4 years ago

Definitely happens as soon as I bump from v3.8 to v3.9 on Node v12.18.0

novemberborn commented 4 years ago

Definitely happens as soon as I bump from v3.8 to v3.9 on Node v12.18.0

You mean 3.10 right?

What confuses me now is that our tests pass, yet AVA crashes for our eslint-plugin-ava tests.

novemberborn commented 4 years ago

OK I'm seeing this sporadically with another package, which either hangs, runs fewer tests… or crashes. Will revert that change.

niftylettuce commented 4 years ago

Correct, on v3.10 it is broken and has that error shared above.

novemberborn commented 4 years ago

3.10.1 is now available and should resolve this issue.

acchou commented 4 years ago

I think I'm seeing this with ava 3.12.0 on mac osx, using node v12.18.3:

internal/child_process/serialization.js:70
      yield deserializer.readValue();
                         ^

Error: Unable to deserialize cloned data.
    at parseChannelMessages (internal/child_process/serialization.js:70:26)
    at parseChannelMessages.next (<anonymous>)
    at Pipe.channel.onread (internal/child_process.js:566:18)
novemberborn commented 4 years ago

Yes I re-enabled this with some workarounds. Clearly, this isn't something that can be worked around. Reverting…

novemberborn commented 4 years ago

3.12.1 is now available.