Last.fm streams not working: Error parsing tracklist
#1
Hi!

I'm experiencing problems using xbmc's builtin last.fm function. I can connect to last.fm with my username and password, but selecting any stream or searching for artists and playing those results in a short progress window and nothing else.

In the log i see:
Code:
16:56:45 T:3367967056 M:2622717952   DEBUG: Curl::Debug About to connect() to ws.audioscrobbler.com port 80 (#0)
16:56:45 T:3367967056 M:2622717952   DEBUG: Curl::Debug   Trying 195.24.233.55...
16:56:45 T:3367967056 M:2622717952   DEBUG: Curl::Debug Connected to ws.audioscrobbler.com (195.24.233.55) port 80 (#0)
16:56:45 T:3367967056 M:2622717952   DEBUG: Curl::Debug GET /radio/xspf.php?sk=aef5798f6ef9dc43078d842af7e452c4&discovery=0&desktop= HTTP/1.1
16:56:45 T:3367967056 M:2622717952   DEBUG: Curl::Debug User-Agent: XBMC/pre-9.04 r18477M (Linux; Linux 2.6.28-ARCH; http://www.xbmc.org)
16:56:45 T:3367967056 M:2622717952   DEBUG: Curl::Debug Host: ws.audioscrobbler.com
16:56:45 T:3367967056 M:2622717952   DEBUG: Curl::Debug Accept: */*
16:56:45 T:3367967056 M:2622717952   DEBUG: Curl::Debug Connection: keep-alive
16:56:45 T:3775223840 M:2622717952   DEBUG: ------------------- GUI_MSG_WINDOW_DEINIT
16:56:45 T:3775223840 M:2622717952   DEBUG: Progress dialog
16:56:45 T:3775223840 M:2622717952   DEBUG: -------------------
16:56:45 T:3367967056 M:2624606208   DEBUG: Curl::Debug HTTP 1.0, assume close after body
16:56:45 T:3367967056 M:2624606208   DEBUG: Curl::Debug HTTP/1.0 200 OK
16:56:45 T:3367967056 M:2624606208   DEBUG: Curl::Debug Date: Sat, 14 Mar 2009 15:56:47 GMT
16:56:45 T:3367967056 M:2624606208   DEBUG: Curl::Debug Server: Apache/1.3.39 (Unix)
16:56:45 T:3367967056 M:2624606208   DEBUG: Curl::Debug X-Proxy-Fix-Up: headers fixed up
16:56:45 T:3367967056 M:2624606208   DEBUG: Curl::Debug X-Web-Node: www178
16:56:45 T:3367967056 M:2624606208   DEBUG: Curl::Debug Connection: close
16:56:45 T:3367967056 M:2624606208   DEBUG: Curl::Debug Content-Type: text/plain;charset=utf-8
16:56:45 T:3367967056 M:2624606208   DEBUG: FileCurl::Close(0x7f86c8befa90) http://ws.audioscrobbler.com/radio/xspf.php?sk=aef5798f6ef9dc43078d842af7e452c4&discovery=0&desktop=
16:56:45 T:3367967056 M:2624606208   DEBUG: Curl::Debug Expire cleared
16:56:45 T:3367967056 M:2624606208   DEBUG: Curl::Debug Closing connection #0
16:56:45 T:3367967056 M:2624606208   ERROR: LastFmManager: Unable to parse tracklist Error: Error reading Element value.
16:56:45 T:3367967056 M:2624606208   DEBUG: CacheTrackThumb: Done (time: 0 ms)
16:57:15 T:3775223840 M:2622525440    INFO: CheckIdle - Closing session to http://ws.audioscrobbler.com (easy=0x3261790, multi=0x3074230)
16:57:15 T:3775223840 M:2620985344    INFO: CheckIdle - Closing session to http://ws.audioscrobbler.com (easy=0x3258d70, multi=0x2fc6f80)

As you can see LastFmManager is unable to parse the responded xml file though it is valid - i opened it in firefox and it showed fine.

This is on svn -r18477 and x86_64 on Arch Linux.

Any hints?
Reply
#2
*bump*

Nobody having any issues with last.fm? On x86_64?
Reply
#3
It's linuxport in general, something to do with the filecurl changes I suspect. You could help by narrowing down an approximate range of revs where the bug may have been introduced.
Reply
#4
OK, thanks for the hint. Unfortunately i never had lastfm working on xbmc. I'm a rather new xbmc user. On Atlantis it refused to work due to a known login issue on x86_64 which got fixed in svn around -r17000 i think. I then switched to svn mainly because of that bug and the introduction of vdpau, so i cannot narrow the revision down to where it used to work.
Reply
#5
This looks like we don't properly handle HTTP 1.0 responses where there is no content-length or chunked transfer.

Can you file a trac ticket with the exact steps you took reproduce?

Thanks.
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#6
Hmm.. I just tested and it does work in my environment:

Code:
08:36:14 T:3052242784 M: 71151616   DEBUG: FileCurl::Open(0xbfdb77fc) http://ws.audioscrobbler.com/radio/xspf.php?sk=baeaf307821fba2336cc3fa6397d751c&discovery=0&desktop=
08:36:14 T:3052242784 M: 71151616    INFO: easy_aquire - Created session to http://ws.audioscrobbler.com
08:36:14 T:3052242784 M: 71176192   DEBUG: Curl::Debug About to connect() to ws.audioscrobbler.com port 80 (#0)
08:36:14 T:3052242784 M: 71176192   DEBUG: Curl::Debug   Trying 195.24.233.55...
08:36:14 T:3052242784 M: 71176192   DEBUG: Curl::Debug Connected to ws.audioscrobbler.com (195.24.233.55) port 80 (#0)
08:36:14 T:3052242784 M: 71176192   DEBUG: Curl::Debug GET /radio/xspf.php?sk=baeaf307821fba2336cc3fa6397d751c&discovery=0&desktop= HTTP/1.1
08:36:14 T:3052242784 M: 71176192   DEBUG: Curl::Debug User-Agent: XBMC/pre-9.04 r18599M (Linux; Ubuntu 8.04.2; Linux 2.6.24-23-generic; http://www.xbmc.org)
08:36:14 T:3052242784 M: 71176192   DEBUG: Curl::Debug Host: ws.audioscrobbler.com
08:36:14 T:3052242784 M: 71176192   DEBUG: Curl::Debug Accept: */*
08:36:14 T:3052242784 M: 71176192   DEBUG: Curl::Debug Connection: keep-alive
08:36:15 T:3052242784 M: 71229440   DEBUG: Curl::Debug HTTP 1.0, assume close after body
08:36:15 T:3052242784 M: 71229440   DEBUG: Curl::Debug HTTP/1.0 200 OK
08:36:15 T:3052242784 M: 71229440   DEBUG: Curl::Debug Date: Mon, 16 Mar 2009 15:36:09 GMT
08:36:15 T:3052242784 M: 71229440   DEBUG: Curl::Debug Server: Apache/1.3.39 (Unix)
08:36:15 T:3052242784 M: 71229440   DEBUG: Curl::Debug X-Proxy-Fix-Up: headers fixed up
08:36:15 T:3052242784 M: 71229440   DEBUG: Curl::Debug X-Web-Node: www114
08:36:15 T:3052242784 M: 71229440   DEBUG: Curl::Debug Connection: close
08:36:15 T:3052242784 M: 71229440   DEBUG: Curl::Debug Content-Type: text/plain;charset=utf-8
08:36:15 T:3052242784 M: 71229440   DEBUG: Curl::Debug Closing connection #0
08:36:15 T:3052242784 M: 71229440   DEBUG: FileCurl::Close(0xbfdb77fc) http://ws.audioscrobbler.com/radio/xspf.php?sk=baeaf307821fba2336cc3fa6397d751c&discovery=0&desktop=
08:36:15 T:3052242784 M: 71229440   DEBUG: RequestRadioTracks: Done (time: 1203 ms)

So. perhaps it is related to the version of libcurl being used? Which version do you have installed?
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#7
tslayer Wrote:Hmm.. I just tested and it does work in my environment:

Does yours continue to play the next song is a song list? I am wondering if this bug is related to the 'not playing next song' issue.

xnappo
Reply
#8
tslayer Wrote:So. perhaps it is related to the version of libcurl being used? Which version do you have installed?

It's curl 7.19.4 and libcurl 4.1.1 from the stable arch linux repository.
Code:
haggy@aereogramme ~ $ yaourt -Si curl
Repository     : extra
Name           : curl
Version        : 7.19.4-1
URL            : http://curl.haxx.se
Licenses       : MIT  
Groups         : None
Provides       : None
Depends On     : zlib  openssl>=0.9.8b  bash  ca-certificates  
Optional Deps  : None
Conflicts With : None
Replaces       : None
Download Size  : 554.85 K
Installed Size : 1468.00 K
Packager       : Eric Belanger <[email protected]>
Architecture   : x86_64
Build Date     : Wed 04 Mar 2009 02:07:24 AM CET
MD5 Sum        : 29feac880edde7a42bd9cf8fd0c41f90
Description    : An URL retrival utility and library

Code:
haggy@aereogramme ~ $ ls -l /usr/lib/libcurl*
-rw-r--r-- 1 root root 521454 2009-03-04 02:07 /usr/lib/libcurl.a
lrwxrwxrwx 1 root root     16 2009-03-04 02:07 /usr/lib/libcurl.so -> libcurl.so.4.1.1
lrwxrwxrwx 1 root root     16 2009-03-04 02:07 /usr/lib/libcurl.so.4 -> libcurl.so.4.1.1
-rwxr-xr-x 1 root root 317816 2009-03-04 02:07 /usr/lib/libcurl.so.4.1.1
Reply
#9
Ya, there seems to be some paplayer(maybe?) bug where the next track isn't playing unless you pause/unpause and then it starts. But that is a different issue than this. File another trac ticket for that.
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#10
Trac ticket is in: http://trac.xbmc.org/ticket/6090
Reply
#11
I'm using an older version of libcurl with ubuntu 8.04. I wonder if this fix in newer libcurl caused the failure for you:

CURLINFO_CONTENT_LENGTH_DOWNLOAD and CURLINFO_CONTENT_LENGTH_UPLOAD are -1 if unknown

http://curl.haxx.se/changes.html
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#12
well that might be the problem. will provide you a full debug log on trac tonight - i'm not at home at the moment. do you rely on a content-length header for xml parsing?
Reply
#13
Yes, it depends on it in our FileCurl implementation.

The issue here is that with my libcurl version, CURLINFO_CONTENT_LENGTH_DOWNLOAD returns the correct length even though there is no content-length header (and having no content-length header is fine with http 1.0 since it can read until the server closes the connection).

My guess is that your version returns -1 and therefore no body is read.

Maybe we can add some logic to try and read the body even if CURLINFO_CONTENT_LENGTH_DOWNLOAD is -1.
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#14
tslayer: According to this: http://curl.haxx.se/mail/lib-2001-03/0003.html one may try CURLINFO_CONTENT_LENGTH_UPLOAD to get the filesize on the remote side (yes, this is misleading as said in that post). could this be a fix even for http 1.0 requests? i always thought curl was developed to NOT have to hassle with sockets and protocols :-)
Reply
#15
That makes an assumption that a HEAD request will actually return a Content-Length header. I guess I can test this with Fiddler and see.
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
Last.fm streams not working: Error parsing tracklist0