-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handling timeout properly #44
Comments
Got same error recently. And displayed stack trace didn't lead to any of my sources, so not sure even where to check with
|
Can you provide code to reproduce the issue ? |
Sure, just pushed code I was playing with to my Chromecast repo. |
P.S. I have few questions for the flow to make UX as flawless and automatic as possible, not sure about some cases event handling, would be happy if you'd ping me via email (should be seen in my profile) to solve them and build +/- stable app out there (didn't find your contact). |
I meant something like the minimal code sample that reproduces the issue. I really don't have enough free time to delve through large codebases. Anyway I did a search on this repo with the error message you got (https://github.com/thibauts/node-castv2-client/search?utf8=%E2%9C%93&q=Device+timeout) which leads straight to the answer you're looking for. You have to listen to error messages emitted by your I suspect this is the problem you all have here. Once timed-out the playing state is lost on the Chromecast itself and solely reconnecting doesn't make it. This probably won't ever be solved in this module, as the code is receiver-agnostic and can't know the process to put a given app in a given state. I can understand this is frustrating. If you think I'm mistaken, provide the minimal code that reproduces your issue and simple instructions to run it. I really can't allocate 1~2 hours every time an issue is opened. I don't even have time to work on my current projects. I'm sure you'll understand. @Z-AX About your UX question, please open an issue and label is as you feel appropriate. I'll try to follow-up. This way it will be simpler and potentially benefit others. |
Having the same issue! |
My april 3 comment still applies. Please provide a minimal code sample reproducing the issue so we can investigate further. |
Using mafintosh/chromecasts on top of this module, I keep hitting a very serious issue:
When playing a video, then pausing for N minutes, or simply stopping, and then trying to play again, I get "cannot access .send of undefined", since the socket has been closed.
This is OK to some extent, because we have 'close' events which we can handle.
The weird thing is that 'error' never fires (where
var client = new castv2.Client()
), not onclient
, norclient.client
, nor onplayer
(whereclient.launch(castv2.DefaultMediaReceiver, function (err, player) { ... })
)It does fire sometimes, a few minutes after the actual close
But how to handle the cases when the connection is closed? A simple reconnect on the same chromecast address does not work - with our without
.launch
-ingDefaultMediaReceiver
. In both casesgetStatus
keeps returningundefined
for status andnull
as an error.For whatever reason some state is kept somewhere. Or it requires the .play to be called again.
In any case, I haven't find a robust way to re-initiate the connection like nothing happened.
The heartbeat is working properly, but doesn't seem to be helping.
The text was updated successfully, but these errors were encountered: