Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login error #84

Open
flo2587 opened this issue May 22, 2015 · 42 comments
Open

Login error #84

flo2587 opened this issue May 22, 2015 · 42 comments

Comments

@flo2587
Copy link

flo2587 commented May 22, 2015

Hello,

Plugin can't connect to my Google account.
I have this error in the /var/log/squeezeboxserver/server.log :
[15-05-20 22:28:24.0094] Plugins::GoogleMusic::Plugin::initPlugin (94) Not able to login to Google Play Music: exceptions.TypeError: login() takes exactly 4 arguments (3 given) at (eval 883) line 182.
Any idea ?
Thank you
Regard

@nick7634
Copy link

The unofficial google api has a new login method that breaks this plugin. I have fixed the problem in the plugin.pm file and made a merge request, but it has not be approved yet. https://github.com/hechtus/squeezebox-googlemusic/pull/83/files

@nick7634
Copy link

If you dont know how to edit the plugin.pm file. You can try changing the repo from http://hechtus.github.io/squeezebox-googlemusic/repository/repo.xml to http://nick7634.github.io/squeezebox-googlemusic/repository/repo.xml Until hechtus updates the main branch

@flo2587
Copy link
Author

flo2587 commented May 23, 2015

It works !
Thank you ! :)

@mikeybs
Copy link

mikeybs commented May 24, 2015

much appreciated, thank you

I was trying to figure this out myself, where did you track this change in the unofficial google music api?

I was referencing the docs

http://unofficial-google-music-api.readthedocs.org/en/latest/reference/mobileclient.html#setup-and-login

but I didn't notice any change there

was there anywhere this API change was published?

@nick7634
Copy link

The change doesn't seem to be posted in the docs, I saw the change in the login method in the commit made on the 14th for the mobileclient found here. simon-weber/gmusicapi@1849267

@noname4835
Copy link

I tried to upgrade to your modified version, but I got a "digest does not match" message in the server log.

How to get it work?

@nick7634
Copy link

That was my fault, I was rushing the github repo setup and made a few mistakes in changing the version number and hash. Everything should be up and working now.

@ghost
Copy link

ghost commented May 25, 2015

Thanks for fixing this! It's good to have this project supported by more people!

@noname4835
Copy link

Mercí! 👍

@madattack
Copy link

Hi, I installed the plug-in from your repo but it still isn't connecting. Version displayed in Plugin list says 0.4.2
Log file says: Plugins::GoogleMusic::Plugin::initPlugin (95) Not able to login to Google Play Music: exceptions.TypeError: login() takes exactly 3 arguments (4 given) at (eval 930) line 176.
Thanks for some help in advance.

@nick7634
Copy link

You have to update to the latest unofficial google music api from the develop branch.

pip install git+https://github.com/simon-weber/Unofficial-Google-Music-API.git@develop

@madattack
Copy link

awesome, now it works !!! thank you very much

@davein2it
Copy link

Hi, I installed the plug-in from your repo but it still isn't connecting. Version displayed in Plugin list says 0.4.2
Log file says: Plugins::GoogleMusic::Plugin::initPlugin (95) Not able to login to Google Play Music: exceptions.TypeError: login() takes exactly 3 arguments (4 given) at (eval 930) line 176.
Thanks for some help in advance.

Installed the development API also not sure what to do next.

