1

I'm developing a custom cast receiver based on Cast-Player-Sample. I'm getting "Unexpected connected message for already connected sender" and "Unexpected sender already registered". Why? I can't figure it out why I'm getting this.

How can I track this down? What is triggering this?

enter image description here

More screen shots comparing mine version with Cast-Player-Sample:

Mine Mine

Sample Sample

JobaDiniz
  • 862
  • 1
  • 14
  • 32
  • Could you try the same with the Cast-Player-Sample and, say, CastVideos-android app to see if this is reproducible in that receiver, or if it is an artifact of the changes that you have made to your receiver? To further track the issue, you can override onSenderConnected() and onSenderDisconnected() methods and add a log in those two methods to see when a device gets connected or disconnected so you can exactly see the timing, etc. – Ali Naddaf Aug 04 '15 at 05:18
  • Cast-Player-Sample works just fine... `onServerDisconnected` is never fired, but `onSenderConnected` is fired twice. [Screen shot](http://s24.postimg.org/50leut4l1/Capturar.png). I changed the code to reflect company standards... these errors occur, but the video is played just fine... I don't know what to do, specially because I can't even see all debug messages because of Chrome console [bug](https://code.google.com/p/google-cast-sdk/issues/detail?id=621). On the **sender** side I get *INVALID_MEDIA_SESSION_ID* – JobaDiniz Aug 04 '15 at 12:59
  • I compared **mine** version logs with **sample** version logs, and look what I found: [sample](http://s4.postimg.org/ms6du06l9/sample.png) vs [mine](http://s11.postimg.org/sfeaom6cj/mine.png). From what I see, the difference is that **mine** dispatches a sender connected event and **sample** does not: *"[cast.receiver.CastReceiverManager] Dispatching CastReceiverManager sender conneceted event"*. Can you help with those logs? Do you have an idea what's wrong or what should be looked into? – JobaDiniz Aug 04 '15 at 14:12
  • Encountering this issue now as well. It started occurring some time this summer, but seemingly, without any changes to the sender or receiver. – PrplRugby Aug 21 '15 at 18:42

1 Answers1

-1

I think I figured it out. I used the player.js code from Cast-Player-Sample without modifying anything and I still would see "Unexpected connected message for already connected sender" error.

The problem is that I add <video> html tag programmatically and that is causing this error (as it seems). Once I removed the code to fetch the partial template and append it to <body> the error disappear.

But why that happens I don't know... I wish I could add partial template programmatically...

JobaDiniz
  • 862
  • 1
  • 14
  • 32