GNOME Bugzilla – Bug 696762
GUPnP-AV-CP cannot browse WMP DMS running on Windows 7
Last modified: 2013-04-05 10:40:10 UTC
This is fairly easy to reproduce. Just start, gupnp-av-cp, and try to browse the contents of a WMP DMS. You will be unable to browse and the following errors will appear in the console. ** (gupnp-av-cp:3892): WARNING **: Failed to browse 'http://127.0.0.1:61924/DeviceDescription.xml': Invalid args ** (gupnp-av-cp:3892): WARNING **: Failed to browse 'http://192.168.0.19:2869/upnphost/udhisapi.dll?content=uuid:286082b7-e061-45dc-99a4-c320555d3c7a': Invalid Args ** (gupnp-av-cp:3892): WARNING **: Failed to get metadata for '0': Invalid Args After discussions on IRC it seems that the problem is that commit d80d05f inadvertently reorders the arguments of SOAP requests GUPnP sends to DMSs. Most DMS don't seem to care about this but WMP does apparently. So, for example, currently GUPnP is sending: <s:Body> <u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"> <ObjectID>0</ObjectID> <RequestedCount>0</RequestedCount> <StartingIndex>0</StartingIndex> <BrowseFlag>BrowseDirectChildren</BrowseFlag> <Filter>res,dc:date,res@size</Filter> <SortCriteria></SortCriteria> </u:Browse></s:Body></s:Envelope> And it should be sending <s:Body> <u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"> <ObjectID>0</ObjectID> <BrowseFlag>BrowseDirectChildren</BrowseFlag> <Filter>res,dc:date,res@size</Filter> <StartingIndex>0</StartingIndex> <RequestedCount>0</RequestedCount> <SortCriteria></SortCriteria> </u:Browse></s:Body></s:Envelope>
Related bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=519464
Incidentally, this bug also prevents GUPnP from working with MediaConnect on the iPhone.
And TwonkyBeam
Created attachment 240361 [details] [review] Add testcase for bgo#696762
Created attachment 240362 [details] [review] Preserve argument order
I tested the patch this morning and I can confirm that it fixes the compatibility problems with Windows Media Player in Windows 7. Incidentally, I was unable to get gupnp-av-cp to use WMP as a DMR, i.e., to display an image hosted by WMP running on the same machine using gupnp-av-cp, but this seems to be a separate issue and is not caused by commit d80d05f, even though the error messages are similar. I know this, as I reverted commit d80d05f and was still unable to display an image on WMP using gupnp-av-cp. Note I was able to push an image to WMP's DMR using dLeyna. I suspect this is not working in gupnp-av-cp as gupnp-av-cp is using gupnp_service_proxy_begin_action_hash. In any case, this is a different bug.
Attachment 240362 [details] pushed as d2684ea - Preserve argument order