vervallsweg / cast-web-api

Quick and dirty web API for Google Cast enabled devices.
GNU General Public License v3.0
141 stars 74 forks source link

Did something happen upstream? Broadcast Assistant Requests Crashing #132

Open codahq opened 4 years ago

codahq commented 4 years ago

The first broadcast request will go through because I can hear the broadcast on the Google devices but no response (0 bytes) is sent from the node web server because it appears to be hung. Any next request will not go through at all until cli is stopped, "pm2 kill" is run and the leftover node process is killed manually or until a timeout is hit. (it seems to be about 5 minutes)

I think I first started noticing this problem around Friday (3 days ago). On or before Friday I ran an 'npm update' which could have upgraded a dependency. Since then I have updated again as well as updated node, npm and pm2.

Possibilities:

The log shows:

/assistant/broadcast
response: 
response: 
response:Assistant response: 
ended error: undefined, continueConversation: false
ended error: undefined, continueConversation: false
message broadcast: true

Error log is empty. Any ideas?

This is causing all kinds of issues in the device handler because it sits and waits for a response (and none is given and eventually times out). The waiting ties up a thread and there are very few to go around to have one sitting and waiting for a response that never comes.

codahq commented 4 years ago

Following up on this... I checked out my API usage and I found this. Every single API call results in error e.g. 100% error rate.

image

For some background, I have the cli version installed in Windows Server 2012. Client ID, secret and authorization all valid obviously (especially since I can hear the broadcast).