enen92/script.tubecast

Cast icon does not appear in Android

Opened this issue · 7 comments

Hi.
Cast icon does not appear on YouTube app on Android.
I can see SSDP packages on network but icon still does not appear.
Also device-desc.xml looks good.

<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:r="urn:restful-tv-org:schemas:upnp-dd"> <specVersion> <major>1</major> <minor>0</minor> </specVersion> <URLBase>http://192.168.1.11:8008</URLBase> <device> <deviceType>urn:schemas-upnp-org:device:dail:1</deviceType> <friendlyName>Kodi (LibreELEC)</friendlyName> <manufacturer>Kodi</manufacturer> <modelName>Tubecast</modelName> <UDN>uuid:007d00ac-8b1f-52e0-80d0-4e4b736ae194</UDN> </device> </root>

Any idea?
Thanks

Hi, just adding more info
I can see some request between PC and Addon

REQUEST
GET /apps/YouTube HTTP/1.1 Host: 192.168.1.3:8008 Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36 Accept-Encoding: gzip, deflate
RESPONSE

`HTTP/1.0 200 OK
Date: Fri, 27 Dec 2019 17:47:44 GMT
Server: WSGIServer/0.1 Python/2.7.16
Content-Length: 214
Access-Control-Expose-Headers: Location
Content-Type: application/xml
Cache-Control: no-cache, must-revalidate, no-store
Access-Control-Allow-Method: GET, POST, DELETE, OPTIONS

YouTube stopped `

There you can see state=stopped
Is this ok?
Thanks

Adding more info

Using tcpdump can see an empty response with only HTTP 200 when doing:

`GET /ssdp/device-desc.xml HTTP/1.1
Host: 192.168.1.6:8008
Connection: keep-alive
Origin: package:com.google.android.youtube
User-Agent: com.google.android.youtube/14.50.53(Linux; U; Android 7.0; es_US; Redmi Note 4 Build/NRD90M) gzip
Accept-Encoding: gzip, deflate

HTTP/1.0 200 OK
`

Can you simulate the same request via curl or python-requests?

Hi,
Doing it manually from a PC using telnet it is working fine

`[krugean@COKRUGEAN ~]$ telnet 192.168.1.3 8008
Trying 192.168.1.3...
Connected to 192.168.1.3.
Escape character is '^]'.
GET /ssdp/device-desc.xml HTTP/1.1
Host: 192.168.1.6:8008
Connection: keep-alive
Origin: package:com.google.android.youtube
User-Agent: com.google.android.youtube/14.50.53(Linux; U; Android 7.0; es_US; Redmi Note 4 Build/NRD90M) gzip
Accept-Encoding: gzip, deflate

HTTP/1.0 200 OK
Date: Fri, 27 Dec 2019 22:27:12 GMT
Server: WSGIServer/0.1 Python/2.7.16
Application-Url: http://192.168.1.6:8008/apps
Content-Length: 547
Access-Control-Expose-Headers: Location
Content-Type: application/xml
Access-Control-Allow-Method: GET, POST, DELETE, OPTIONS

1 0 http://192.168.1.6:8008 urn:schemas-upnp-org:device:dail:1 comedor Kodi Tubecast uuid:1a0c27eb-5399-57d5-92bb-641865a0866b `

But, i can see something wrong on:

<URLBase>http://192.168.1.6:8008</URLBase>

That IP is not the current kodi IP.
Current IP is 192.168.1.3

Let me know if more info is needed.
Thanks

Sorry, I close it by mistake

siku2 commented

The base url is based on the HOST header... I don't understand why it would differ from the actual ip address unless there's some routing going on.
Are you sure that Kodi is in the same network as your phone?

This might be fixed by using the actual socket address from the Chromecast server instead of echoing the HOST header. But that's just a long shot.

also on ios kodi is not shown on youtube app pairing code works and then nothing loads.
when i close youtube app and reopen nothing appears.
I use win 11 for kodi