alltherooms / cached-request

Node.js module to perform HTTP requests with caching support
MIT License
61 stars 23 forks source link

Error: stream.push() after EOF #19

Open AndyOGo opened 8 years ago

AndyOGo commented 8 years ago

Unfortunately if I use this tool, I sometimes, randomly get this error (it does not happen always)

events.js:160
     throw er; // Unhandled 'error' event
     ^

Error: stream.push() after EOF
   at readableAddChunk (_stream_readable.js:156:17)
   at RequestMiddleware.Readable.push (_stream_readable.js:134:10)
   at IncomingMessage.<anonymous> (...\betrieb\places_zip_geo_mashup\node_modules\cached-request\lib\request-middleware.js:59:12)
   at emitOne (events.js:101:20)
   at IncomingMessage.emit (events.js:188:7)
   at IncomingMessage.Readable.read (_stream_readable.js:381:10)
   at flow (_stream_readable.js:761:34)
   at resume_ (_stream_readable.js:743:3)
   at _combinedTickCallback (internal/process/next_tick.js:74:11)
   at process._tickCallback (internal/process/next_tick.js:98:9)
ghost commented 7 years ago

can confirm this [15:34:33.437] Fri Jan 13 2017 15:34:33 GMT+0100 (CET) Error: stream.push() after EOF

And then the cache is corrupted: [15:34:35.053] Fri Jan 13 2017 15:34:35 GMT+0100 (CET) SyntaxError: Unexpected end of JSON input

elhoyos commented 7 years ago

Which node versions are you guys using when having this issue?

https://github.com/nodejs/node-v0.x-archive/issues/5439 seems very likely a possibility here.

filly82 commented 6 years ago

I have the same problem, node 4.8.4 is the version

`events.js:141 throw er; // Unhandled 'error' event ^

Error: stream.push() after EOF at readableAddChunk (_stream_readable.js:133:17) at RequestMiddleware.Readable.push (_stream_readable.js:111:10) at IncomingMessage. (D:\repositories\git\entwicklung\data_collectors\node_modules\cached-request\lib\request-middleware.js:59:12) at emitOne (events.js:82:20) at IncomingMessage.emit (events.js:169:7) at IncomingMessage.Readable.read (_stream_readable.js:368:10) at flow (_streamreadable.js:759:26) at resume (_stream_readable.js:739:3) at nextTickCallbackWith2Args (node.js:511:9) at process._tickCallback (node.js:425:17)`