sudo pip install git+https://github.com/simon-weber/Unofficial-Google-Music-API.git@develop
sudo: unable to resolve host max2play
Collecting git+https://github.com/simon-weber/Unofficial-Google-Music-API.git@develop
Cloning https://github.com/simon-weber/Unofficial-Google-Music-API.git (to develop) to /tmp/pip-ntS9RI-build
/usr/lib/python2.7/dist-packages/setuptools/command/install_scripts.py:3: UserWarning: Module pip was already imported from /usr/local/lib/python2.7/dist-packages/pip/init.pyc, but /usr/lib/python2.7/dist-packages is being added to sys.path
from pkg_resources import Distribution, PathMetadata, ensure_directory
Requirement already satisfied (use --upgrade to upgrade): gmusicapi==5.0.0-dev from git+https://github.com/simon-weber/Unofficial-Google-Music-API.git@develop in ./local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): validictory!=0.9.2,>=0.8.0 in ./local/lib/python2.7/dist-packages (from gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): decorator>=3.3.1 in ./local/lib/python2.7/dist-packages (from gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): mutagen>=1.18 in ./local/lib/python2.7/dist-packages (from gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): protobuf>=2.4.1 in ./local/lib/python2.7/dist-packages (from gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): requests!=1.2.0,!=2.2.1,>=1.1.0 in ./local/lib/python2.7/dist-packages (from gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil!=2.0,>=1.3 in ./local/lib/python2.7/dist-packages (from gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): proboscis>=1.2.5.1 in ./local/lib/python2.7/dist-packages (from gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): oauth2client>=1.1 in ./local/lib/python2.7/dist-packages (from gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): mock>=0.7.0 in ./local/lib/python2.7/dist-packages (from gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): appdirs>=1.1.0 in ./local/lib/python2.7/dist-packages (from gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): gpsoauth>=0.0.2 in ./local/lib/python2.7/dist-packages (from gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./lib/python2.7/dist-packages (from protobuf>=2.4.1->gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): six>=1.5 in ./local/lib/python2.7/dist-packages (from python-dateutil!=2.0,>=1.3->gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): httplib2>=0.8 in ./local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): pyasn1==0.1.7 in ./local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): pyasn1-modules==0.0.5 in ./local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): rsa==3.1.4 in ./local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi==5.0.0-dev)
Requirement already satisfied (use --upgrade to upgrade): pycrypto in ./local/lib/python2.7/dist-packages (from gpsoauth>=0.0.2->gmusicapi==5.0.0-dev)

@davein2it
Copy link

Post script the plugin seem to be working just stuck at the authentication layer. Going to uninstall pip and python then reinstall.

@Tbower
Copy link

Tbower commented Jun 4, 2015

davein2it...

Will you please post back and let us know if that worked for you?

I'm having the same issue....have upgraded pip, and actually uninstalled/reinstalled gmusic api from dev branch (5.0.0-dev), but still no joy. Have not tried reinstalling python.

Continue to get the authentication error:

[15-06-04 11:11:56.7879] Plugins::GoogleMusic::Plugin::initPlugin (95) Not able to login to Google Play Music: exceptions.TypeError: login() takes exactly 3 arguments (4 given) at (eval 1016) line 176.

Thanks in advance...

@chrisd53
Copy link

chrisd53 commented Jun 4, 2015

Same experience with not working.
Worked fine till I rebooted LMS yesterday and now no login.
Followed all above fixes - no login.
Signed up to Spotify to keep the music coming.
Thank you to all with knowledge working on a solution.

@nick7634
Copy link

nick7634 commented Jun 5, 2015

The latest version of the Unofficial-Google-Music-API as of June 1st, no longer requires the device id to login. My version of the plug in should be removed and reverted back to hechtus' original repo as it is function again.

@chrisd53
Copy link

chrisd53 commented Jun 5, 2015

Thanks nick7634
Did original repo but still no login.
Uninstalled plugin, then rebooted.
Then: pip uninstall gmusicapi
Then: pip install git+https://github.com/simon-weber/Unofficial-Google-Music-API.git@develop
Reboot
Original repo
Reboot
Working!
Thank you

@Tbower
Copy link

Tbower commented Jun 5, 2015

Well OK then.

Followed same basic steps as chrisd53, and all is well for me now!

Thanks!

@asplundj
Copy link

asplundj commented Jun 9, 2015

I followed chrisd53 steps but it still doesn't work. It says that I have v 0.41 of the plugin.When I try to enter my username/password I get this:
"Not logged in to Google Play Music. Set your username and password. No mobile device (phone or tablet) registered for Google Play Music. Not able to obtain the mobile device ID automatically."

@ghost
Copy link

ghost commented Jun 9, 2015

You should have 0.4.2 from the forked repo...

@asplundj
Copy link

asplundj commented Jun 9, 2015

With the forked repo do you mean http://nick7634.github.io/squeezebox-googlemusic/repository/repo.xml ?

I've tried that and it gives me v. 0.42 but I still can't login. However, the steps outlined by chrisd53 says that one should use the original repo.

@ghost
Copy link

ghost commented Jun 9, 2015

Sorry, I missed the last few messages...

I'll check whether mine still works.

@calipoop
Copy link

I also have the same issue - has there been any update/progress? I'm running gmusicapi 5.0 and google music plugin 4.1. Getting the "Plugin failed to load" error. Thanks for your help!

@asplundj
Copy link

calipoop: that seems to be a different issue. For me the plugin loads but I can't log in

@srasher
Copy link

