PromyLOPh / pianobar

Console-based pandora.com player
http://6xq.net/pianobar/
Other
1.74k stars 321 forks source link

Protocol change (24 April 2012) #236

Closed ghost closed 12 years ago

ghost commented 12 years ago

Just got an Error: Protocol incompatible. Please upgrade libpiano. I've got a functioning internet connection, and I'm not behind a proxy or anything, so it looks like Pandora changed the protocol on us again…

ablundgren commented 12 years ago

Patch is good on openSuse 12.1 64bit.

clarkewd commented 12 years ago

Not sure if this huge block of text should be posted here, but I thought Pandora's response was actually OK and so I wanted to share. @PromyLOPh let me know if I should delete this.

To Pandora

I am a pandora premium member and have been for a few years. I have been using apps like PandoraJam and Pianobar. First PandoraJam stopped working when you guys stopped allowing the flash player last year. Now PianoBar has stopped working as well.

I don't like using Adobe Air and I don't want to leave my browser open just to listen to Pandora. Pianobar worked great for me on my Linux machine and my Mac, didn't get in the way, and didn't use any CPU time.

If you need to create a more expensive subscription plan which would allow API access to Pandora, do it, but please allow people to use other players besides the web interface or Adobe Air.

Please do send this along to your management / board of directors and let them know that your long time supporters want to listen to pandora their way.

Response

Thanks for writing and for the feedback. We know that our recent release has broken most unsupported Pandora clients, and we do apologize for the surprise and inconvenience that undoubtedly caused to your listening experience.

At a basic level, third-party applications are violating our Terms of Use and are obviously not authorized to sell (or give away) something that fundamentally derives its value from our product.

Beyond the boilerplate, though, the fact is that--while the use you are writing in about seems designed mainly to help folks listen to Pandora in their own way--some folks do use third-party unsupported client libraries in a harmful way, and so we make changes when we need to prevent this. Regrettably, we have no way of targeting changes towards some unsupported clients and not others--some are respectful of our business, but unfortunately we can't tell them from those that are not.

Even disregarding attempts at malicious use, we do of course still have to continue to upgrade our software, and unsupported clients have been broken by these sorts of routine changes many times in the past as well.

We definitely do recognize that our actions limit the options available to well-intentioned listeners who do not want to use any of our endorsed clients, and we're genuinely sorry for the inconvenience this brings to our enthusiastic listeners like yourself! We really appreciate your support of the service and respect the DIY spirit, but our hand has been forced on this issue.

Thanks so much for your understanding, and thanks again for reaching out.

PromyLOPh commented 12 years ago

That’s fine. Thanks for sharing.

dakong27 commented 12 years ago

Applied patch and am getting the following error message:

Welcome to pianobar (2012.01.10-dev)! Press ? for a list of commands. [?] Email: dakong27@yahoo.com [?] Password: (i) Login... libpiano: Unknown error AUTH_WEB_LOGIN_NOT_ALLOWED in com.savagebeast.radio.api.protocol.xmlrpc.RadioXmlRpcException: 192.168.161.234|1335469260635|AUTH_WEB_LOGIN_NOT_ALLOWED Error: Unknown.

dakong27 commented 12 years ago

Sorry, forgot: I'm on Ubuntu Oneiric 11.10

chrisfong commented 12 years ago

wizzahd's fix works for me on OSX Lion.

bsterne commented 12 years ago

@cmdlinegeek

and others with this error:

make: c99: Command not found

You need to install gcc. c99 is an alias for gcc -std=C99

jnwatts commented 12 years ago

@clarkewd: That's a great response! I just got my own mostly-canned response, and while I'm not at all interested, I am pleased to see that they are willing to refund a pro-rated amount of my P1 payment. For those who actually feel they've been wronged by Pandora, it seems they're open to discussion on that front. ;-)

drgreco commented 12 years ago

@clarkewd

Sadly, this is a boilerplate response, as I just received the same email (in response to a similarly worded email about being a loyal pandora user for 7 years, and pandora one for the last 2).

ablundgren commented 12 years ago

"You need to install gcc. c99 is an alias for gcc -std=C99"

