chirpradio / chirpradio-android

Android phone app for http://chirpradio.org/
http://code.google.com/p/chirpradio/
Apache License 2.0
6 stars 6 forks source link

Playback service crash bug #19

Open patelc75 opened 13 years ago

patelc75 commented 13 years ago

Jim, can you please explain the details so the next developer can take over. We will do a pre-alpha on Kumar's phone with the broken bug and try to characterize it a bit more also.

jim commented 13 years ago

The problem has to do with the StreamingService crashing when it's socket is disconnected by the media player. You can get this to happen on 2.1 and below by starting and stopping the stream a few times. I'm trying to work around it now.

patelc75 commented 13 years ago

After our Wormhole hacking night on 07/28/2011, Jim's next steps:

  1. Try a different stream URL other than http://www.live365.com/play/chirpradio
  2. Try the direct link instead of http://www.live365.com/play/chirpradio since it redirects somewhere else

Kumar, do all the (failing) free apps use this same stream URL?

kumar303 commented 13 years ago

You have to use the chirpradio URL above because of how Live365 works. It generates a token based URL. You can see it here:

$ curl -I http://www.live365.com/play/chirpradio
HTTP/1.1 302 Found
Date: Sat, 30 Jul 2011 20:42:38 GMT
Server: Apache
Set-Cookie: SaneID=98.213.210.251-1312058558402; path=/; expires=Sat, 30-Jul-16 13:42:38 GMT; domain=.live365.com
Location: http://216.235.94.12:80/play?s=chirpradio&d=LIVE365&r=0&membername=&session=chirpradio:0&AuthType=NORMAL&app_id=live365%3Acurl7.19.7un&SaneID=98.213.210.251-live365%3Acurl7.19.7universalappledarwin10.0libcurl7.19.7OpenSSL0.9.8rzlib1.2.3%3Atag_tracker
Content-Type: text/xml

The redirect URL is the actual stream but you have to go through the first URL for it to work. My hunch is that none of the free players support the redirects that need to happen in order for this to work.

Does the StreamingService follow the http redirects when it reconnects? Also, is there a reason why you're testing on 2.1? We only need to support 2.2 and up, if that makes it any easier.

jim commented 13 years ago

We're only working on 2.2+ for now. The StreamingService appears to handle the redirect correctly.

patelc75 commented 13 years ago

Jim, we had mentioned that the redirect may not be working properly when it loses the stream during the middle of playing and tries to reconnect. Not likely but wanted to remind you. Were you able to try a different service/URL entirely? We also mentioned that it could be a stream issue since all the other apps fail also.

Kumar can you verify that all the other free apps that CHIRP has tried also use this same URL?

kumar303 commented 13 years ago

I can't confirm what happens inside the free apps but I can confirm that entering the URL http://chirpradio.org/listen into the player does not work