pianobar icon indicating copy to clipboard operation
pianobar copied to clipboard

Login fails (Invalid username and/or password)

Open fengshaun opened this issue 2 years ago • 8 comments

Subject of the issue

Briefly describe your issue here.

When trying to login, I get the error "Auth token invalid". Turning on debug, I see the response is "Invalid username and/or password". I use the same username and password to login to pandora's website and use the Pandora app on my phone.

Your environment

  • version of pianobar

pianobar-git as of today 2021-11-20

  • your Linux distribution and release version

Raspbian 10 (buster)

  • ffmpeg/libav version and the flags it was compiled with (if you compiled yourself)

ffmpeg 4.1.8

  • your config file

empty

Steps to reproduce

Tell us how to reproduce this issue.

Attempt to login, enter email and password (copy paste from password manager to ensure no typos).

Expected behaviour

Tell us what should happen.

Login successfully.

Actual behaviour

Tell us what happens instead, including a copy of all error messages.

pi@pando:~ $ PIANOBAR_DEBUG=1 ./pianobar-git/pianobar
Welcome to pianobar (2020.11.28-dev)! Press ? for a list of commands.
(i) Control fifo at /home/pi/.config/pianobar/ctl opened
[?] Email: redacted
[?] Password: redacted
(i) Login... ← https://tuner.pandora.com:443/services/json/?method=auth.partnerLogin
→ {"stat":"ok","result":{"stationSkipLimit":6,"partnerId":"42","partnerAuthToken":"VAI+vKUfyXtPdsbrHCETrIscpfjtWrvBUu","urls":{"autoComplete":"http://autocomplete-sc.pandora.com/search"},"syncTime":"9f9ffee492a660bd188e12bb6e6b7c60","stationSkipUnit":"hour"}}
← https://tuner.pandora.com:443/services/json/?method=auth.userLogin&auth_token=VAI%2BvKUfyXtPdsbrHCETrIscpfjtWrvBUu&partner_id=42
→ {"stat":"fail","code":1001,"message":"Invalid username and/or password"}
Error: Invalid auth token.

fengshaun avatar Nov 20 '21 19:11 fengshaun

I can’t reproduce the issue. Is it still happening?

PromyLOPh avatar Nov 21 '21 09:11 PromyLOPh

Unfortunately yes. How would I be able to further debug this issue? It's happening with latest release and git versions.

fengshaun avatar Nov 24 '21 00:11 fengshaun

Hard to say. I doubt your username/password combination is the problem. I get a different error code (1002) when using a wrong username/password combination. You could try to apply a patch like this to make sure the request looks good too:

diff --git a/src/libpiano/request.c b/src/libpiano/request.c
index 69e49a1..d980a43 100644
--- a/src/libpiano/request.c
+++ b/src/libpiano/request.c
@@ -529,6 +529,7 @@ PianoReturn_t PianoRequest (PianoHandle_t *ph, PianoRequest_t *req,

        /* json to string */
        jsonSendBuf = json_object_to_json_string (j);
+       printf ("send data: %s\n", jsonSendBuf);
        if (encrypted) {
                if ((req->postData = PianoEncryptString (ph->partner.out,
                                jsonSendBuf)) == NULL) {

What’s your libcurl/json-c version?

PromyLOPh avatar Nov 24 '21 20:11 PromyLOPh

Thank you for the update.

It's sending the correct username and password. I have masked theme here.

Welcome to pianobar (2020.11.28-dev)! Press ? for a list of commands.
(i) Control fifo at /home/pi/.config/pianobar/ctl opened
(i) Login... send data: { "username": "android", "password": "partnerpassword", "deviceModel": "android-generic", "version": "5", "includeUrls": true }
← https://tuner.pandora.com:443/services/json/?method=auth.partnerLogin
→ {"stat":"ok","result":{"stationSkipLimit":6,"partnerId":"42","partnerAuthToken":"VAI+vKUfyXtPfsIy+7EiaEZt+NVsL+GoDg","urls":{"autoComplete":"http://autocomplete-sc.pandora.com/search"},"syncTime":"5df8dd6638bf8b6ffee96b490dbb264b","stationSkipUnit":"hour"}}
send data: { "loginType": "user", "username": "[email protected]", "password": "pandorapassword", "partnerAuthToken": "VAI+vKUfyXtPfsIy+7EiaEZt+NVsL+GoDg", "syncTime": 1637787276 }
← https://tuner.pandora.com:443/services/json/?method=auth.userLogin&auth_token=VAI%2BvKUfyXtPfsIy%2B7EiaEZt%2BNVsL%2BGoDg&partner_id=42
→ {"stat":"fail","code":1001,"message":"Invalid username and/or password"}
Error: Invalid auth token.

libcurl4 7.64.0 libjson-c-dev 0.12.1

fengshaun avatar Nov 24 '21 21:11 fengshaun

And partnerpassword is AC7IBG09A3DTSYM4R41UJWL07VLN8JI7 (see https://6xq.net/pandora-apidoc/json/partners/#android)?

You could try to dump the communication of the app on your phone and compare it with what pianobar is doing. To me there’s no obvious reason why auth.userLogin is not working.

PromyLOPh avatar Nov 25 '21 08:11 PromyLOPh

Yup.

Alright, I'll try and see what I can find. Hopefully something shows up!

fengshaun avatar Nov 25 '21 08:11 fengshaun

I just updated my MacOS to Catalina and now pianobar gives me the same error:

Login... Error: Invalid auth token.

Pandora website works fine. Pandora iOS app works fine. Using VPN

Basically pianobar & Hermes app both stopped working.

Did anyone figure this out ?

UPDATE: Changed my VPN to another part of USA and it's working now. All good!

governor22 avatar Sep 11 '23 10:09 governor22

Mine was working. I've been trying to get a lastfm scrobbler working and then all of a sudden I get this same error. The fact that your VPN worked might mean you had too many streams going and that IP temporarily got banned. At least that's what I read at this link: https://amplipi.discourse.group/t/pandora-stopped-working-recently-auth-token-issue/217/2 Hopefully it'll start working tomorrow for me.

bonelifer avatar Oct 14 '23 00:10 bonelifer