I have gcc, that alias doesn't exist on all systems. I always modify the make file to use the arg rather than depend on an alias like this:

ifeq (${CC},cc)

CC=c99

    CFLAGS+=-std=c99

endif

haxwithaxe commented 12 years ago

@cmdlinegeek 1) grab the slackbuild (and associated files) from slackbuilds.org and edit the version in it 2) git clone the repo 3) apply the patch with git 4) move/copy the repo to "pianobar-2012.04.24" 5) tar it up into "pianobar-2012.04.24.tar.gz" 6) run the slackbuild like normal and install the package

jdburton commented 12 years ago

Working on Mac OS X Lion.

You rock, sir. Thank you.

WTxCajun commented 12 years ago

If on OpenSuse 12.1 x64 and you get the following error:

$ make CC src/main.c c99: invalid option -- '2' usage: c99 [-c] [-D name[=value]] [...] [-E] [-g] [-I directory ...] [-L directory ...] [-o outfile] [-O] [-s] [-U name ...] operand ...

   where operand is one or more of file.c, file.o, file.a
   or -llibrary

make: *\ [src/main.o] Error 1


just edit the Makefile and add: -std=gnu99 to the line immediately following:

Respect environment variables set by user; does not work with :=

ifeq (${CFLAGS},)

So that it looks like:

Respect environment variables set by user; does not work with :=

ifeq (${CFLAGS},)
        -std=gnu99 CFLAGS=-O2 -DNDEBUG

Anyway, that is what worked for me.

Enjoy.

romm-zz commented 12 years ago

Applied to my Perl client - works fine, thanks! Have you had a chance to see the insides of that php?

perette commented 12 years ago

You rock my world! Thanks!

And thinking... Pandora is available on embedded devices. How do they deal with protocol changes? I can't imagine the answer is to tell the masses "Yeah, just burn this new firmware on your stereo" every 6 months.

singpolyma commented 12 years ago

The patch is working for me! Thanks!

wwalker commented 12 years ago

PromyLOPh - thank you!

I became a paying customer the day I found pianobar, because Pandora (and the artists at the other end of the pipe) deserve to get paid for the service they provide.

Before pianobar, I had never once paid any attention to any ad on Pandora or considered paying for Pandora One (because it provided no value, and I hate Air).

deltaray commented 12 years ago

PromyLOPh - Thanks for being on it. You're awesome and my ears thank you.

cody18 commented 12 years ago

Can confirm patch works on Debian. Thank you!

lordB8r commented 12 years ago

Success: OSX7.3, make clean && make (didn't need that CFLAG mentioned above)

PromyLOPh - grazie!

dragos240 commented 12 years ago

Working here. Patch fixed the client.

thedmd commented 12 years ago

To Cygwin guys: there is a native port of pianobar for windows available at https://github.com/thedmd/pianobar-windows-binaries

gitUser0 commented 12 years ago

Hi All,

Is there any way to apply the patch without using git? I don't use git. I just download the zip file compile from there.

Thanks.

reedloden commented 12 years ago

I'm very skeptical of using some random person's website (over HTTP, nonetheless) to get a piece of data. If this "solution" is chosen in the end, it would be nice to have the source code of http://ridetheclown.com/s2/synctime.php posted somewhere, along with a config option for setting it to an alternative URL so I can run my own synctime instance.

reedloden commented 12 years ago

Metro Pandora did something a little bit different to fix its app. Looks like they hardcoded some stuff, though magic numbers like that are likely to break. https://metropandora.codeplex.com/SourceControl/changeset/changes/90806

deltaray commented 12 years ago

I second reedloden's skepticism. Any patch from someone not affiliated with the site that connects to some random website is not good. Especially since all it seems to do is get an epoch time a year in the future. How could this not just be put in the code instead? I don't know what wizzahd's intentions are, but that's not the right way to do things in open source land.

PromyLOPh commented 12 years ago

The patch is written by me, the pianobar author, and it obviously won’t make it into any release of pianobar. The PHP script in provided by @ZigZagJoe and yes, all it does is compute Pandora’s server time from a time offset which is updated manually if necessary. I posted the patch because a) I already created it for the #214 incident and b) because it works.