srasher commented Jun 21, 2015

Hi all,

I am sorry if I am just mixing up stuff but so far I could not reproduce the solution reported by chrisd53.

I have done several iterations with uninstalling and re-installing everything from scratch, with both, the original and nick7634's repos. But I always got the originally reported error message about the number of arguments in the login() method.

Currently I am on nick7634's repo and the latest develop branch gmusicapi ("7.0.0-dev0", just in case someone can point me to something even newer).

This also doesn't work, UNLESS I activate the "No SSL verification" button in the plugin settings. After doing that, I got access to GPM-All Access and "My Music" again (sorry if the terms are not 100% correct, I am German and don't actually know the exact English terms for the settings).

This is OK as a workaround but somehow unsatisfying/worrying. To be honest, I don't know how dangerous it is to use the plugin without SSL verification (at first glance sounds like a no-go to me), so if someone can shed some light on this for me, I would be extremely thankful.

As an additional info, I never had trouble with this before the problem discussed in this issue here occured, so it always worked with SSL verification before.

Thanks for any help/hint on this in advance!

Cheers,
Seb

@mikeybs
Copy link

mikeybs commented Jun 22, 2015

Doing a fresh install things do not work as hoped. It seems the latest version of dev gmusicapi 5.0 still requires the changes made by nick7634

If I do not modify Plugin.pm and Settings.pm then I get:
Not able to login to Google Play Music: exceptions.TypeError: login() takes exactly 4 arguments (3 given) at (eval 883) line 182.

If I make the changes then the plugin is not able to retrieve the mobile device ID on its own and I get:
Plugins::GoogleMusic::Plugin::initPlugin (95) Not able to login to Google Play Music: exceptions.ValueError: android_id cannot be None. at line 51

If I manually put in the correct mobile device ID then I am able to get things working properly

@UltraSalem
Copy link

Just trying this out for the first time today. What worked for me was:
Repo:
http://nick7634.github.io/squeezebox-googlemusic/repository/repo.xml
gmusic api:
sudo pip install git+https://github.com/simon-weber/Unofficial-Google-Music-API.git@develop

Plug in settings:
gmail addy
one-time password using two-factor password generation
entered mobile device ID taken from an app on my android phone called Device ID by redphx
Disable SSL was ticked.

Thanks to all in this thread for the various bits of the puzzle.

@Prindle19
Copy link

I have the forked Repo and the latest gmusic api built.

I can now see my library, see All Access, etc, but when I try to play. Nothing.

Logs say: lugins::GoogleMusic::ProtocolHandler::getNextTrack (103) Looking up stream url for url googlemusic:track:5b867b96-4a36-3490-b1f3-0af2eddf2c69 failed: CallFailure: GetStreamUrl: 403 Client Error: Forbidden

@DaBurgi
Copy link

DaBurgi commented Jul 7, 2015

Same here (like Prindle19): i see the library, all stations etc. When i try to play, all titles will be shown in the queue with cover and metainfo. But "streaming" the song is denied with:

