provegard/airpnp — Issue #2: Playing Youtube from iPhone to TV Airplay source fails
Author: mholst
Created: 2012-01-14 09:50:22+00:00
State: open

Playing a Youtube video from the dedicated app on the iPhone fails, with the following error:

2012-01-13 22:25:20+0100 [twisted.python.log/4] Log opened.
2012-01-13 22:25:20+0100 [twisted.application.app/4] twistd 10.2.0 (/usr/bin/python 2.7.1) starting up.
2012-01-13 22:25:20+0100 [twisted.application.app/4] reactor class: twisted.internet.selectreactor.SelectReactor.
2012-01-13 22:25:20+0100 [twisted.internet.tcp/4] twisted.web.server.Site starting on 28080
2012-01-13 22:25:20+0100 [twisted.internet.tcp/4] twisted.web.server.Site starting on 53209
2012-01-13 22:25:20+0100 [twisted.plugins.airpnp_plugin/1] Configuration file is /home/mholst/airpnp/AIRPNPRC, config loaded = True
2012-01-13 22:25:20+0100 [twisted.plugins.airpnp_plugin/1] Using interface eth1 with IP address 192.168.3.1
2012-01-13 22:25:20+0100 [airpnp.bridge/1] Airpnp started. Will now search for UPnP devices!
2012-01-13 22:25:20+0100 [airpnp.bridge/1] Starting interactive web at port 28080
2012-01-13 22:25:20+0100 [twisted.internet.udp/4] airpnp.upnp.SSDPServer starting on 1900
2012-01-13 22:25:20+0100 [airpnp.device_discovery/3] Sending out M-SEARCH discovery requests
2012-01-13 22:25:21+0100 [twisted.internet.udp/4] airpnp.upnp._dp starting on 40204
2012-01-13 22:25:21+0100 [airpnp.device_discovery/3] Starting build of device with UDN = uuid:55076f6e-6b79-4d65-643b-001109c9fe1d
2012-01-13 22:25:21+0100 [airpnp.device_discovery/3] Starting build of device with UDN = uuid:57076f6e-6b79-4d65-643b-001109c9fe1d
2012-01-13 22:25:21+0100 [airpnp.device_discovery/2] Adding device TwonkyServer [Flash] [UDN=uuid:55076f6e-6b79-4d65-643b-001109c9fe1d] to ignore list, because device type urn:schemas-upnp-org:device:MediaServer:1 is not recognized
2012-01-13 22:25:21+0100 [airpnp.device_discovery/2] Adding device Twonky NMC Stationary [Flash] [UDN=uuid:57076f6e-6b79-4d65-643b-001109c9fe1d] to ignore list, because device type urn:schemas-upnp-org:device:RemoteUIServerDevice:1 is not recognized
2012-01-13 22:25:21+0100 [twisted.internet.udp/4] airpnp.upnp._dp starting on 57747
2012-01-13 22:25:22+0100 [airpnp.device_discovery/3] Starting build of device with UDN = uuid:d07cce8a-4085-016d-9875-c100b108b138
2012-01-13 22:25:22+0100 [airpnp.device_discovery/3] Starting build of device with UDN = uuid:31c40d93-2915-477b-33d7-26643712c6f8
2012-01-13 22:25:22+0100 [airpnp.device_discovery/2] Adding device TV [UDN=uuid:31c40d93-2915-477b-33d7-26643712c6f8] to ignore list, because device type urn:samsung.com:device:PersonalMessageReceiver:1 is not recognized
2012-01-13 22:25:22+0100 [airpnp.bridge/1] Found device TV [UDN=uuid:d07cce8a-4085-016d-9875-c100b108b138] with base URL http://192.168.3.12:52235/dmr/SamsungMRDesc.xml
2012-01-13 22:25:22+0100 [twisted.internet.tcp/4] twisted.web.server.Site starting on 22555
2012-01-13 22:25:22+0100 [airpnp.AirPlayService/1] AirPlayService 'TV' is running at 192.168.3.1:22555
2012-01-13 22:25:23+0100 [airpnp.device_discovery/3] Starting build of device with UDN = uuid:22705146-1dd2-11b2-b298-001c10f7f339
2012-01-13 22:25:23+0100 [airpnp.device_discovery/2] Adding device Cisco Wireless-N VPN Router [UDN=uuid:22705146-1dd2-11b2-b298-001c10f7f339] to ignore list, because device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 is not recognized
2012-01-13 22:25:26+0100 [twisted.internet.udp/4] (Port 40204 Closed)
2012-01-13 22:25:27+0100 [twisted.internet.udp/4] (Port 57747 Closed)
2012-01-13 22:26:08+0100 [airpnp.airplayserver/3] Got AirPlay request, URI = /server-info, {'x-apple-session-id': '54eed8fd-19c5-4af5-b154-c72c697f7f42', 'x-apple-device-id': '0xcc08e00e513d', 'content-length': '0', 'user-agent': 'MediaControl/1.0'}
2012-01-13 22:26:08+0100 [twisted.python.log/4] 192.168.3.9 - - [13/Jan/2012:21:26:08 +0000] "GET /server-info HTTP/1.1" 200 400 "-" "MediaControl/1.0"
2012-01-13 22:26:08+0100 [airpnp.airplayserver/3] Got AirPlay request, URI = /reverse, {'x-apple-session-id': '54eed8fd-19c5-4af5-b154-c72c697f7f42', 'content-length': '0', 'upgrade': 'PTTH/1.0', 'x-apple-purpose': 'event', 'user-agent': 'MediaControl/1.0', 'connection': 'Upgrade'}
2012-01-13 22:26:08+0100 [twisted.python.log/4] 192.168.3.9 - - [13/Jan/2012:21:26:08 +0000] "POST /reverse HTTP/1.1" 101 - "-" "MediaControl/1.0"
2012-01-13 22:26:09+0100 [airpnp.airplayserver/3] Got AirPlay request, URI = /play, {'x-apple-session-id': '54eed8fd-19c5-4af5-b154-c72c697f7f42', 'x-transmit-date': '2012-01-13T21:26:09.158734Z', 'content-length': '491', 'content-type': 'application/x-apple-binary-plist', 'user-agent': 'MediaControl/1.0'}
2012-01-13 22:26:09+0100 [airpnp.bridge/2] (-> TV) Starting playback of http://redirector.c.youtube.com/videoplayback?id=b987a3731018344e&itag=18&source=youtube&uaopt=no-save&el=videos&client=ytapi-apple-iphone&devKey=AdW2Kh1KB1Jkhso4mAT4nHgO88HsQjpE1a8d1GxQnGDm&app=youtube_gdata&ip=0.0.0.0&ipbits=0&expire=1329062428&sparams=id,itag,source,uaopt,ip,ipbits,expire&signature=5C8D4709DB9DC36E115C5A8AAB8100A4A7A8D638.5221F2743A8E8178B78530A78320DBE40CB855A8&key=yta1 (requested position is 0.000000)
2012-01-13 22:26:09+0100 [airpnp.device_discovery/3] Sending SOAP message to TV: SetAVTransportURI(InstanceID=0, CurrentURI=http://redirector.c.youtube.com/videoplayback?id=b987a3731018344e&itag=18&source=youtube&uaopt=no-save&el=videos&client=ytapi-apple-iphone&devKey=AdW2Kh1KB1Jkhso4mAT4nHgO88HsQjpE1a8d1GxQnGDm&app=youtube_gdata&ip=0.0.0.0&ipbits=0&expire=1329062428&sparams=id,itag,source,uaopt,ip,ipbits,expire&signature=5C8D4709DB9DC36E115C5A8AAB8100A4A7A8D638.5221F2743A8E8178B78530A78320DBE40CB855A8&key=yta1, CurrentURIMetaData=)
2012-01-13 22:26:09+0100 [twisted.python.log/4] Failed to send command "SetAVTransportURI" to device TV [UDN=uuid:d07cce8a-4085-016d-9875-c100b108b138]
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/twisted/web/resource.py", line 210, in render
return m(request)
File "/home/mholst/airpnp/airpnp/AirPlayService.py", line 116, in render_POST
self.apserver.play(parsedbody['Content-Location'], float(position))
File "/home/mholst/airpnp/airpnp/bridge.py", line 200, in play
self._avtransport.SetAVTransportURI(InstanceID=self._instance_id, CurrentURI=location, CurrentURIMetaData='')
File "/home/mholst/airpnp/airpnp/device.py", line 211, in __call__
msg, async=async, deferred=deferred)
--- ---
File "/home/mholst/airpnp/airpnp/device_discovery.py", line 179, in _send_soap_message
log_answer(answer)
File "/home/mholst/airpnp/airpnp/device_discovery.py", line 169, in log_answer
(device.friendlyName, format_soap_message(response)), ll=3)
File "/home/mholst/airpnp/airpnp/util.py", line 217, in format_soap_message
args = msg.get_args()
exceptions.AttributeError: 'SoapError' object has no attribute 'get_args'

