Bug 17548 - Can't log in via web API, but can via browser
: Can't log in via web API, but can via browser
Status: UNCONFIRMED
Product: MySqueezebox.com
Classification: Unclassified
Component: API
: MySB
: PC Other
: -- normal (vote)
: ---
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-06 14:52 UTC by jwdevel
Modified: 2011-09-09 10:45 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jwdevel 2011-09-06 14:52:48 UTC
My squeezeboxserver fails to log in via the web API at www.mysqueezebox.com, even though entering the same credentials through a browser at http://www.mysqueezebox.com succeeds.

I made some forum posts, which contain log info:

* http://forums.slimdevices.com/showthread.php?t=90193
* http://forums.logitech.com/t5/MySqueezebox-com-Squeezebox/dreaded-quot-invalid-mysqueezebox-com-username-or-password-quot/td-p/683080

In addition, I have looked at the code for squeezeboxserver, and determined that the login token is acquired by GET-ing this url:

  http://www.mysqueezebox.com/api/v1/login?v=sc7.5.4&u=MY_EMAIL&t=TIMESTAMP&a=HASH

where MY_EMAIL is my email address for the account, TIMESTAMP is a Unix timestamp, and HASH is computed as follows:

  sha1_base64( sha1_base64(MY_PASSWORD) + TIMESTAMP )

I have manually written an app to perform this query, but it always fails as well.

I always get a 200 response, with the following JSON:

  {"sid":null,"error":"Invalid mysqueezebox.com username or password."}

This all seems normal EXCEPT I actually *do* have a valid username/password. I can verify it by logging on with my web browser at www.mysqueezebox.com.

Is something wrong with the API? It can't be totally broken, or everyone would be complaining.

Is something wrong with my account in particular? I have no way to know.

Maybe my username is somehow weird? Too long? Maybe my password is somehow weird? Forbidden characters?

Perhaps someone can look into what is going on here.

I am happy to help debug things on my end as well.

-John
Comment 1 jwdevel 2011-09-07 09:03:33 UTC
A little more evidence:

I installed the Windows squeezeboxserver on a different machine, and on a different network, and the results are identical.

I don't think this is particular to my setup or machine, but I have no way to see what's going on on the other side ):
Comment 2 jwdevel 2011-09-08 09:00:34 UTC
I seem to have found a workaround for my personal problem, though there is still something wrong somewhere.

I created a new account at www.mysqueezebox.com, with a new email address, and now it seems to work. I haven't tested it thoroughly, but at least the login worked - I get "Changes have been saved" rather than "Invalid mysqueezebox.com username or password".

This makes no sense to me (:

My original email was not particularly unusual, just 12 lowercase alphabetic characters @xxx.com.

The only odd thing I can think of is that I used that same original email when I set up my SB touch for the first time - when it connected to MySB.com to register the device. I imagine others must have done the same thing though, so not sure if that's relataed.
Comment 3 jwdevel 2011-09-09 10:45:54 UTC
I resolved this on the phone with tech support.

Apparently, somehow two accounts got created both registered to the *same* email address.

No idea how this happened - they said maybe some kind of 'server hiccup' caused it.

I don't have a repro case, but hopefully this bug will help investigate such issues.