(requests kwargs: {'url': 'https://android.clients.google.com/music/mplay', 'headers': {'X-Device-ID': 'C611E97CFACXXXXX, 'Authorization': ''}, 'allow_redirects': False, 'params': {'opt': 'hi', 'mjck': u'Tmliejlfvah33yvpdwhq6jfs3um', 'pt': 'e', 'slt': '1436282607484', 'sig': '20KcvIL_T2ZJUOmuQhWy-E8VTpQ', 'net': 'mob'}, 'method': 'GET'})
(response was: '\n\nForbidden</T I T L E>\n</H E A D>\n\n<H 1>Forbidden</H 1>\n<H 2>Error 403</H 2>\n</B O D Y>\n</H T M L>\n') at line 2
[15-07-07 17:23:27.6230] Plugins::GoogleMusic::ProtocolHandler::getNextTrack (103) Looking up stream url for url googlemusic:track:Tc4qfw27tvgvy7lqezsxolq4oyq failed: CallFailure: GetStreamUrl: 403 Client Error: Forbidden"

Checked my android device id twice... any ideas?

@DaBurgi
Copy link

DaBurgi commented Jul 8, 2015

Got it solved now! The Android Mobile Device ID (which was shown by playstore app "DeviceID" was NOT working. I copied the DeviceID out of the HTML code from the play.google.com/music, account settings, device list: looking like this: data-device-id="0x36cf712345678901" and removed the leading 0x. So, using 36cf712345678901 works again.

@Prindle19
Copy link

Tried with a bunch of different device-ids, still not working for me.

@dickwall
Copy link

Hey - I notice in the update that the login call in Login has been updated to include the device ID, but there is a second one in Settings (for the settings page) that also needs to be updated and has not. Since my device ID was also out of date I was unable to update it because of this being wrong. Correcting the problem in the Settings perl file got it to save and then work correctly.

@asplundj
Copy link

Where do I find the settings perl file?

Skickat från min Sony Xperia™-smartphone

---- Dick Wall skrev ----

Hey - I notice in the update that the login call in Login has been updated to include the device ID, but there is a second one in Settings (for the settings page) that also needs to be updated and has not. Since my device ID was also out of date I was unable to update it because of this being wrong. Correcting the problem in the Settings perl file got it to save and then work correctly.


Reply to this email directly or view it on GitHub.

@MaestroZ
Copy link

Hi,
I modifiedsettings.pm too (handler sub calls login method too without device id)
I don't have the wrong number of parameters error anymore
But I get this now :
Plugins::GoogleMusic::Plugin::initPlugin (95) Not able to login to Google Play Music: SSLError: hostname 'android.clients.google.com' doesn't match either of '.google.com', '.android.com', '.appengine.google.com', '.cloud.google.com', '.google-analytics.com', '.google.ca', '.google.cl', '.google.co.in', '.google.co.jp', '.google.co.uk', '.google.com.ar', '.google.com.au', '.google.com.br', '.google.com.co', '.google.com.mx', '.google.com.tr', '.google.com.vn', '.google.de', '.google.es', '.google.fr', '.google.hu', '.google.it', '.google.nl', '.google.pl', '.google.pt', '.googleadapis.com', '.googleapis.cn', '.googlecommerce.com', '.googlevideo.com', '.gstatic.cn', '.gstatic.com', '.gvt1.com', '.gvt2.com', '.metric.gstatic.com', '.urchin.com', '.url.google.com', '.youtube-nocookie.com', '.youtube.com', '.youtubeeducation.com', '.ytimg.com', 'android.com', 'g.co', 'goo.gl', 'google-analytics.com', 'google.com', 'googlecommerce.com', 'urchin.com', 'youtu.be', 'youtube.com', 'youtubeeducation.com' at line 64

The hostname used for authentication is not correct
I don't know how to solve this.

MaestroZ

@samkarpluk
Copy link

I'm getting the same error @MaestroZ reported 5 days ago: SSLError...

@dustinsterk
Copy link

I got mine working!

Run in order:
yum install gcc libffi-devel python-devel openssl-devel
pip install cryptography
pip install pyopenssl ndg-httpsclient pyasn1

No more SSLError and successful google music on vortexbox 2.3 LMS 7.9!
More info here: http://forums.slimdevices.com/showthread.php?98526-Google-Music-Plugin/page11

@hechtus
Copy link
Owner

hechtus commented Aug 26, 2015

I'm really sorry, not being able to respond for such a long time. I'm swamped with other things. So, if someone one to take over and continue to work on this plugin, please let me know. I'd like to give full access to this project.

@askvictor
Copy link

@hechtus @nick7634 I'm interested in updating this to the latest API; I'm quite proficient in python and used to work in perl. However, I have no idea where to start with debugging a squeezebox setup. Can you point me to how I'd get started?

@askvictor
Copy link

@nick7634 - are you still working on this? I'm interested in making this work properly (including fixing documentation)

@nick7634
Copy link

nick7634 commented Jun 2, 2016

@askvictor - I haven't had any free time to keep up with this plugin due to work. I've also don't have much experience in python. I was originally able to fix this plugin quickly by looking through the GMusicAPI commits to see how the login and other methods were updated. If you want a good place to start, I would look at the commits/changes made to the GMusicAPI repo to figure out what needs updating in this plugin. I know there were a lot of methods I never updated when I worked on it, I was mainly concerned with quickly getting the login to work again.

My work is finally starting to wind down over the next few weeks, so I may be able to look over the code soon.

@askvictor
Copy link

@nick7634 @hechtus I've started a github team https://github.com/squeezebox-googlemusic where I hope development can take place - I figure a few part-time devs might keep this rolling better. @hechtus - are you interested in transferring ownership of this repo to the team? @nick7634 - do you want to join this team and perform further dev work off that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests