node-warc icon indicating copy to clipboard operation
node-warc copied to clipboard

WARCStreamTransform can experience ERR_MULTIPLE_CALLBACK error

Open cmawhorter opened this issue 1 year ago • 2 comments

https://github.com/N0taN3rd/node-warc/blob/be3897198847fa49023ca4d09f09c0010dd98540/lib/parsers/warcStreamTransform.js#L110-L115

since _consumeChunk calls done, i think this should be:

  _flush (done) {
    if (this.buffered) {
      this._consumeChunk(this.buffered, done, true)
    } else {
      done()
    }
  }

cmawhorter avatar Feb 06 '23 19:02 cmawhorter

Hey, I just made this change because I ran into the exact error you are talking about. I was using their stream demo code and this fixed it.

efrazier avatar May 26 '23 15:05 efrazier

It looks like this repo is no longer maintained. I published a fork with this fix here, NPM package here.

npm install --save @context-labs/node-warc

samheutmaker avatar Jul 19 '23 02:07 samheutmaker