vervallsweg/cast-web-api-desktop

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

Opened this issue · 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

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

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.

crua9 commented

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.

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