cast-web-api-desktop icon indicating copy to clipboard operation
cast-web-api-desktop copied to clipboard

Uncaught exception "Cannot call write after a stream was destroyed"

Open codahq opened this issue 5 years ago • 4 comments

I don't know if this needs to go here or back in the original cast-web-api repo so I'm putting it here.

With the 1.2.1 Windows release (and probably all previous versions) there is an issue with frequent crashes. I'm not sure what is happening by looking at the logs either. It appears maybe the API server sends two Callback.send() immediately back to back and the second one crashes the server? I don't know. Here is the log. short.log

codahq avatar Jul 24 '19 17:07 codahq

This is taking down the API web server a few times a day. Where does the desktop installer put the API?

codahq avatar Jul 27 '19 01:07 codahq

I'll look into it, but sadly the desktop app doesn't have robust error handling. See here. I've opened a new issue and will look for fixes as soon as electron adds the features I need.

vervallsweg avatar Aug 02 '19 09:08 vervallsweg

I'm getting the same. But before I'm getting this (I'm taking out the ID for obvious reasons)

playMedia: [{"mediaType":"audio/mp3","mediaUrl":"http://techreviewsandhelp.com/wp-content/uploads/2019/06/Garage-door-open-online-audio-converter.com_.mp3","mediaStreamType":"BUFFERED","mediaTitle":"SmartThings","mediaSubtitle":"SmartThings playback","mediaImageUrl":"https://lh3.googleusercontent.com/nQBLtHKqZycERjdjMGulMLMLDoPXnrZKYoJ8ijaVs8tDD6cypInQRtxgngk9SAXHkA=w300"}]
2019-08-05T11:24:39.032Z [ID] CastReceiver.connect(): exception: TypeError: Cannot read property 'send' of null
message broadcast: true
sessionIdChanged
message broadcast: false
message broadcast: false
message broadcast: false
message broadcast: true
message broadcast: false
message broadcast: false
Uncaught Cannot call write after a stream was destroyed

Oh and this is under the Windows version. The problem seems to happen after 12-24 hours or so of running.

crua9 avatar Aug 05 '19 23:08 crua9

I have this same exact issue. Has there been any updates on this one?

gpetru1 avatar Jul 02 '20 13:07 gpetru1