I’m currently moving pianobar to a different API, as the web API requires a full-blown browser with JavaScript and HTML parser to work.

nikomaresco commented 12 years ago

@deltaray please re-read the thread and examine my commands more closely. you will realize I just posted commands to apply the patch that Lars created for, you know, his own application ;) you seem like a smart cat so I am sure it was just an oversight.

@PromyLOPh thank you for providing the patch, and @zigzagjoe thanks for the assist! you guys make my ears happy :)

deltaray commented 12 years ago

@wizzahd Ok, like I said, I just don't know who you are. I missed the small post where Lars said "Temporary fix", and saw yours with a solution in it and thought that you wrote something that may be malicious. This fix is rather weird and I'm a bit nervous about running code that talks to a third party website. Essentially, this allows whoever runs ridetheclown.com to see when and from where we're running pianobar. The whois data for ridetheclown.com hides its owner and the name and page along with "importing more clowns" on the page make it sound like something malicious is going on. Maybe you don't see that if you're affiliated with the site, but I think its a reasonable impression from a stranger's point of view.

ZigZagJoe commented 12 years ago

blasted github, mailing me...

Anyways, @reedloden, @deltaray: I maintain my own pandora client, as well as having provided keys several times in the past for protocol updates. So not really as random as you think ;) - granted, my domain probably didn't help matters.

As for the PHP script, what promy says covers it. The script is literally (old sync value) + time() - sync modified time. The result is what the misc.sync call provides - or close enough to it that it doesn't matter.

Previously, it was automatically updated by a script running a headless browser, but that method of fetching a sync key was broken and a method that doesn't involve injecting JS before parsing happens hasn't been found yet, so the automatic updating isn't happening. There essentially no drift, but I am watching.

This "fix" is simply buying time for a more resilient change to be devised. I know promy is going for the mobile protocol; I haven't decided as of yet.

deltaray commented 12 years ago

@PromyLOPh @wizzahd @ZigZagJoe Ok, I'm more inclined to believe you now that I've just written my own quick PHP page that does this and changed the patch to point to my own website.

For others who are interested, you can just put something like this in a PHP page and then change the URL in the patch from ridemyclown.com to your own server. It could even be running on your localhost.

<?php echo time() + 30239998; ?>

As was mentioned, I guess the reason for doing it this way is so they could change that number for everyone without requiring a new patch. So you'll still need to keep abreast of changes if you do this on your own.

ckcin commented 12 years ago

patched worked great rhel5.7 many thanks

earthmeLon commented 12 years ago

I was never interested in paying for Pandora.

And then, I found pianobar. I became interested in paying Pandora for their service.

Then I went to their website and not only was their payment page insecure, but they were displaying a really horrible ad on said page.

http://www.reddit.com/r/netsec/comments/rf04o/pandoras_thoughts_on_user_security/

Thank you for pianobar, and thank those of you helping to keep it running.

ladinu commented 12 years ago

@PromyLOPh You mentioned moving pianobar to a different API. Are you looking into the Pandora Desktop App?

PromyLOPh commented 12 years ago

@ladinu Yes, as it uses the same JSON API.

btw: I just pushed a proof-of-concept (login, get stations, fetch playlist) into the “json” branch.

xarthna commented 12 years ago

Thanks for the patch. Worked great for ubuntu 10.10. @wizzahd Thanks for the easy instructions.

ghost commented 12 years ago

Thanks for the quick work! Back in business on my MBP (Which, fwiw, installed fine via macports).

admdrew commented 12 years ago

wizzahd's patch worked for me (https://github.com/PromyLOPh/pianobar/issues/236#issuecomment-5362241), and (as a paying Pandora customer) I sent off a message to them voicing my support for both their service, and the pianobar client. Here's hoping they listen to all of us!

nikomaresco commented 12 years ago

let me just be clear that this is not my patch :) all credit goes to @PromyLOPh; I only listed the commands to make it easier to apply the patch.

admdrew commented 12 years ago

