question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error on stream close before end

See original GitHub issue

This error is being thrown when I close the stream prior to the video being completed, every time. The stream is being piped into FFMpeg, then into Opus which then gets transmitted through a web socket on a voice chat. The end stream function is from the library which is handling FFMpeg and Opus. It’s not having an issue with any other media types, though other youtube downloaders haven’t been tried. This happens on NodeJS 4.2.x and 5.5.0.

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

Error: read ECONNRESET
    at exports._errnoException (util.js:860:11)
    at Pipe.onread (net.js:544:26)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:30 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
meew0commented, Jan 26, 2016

I’ve also had the issue with the same setup, and I wanted to share my workaround: https://github.com/meew0/Lethe/blob/master/lethe.js#L564

It’s really hacky but it works.

0reactions
jnwarnercommented, Apr 23, 2017

I’m not sure which side the error belongs to, but both are telling me it is probably not them. I’m relatively new to node debugging and cannot seem to find where the error is coming from. If this helps at all, the StreamDispatcher object is not throwing any errors when a skip occurs, it just calls it’s end function. A moderator on the discord.js support server sent this not too long ago: https://gyazo.com/c4ecd202d34c74dc627c941bae044cfd

Read more comments on GitHub >

github_iconTop Results From Across the Web

java IO Exception: Stream Closed - Stack Overflow
You're calling writer.close(); after you've done writing to it. Once a stream is closed, it can not be written to again.
Read more >
"Stream has already been operated upon or closed" Exception ...
In this brief article, we're going to discuss a common Exception that we may encounter when working with the Stream class in Java...
Read more >
'close' event called before 'end' in paused stream · Issue #19166
I believe I've found an akward behaviour of a stream in paused mode using the net module. In some specific cases, when the...
Read more >
Errors with opening and closing file streams
Although I'm closing the file streams at the end of the program, it gives me errors when executing the program more than once....
Read more >
Node.js Readable Stream close Event - GeeksforGeeks
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found