2012-01-13 22:26:09+0100 [twisted.python.log/4] Failed to process AirPlay request.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/twisted/web/http.py", line 1641, in allContentReceived
req.requestReceived(command, path, version)
File "/usr/lib/python2.7/dist-packages/twisted/web/http.py", line 807, in requestReceived
self.process()
File "/usr/lib/python2.7/dist-packages/twisted/web/server.py", line 125, in process
self.render(resrc)
File "/usr/lib/python2.7/dist-packages/twisted/web/server.py", line 132, in render
body = resrc.render(self)
--- ---
File "/home/mholst/airpnp/airpnp/airplayserver.py", line 119, in render
ret = resource.Resource.render(self, request)
File "/usr/lib/python2.7/dist-packages/twisted/web/resource.py", line 210, in render
return m(request)
File "/home/mholst/airpnp/airpnp/AirPlayService.py", line 116, in render_POST
self.apserver.play(parsedbody['Content-Location'], float(position))
File "/home/mholst/airpnp/airpnp/bridge.py", line 200, in play
self._avtransport.SetAVTransportURI(InstanceID=self._instance_id, CurrentURI=location, CurrentURIMetaData='')
File "/home/mholst/airpnp/airpnp/device.py", line 211, in __call__
msg, async=async, deferred=deferred)
File "/home/mholst/airpnp/airpnp/device_discovery.py", line 179, in _send_soap_message
log_answer(answer)
File "/home/mholst/airpnp/airpnp/device_discovery.py", line 169, in log_answer
(device.friendlyName, format_soap_message(response)), ll=3)
File "/home/mholst/airpnp/airpnp/util.py", line 217, in format_soap_message
args = msg.get_args()
exceptions.AttributeError: 'SoapError' object has no attribute 'get_args'

2012-01-13 22:26:09+0100 [twisted.python.log/4] 192.168.3.9 - - [13/Jan/2012:21:26:08 +0000] "POST /play HTTP/1.1" 501 - "-" "MediaControl/1.0"
2012-01-13 22:26:09+0100 [airpnp.airplayserver/3] Got AirPlay request, URI = /rate?value=0.000000, {'x-apple-session-id': '54eed8fd-19c5-4af5-b154-c72c697f7f42', 'content-length': '0', 'user-agent': 'MediaControl/1.0'}
2012-01-13 22:26:09+0100 [twisted.python.log/4] 192.168.3.9 - - [13/Jan/2012:21:26:09 +0000] "POST /rate?value=0.000000 HTTP/1.1" 200 - "-" "MediaControl/1.0"