I have been trying to track down the same bug for the past 5 hours or so, and nothing has helped. I've implemented debugging tools, reduced the problem case, tried many variations to see what influences the behaviour, improved logging, even did a diff between full-blast "log absolutely everything" output to play spot the differences between the broken and working case...
And I *still* have no idea where it's breaking.
And it involves this miserable pile of async complexity: https://www.npmjs.com/package/push-buffer
(And that's already the nth revision I made of that package, turns out this is just a very annoying problem to find a reliable and sufficiently flexible solution for.)
At least the problem *probably* isn't with push-buffer itself this time, but rather with something using it, but I still have to read annoying push-buffer logs to work it out...
I wasn't kidding about the misery thing: https://git.cryto.net/joepie91/push-buffer/commit/9abf7b2631abc90d113c0d646074109810029f31
Oh well. If nothing else, I've come out of this with a bunch of nice new debugging tools.