After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 659146 - Banshee can't connect with the forked-daapd daap server
Banshee can't connect with the forked-daapd daap server
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: DAAP
2.0.1
Other Linux
: Normal normal
: ---
Assigned To: Banshee Maintainers
Banshee Maintainers
: 659276 666237 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-09-15 13:45 UTC by scnaifeh
Modified: 2012-03-17 17:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Banshee debug log (2.42 KB, text/plain)
2011-09-18 15:03 UTC, scnaifeh
  Details
Send revision-number on every update request so that some daap servers reply correctly to them (3.10 KB, patch)
2012-03-17 01:11 UTC, Nuno Araujo (IRC: russo79)
committed Details | Review

Description scnaifeh 2011-09-15 13:45:57 UTC
Banshee will not connect to forked-daapd, because in the first call to daap:/server/update, it does not pass a "revision-number" parameter, which forked-daapd expects.  This is arguably a bug in forked-daapd, as the specification (insofar as it has been reverse engineered) does not appear to require this parameter in the first update call after login, but recent versions of iTunes apparently pass it (I haven't tested it with versions prior to 9).   

In addition, even if this is worked around (which I did by hacking forked-daapd so that it does not require the parameter), Banshee will not play transcoded files from forked-daapd because forked-daapd does not add a "Content-Length" header to the http response to the "play" request because it cannot accurately calculate the size until after the transcoding is complete.  Banshee requires this header and requires it to be greater than or equal to 1.  It's hard to say that forked-daapd is buggy here, because this is not an issue iTunes has to deal with on the server side, because it does not transcode, but as a client, iTunes is not thrown off by the lack of a Content-Length header, and so Banshee should not require it either if it is going to behave consistently with iTunes.
Comment 1 Andrés G. Aragoneses (IRC: knocte) 2011-09-15 14:52:35 UTC
Please file a bug per issue, not 2 issues in 1 bug.

In regards to the requiring of Content-Length header, can you paste a debug log of Banshee when it tries to reproduce the track?
Comment 2 scnaifeh 2011-09-18 15:03:25 UTC
Created attachment 196883 [details]
Banshee debug log

Debug log showing Content-Length error attached
Comment 3 Michael Martin-Smucker 2011-09-20 12:48:54 UTC
*** Bug 659276 has been marked as a duplicate of this bug. ***
Comment 4 Bertrand Lorentz 2011-12-16 17:17:35 UTC
*** Bug 666237 has been marked as a duplicate of this bug. ***
Comment 5 Bertrand Lorentz 2011-12-16 17:19:49 UTC
Confirming because of multiple duplicates.

Logs from the duplicate :

Error client side:
[Warn  10:38:41.213] Caught an exception - Daap.ContentException: Could not
find root node 'dmap.serverrevision' (in `Banshee.Daap')
  at Daap.ContentParser.Parse (Daap.ContentCodeBag bag, System.Byte[] buffer,
System.String root, System.Int32& offset) [0x00000] in <filename unknown>:0 
  at Daap.ContentParser.Parse (Daap.ContentCodeBag bag, System.Byte[] buffer,
System.String root) [0x00000] in <filename unknown>:0 
  at Daap.Client.GetCurrentRevision () [0x00000] in <filename unknown>:0 
  at Daap.Client.Refresh () [0x00000] in <filename unknown>:0 
  at Daap.Client.Login (System.String username, System.String password)
[0x00000] in <filename unknown>:0 
Daap.LoginException: Failed to login (in `Banshee.Daap')
  at Daap.Client.Login (System.String username, System.String password)
[0x00000] in <filename unknown>:0 
  at Daap.Client.Login () [0x00000] in <filename unknown>:0 
  at Banshee.Daap.DaapSource.<Activate>m__7 () [0x00000] in <filename
unknown>:0

Error in forked-daapd:

daap: Missing revision-number in update request.
Comment 6 Fabio Sasso 2011-12-17 10:11:48 UTC
thanks, solutions?
Comment 7 Bertrand Lorentz 2012-01-09 19:22:03 UTC
Bug #667508 was just filed for the Content-Length issue, so let's make this one just about the revision-number problem.
Comment 8 Nuno Araujo (IRC: russo79) 2012-03-17 01:11:58 UTC
Created attachment 209972 [details] [review]
Send revision-number on every update request so that some daap servers reply correctly to them

It seems that some daap servers (e.g. forked-daapd) do not accept update requests without if a revision-number is not passed in the query.

Using Wireshark, I took a look at the communication that took place between Rhythmbox and forked-daap, and Rhythmbox always sends the revision-number in the update request, even in it's initial one.
The initial value is 1.

This patch implements the same behavior in Banshee.
Comment 9 Bertrand Lorentz 2012-03-17 17:20:11 UTC
Comment on attachment 209972 [details] [review]
Send revision-number on every update request so that some daap servers reply correctly to them

Thanks for the patch, committed !
Comment 10 Bertrand Lorentz 2012-03-17 17:20:27 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.