Oops! Ok, well thanks (again!) to @PromyLOPh for the patch, and thanks @wizzahd for allowing noobs like me to continue listening to music.

PromyLOPh commented 12 years ago

I merged my json work into master, so this issue is fixed. It should work out-of-the-box, although there are a few glitches that need a fix, so give it a try. If you find a bug open a new issue, please.

Thanks to everyone who helped out with reverse-engineering, provided documentation or gave feedback! Let’s hope this fix lasts longer than a few hours.

To packagers/distributions: There will be a new version released once I ironed out all the nasty bugs. Maybe in a week or two.

Before: -rwxr-xr-x 1 lars lars 118K 1. Mai 12:17 pianobar After: -rwxr-xr-x 1 lars lars 85K 1. Mai 12:17 pianobar In other words: 22 files changed, 1407 insertions(+), 3502 deletions(-) in one week, two new dependencies, a documentation wiki at http://pan-do-ra-api.wikia.com/ and a lot of fun with C ;)

thedmd commented 12 years ago

Magnificent!

cintacks commented 12 years ago

Excellent! Thank you thank you. Just recompiled and works perfectly.

b-dub commented 12 years ago

I'm confused (happens a lot), how do I get the this change?

Thanks

perette commented 12 years ago

The compiler bitches a lot about libgcrypt: /opt/local/include/gcrypt.h:1639: warning: ‘gcry_ac_scheme_t’ is deprecated /opt/local/include/gcrypt.h:1641: warning: ‘gcry_ac_key_t’ is deprecated /opt/local/include/gcrypt.h:1642: warning: ‘gcry_ac_io_t’ is deprecated /opt/local/include/gcrypt.h:1643: warning: ‘gcry_ac_io_t’ is deprecated /opt/local/include/gcrypt.h:1649: warning: ‘gcry_ac_id_t’ is deprecated (Repeated like 300 times.) But runs fine on my variant despite the compiler's angst.

nperez commented 12 years ago

On Tue, 1 May 2012 03:29:43 -0700 PromyLOPh reply@reply.github.com wrote:

I merged my json work into master, so this issue is fixed. It should work out-of-the-box, although there are a few glitches that need a fix, so give it a try. If you find a bug open a new issue, please.

Thanks to everyone who helped out with reverse-engineering, provided documentation or gave feedback! Let’s hope this fix lasts longer than a few hours.

To packagers/distributions: There will be a new version released once I ironed out all the nasty bugs. Maybe in a week or two.

Before: -rwxr-xr-x 1 lars lars 118K 1. Mai 12:17 pianobar After: -rwxr-xr-x 1 lars lars 85K 1. Mai 12:17 pianobar In other words: 22 files changed, 1407 insertions(+), 3502 deletions(-) in one week, two new dependencies, a documentation wiki at http://pan-do-ra-api.wikia.com/ and a lot of fun with C ;)


Reply to this email directly or view it on GitHub: https://github.com/PromyLOPh/pianobar/issues/236#issuecomment-5436544

Slick. This works without issue for me.

apt-get install libjson0-dev; make;

PromyLOPh++

Nicholas Perez XMPP/Email: nick@nickandperla.net https://metacpan.org/author/NPEREZ http://github.com/nperez

grota commented 12 years ago

:heart:

TRWulfgar commented 12 years ago

For those of us who are new and slow... I'd much appreciate if someone could comment in a very basic fashion on how to implement the newest patch.

I just keep telling myself "Everyone was new once".

Thanks much.

b-dub commented 12 years ago

TRWulfgar What OS/env? My windows xp cygwin build required some tweeking to get it going but the basic steps should be similar on most systems.

//to get the source git clone git://github.com/PromyLOPh/pianobar.git

// to get libjson-devel (I had to get apt_cyg ~ apt_get???) apt-cyg install libjson-devel

cd pianobar make

// I have to do a 'make CC=CC CFLAGS="-std=gnu99 -L /usr/local/lib" ' but that's because I'm special and don't always know what I'm doing, but can usually make it work.

TRWulfgar commented 12 years ago

Sorry, n00b mistake.

I'm running Ubuntu.