hechtus / squeezebox-googlemusic

Squeezebox (Logitech Media Server) Plugin for Google Play Music
103 stars 24 forks source link

Plugin Failed to Load #85

Open mark-e-mark opened 9 years ago

mark-e-mark commented 9 years ago

After attempting fixes based on readings in several similar issues and seeing no positive results, I need to ask for your help. I run LMS 7.8.1 - 1428327708 on a 64bit Linux Server. The plugin had been running well until recently, and I use Google Play music on my phone. Here is the log entry: Slim::bootstrap::tryModuleLoad (286) Warning: Module [Plugins::GoogleMusic::Plugin] failed to load: Error -- py_eval raised an exception at /usr/local/lib/perl/5.18.2/Inline/Python.pm line 221. BEGIN failed--compilation aborted at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/GoogleMusic/GoogleAPI.pm line 74. Compilation failed in require at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/GoogleMusic/Settings.pm line 20. BEGIN failed--compilation aborted at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/GoogleMusic/Settings.pm line 20. Compilation failed in require at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/GoogleMusic/Plugin.pm line 24. BEGIN failed--compilation aborted at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/GoogleMusic/Plugin.pm line 24. Compilation failed in require at (eval 1077) line 1. BEGIN failed--compilation aborted at (eval 1077) line 1.

Environment testing: /$ sudo cpan App::cpanminus Reading '/home/mark/.cpan/Metadata' Database was generated on Wed, 27 May 2015 13:53:16 GMT App::cpanminus is up to date (1.7034). $ sudo cpanm --notest Inline Inline is up to date. (0.80) $ sudo cpanm --notest Inline::Python Inline::Python is up to date. (0.49)

$ sudo pip install gmusicapi Requirement already satisfied (use --upgrade to upgrade): gmusicapi in /usr/local/lib/python2.7/dist-packages Requirement already satisfied (use --upgrade to upgrade): validictory!=0.9.2,>=0.8.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): decorator>=3.3.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): mutagen>=1.18 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): protobuf>=2.4.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): requests!=1.2.0,!=2.2.1,>=1.1.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): python-dateutil!=2.0,>=1.3 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): proboscis>=1.2.5.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): oauth2client>=1.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): mock>=0.7.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): appdirs>=1.1.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): gpsoauth in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/dist-packages (from protobuf>=2.4.1->gmusicapi) Requirement already satisfied (use --upgrade to upgrade): httplib2>=0.9.1 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi) Requirement already satisfied (use --upgrade to upgrade): pyasn1==0.1.7 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi) Requirement already satisfied (use --upgrade to upgrade): pyasn1-modules==0.0.5 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi) Requirement already satisfied (use --upgrade to upgrade): rsa==3.1.4 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi) Requirement already satisfied (use --upgrade to upgrade): six>=1.6.1 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi) Cleaning up...

$ sudo pip install git+https://github.com/simon-weber/Unofficial-Google-Music-API.git@develop Downloading/unpacking 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-QWUmFP-build Running setup.py (path:/tmp/pip-QWUmFP-build/setup.py) egg_info for package from git+https://github.com/simon-weber/Unofficial-Google-Music-API.git@develop /usr/local/lib/python2.7/dist-packages/setuptools/dist.py:285: UserWarning: Normalizing '5.0.0-dev' to '5.0.0.dev0' normalized_version,

warning: no previously-included files matching '_local_*.py' found anywhere in distribution

Requirement already satisfied (use --upgrade to upgrade): gmusicapi==5.0.0.dev0 from git+https://github.com/simon-weber/Unofficial-Google-Music-API.git@develop in /usr/local/lib/python2.7/dist-packages Requirement already satisfied (use --upgrade to upgrade): validictory!=0.9.2,>=0.8.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==5.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): decorator>=3.3.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==5.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): mutagen>=1.18 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==5.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): protobuf>=2.4.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==5.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): requests!=1.2.0,!=2.2.1,>=1.1.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==5.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): python-dateutil!=2.0,>=1.3 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==5.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): proboscis>=1.2.5.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==5.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): oauth2client>=1.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==5.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): mock>=0.7.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==5.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): appdirs>=1.1.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==5.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): gpsoauth in /usr/local/lib/python2.7/dist-packages (from gmusicapi==5.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/dist-packages (from protobuf>=2.4.1->gmusicapi==5.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): httplib2>=0.9.1 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi==5.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): pyasn1==0.1.7 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi==5.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): pyasn1-modules==0.0.5 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi==5.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): rsa==3.1.4 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi==5.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): six>=1.6.1 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi==5.0.0.dev0) Cleaning up...

$ sudo bash ./mobile_devices.py ./mobile_devices.py: line 3: import: command not found from: can't read /var/mail/gmusicapi ./mobile_devices.py: line 6: syntax error near unexpected token (' ./mobile_devices.py: line 6:def main():' mark@SedonaServer:/$

CaptInsano commented 9 years ago

same problem here: LMS reports Plugin failed to load.

New Install: Vortexbox 2.3, Logitech Media Server Version: 7.9.0 - 0.77.20150523git1432134370 @ Sat 23 May 14:11:02 BST 2015

installed this plugin via the vortexbox repo (details of dependencies below):

Dependencies Resolved:

Installing: logitechmediaserver-plugin-googlemusic i686 0.4.1-2.fc20 vortexbox 272 k

Installing for dependencies: gdbm-devel i686 1.10-8.fc20 updates 47 k glibc-devel i686 2.18-19.fc20 updates 1.0 M glibc-headers i686 2.18-19.fc20 updates 648 k google-api-python-client noarch 1.4.0-1.fc20 vortexbox 70 k kernel-headers i686 3.12.5-301.fc20 vortexbox 911 k libdb-devel i686 5.3.28-1.fc20 fedora 37 k perl-ExtUtils-Install noarch 1.59-293.fc20 updates 75 k perl-ExtUtils-MakeMaker noarch 6.72-3.fc20 updates 277 k perl-ExtUtils-Manifest noarch 1.63-1.fc20 fedora 31 k perl-ExtUtils-ParseXS noarch 1:3.18-292.fc20 updates 77 k perl-Inline noarch 0.53-5.fc20 fedora 168 k perl-Inline-Python i686 0.48-1.fc20 vortexbox 51 k perl-Test-Harness noarch 3.28-4.fc20 updates 302 k perl-devel i686 4:5.18.4-293.fc20 updates 474 k protobuf-python i686 2.5.0-11.fc20 updates 130 k pyparsing noarch 2.0.3-1.fc20 updates 99 k python-backports i686 1.0-3.fc20 fedora 4.8 k python-backports-ssl_match_hostname noarch 3.4.0.2-4.fc20 updates 13 k python-dateutil noarch 1.5-7.fc20 fedora 85 k python-gmusicapi i686 1:5.0.0-2.fc20 vortexbox 215 k python-httplib2 noarch 0.7.7-3.fc20 fedora 70 k python-mutagen noarch 1.27-1.fc20 updates 245 k python-oauth2client i686 1:1.4.6-1.fc20 vortexbox 84 k python-requests noarch 1.2.3-5.fc20 fedora 75 k python-urllib3 noarch 1.8.2-1.fc20 updates 79 k python-validictory i686 1:1.0.0-1.fc20 vortexbox 40 k systemtap-sdt-devel i686 2.7-1.fc20 updates 62 k

Snippet of my LMS log:

[15-06-03 22:24:36.3793] Slim::bootstrap::tryModuleLoad (286) Warning: Module [Plugins::GoogleMusic::Plugin] failed to load: Error -- py_eval raised an exception at /usr/lib/perl5/vendor_perl/Inline/Python.pm line 177. BEGIN failed--compilation aborted at /usr/share/squeezeboxserver/Plugins/GoogleMusic/GoogleAPI.pm line 74. Compilation failed in require at /usr/share/squeezeboxserver/Plugins/GoogleMusic/Settings.pm line 20. BEGIN failed--compilation aborted at /usr/share/squeezeboxserver/Plugins/GoogleMusic/Settings.pm line 20. Compilation failed in require at /usr/share/squeezeboxserver/Plugins/GoogleMusic/Plugin.pm line 24. BEGIN failed--compilation aborted at /usr/share/squeezeboxserver/Plugins/GoogleMusic/Plugin.pm line 24. Compilation failed in require at (eval 1010) line 1. BEGIN failed--compilation aborted at (eval 1010) line 1.

[15-06-03 22:24:36.3967] Slim::Utils::PluginManager::load (323) Error: Couldn't load Plugins::GoogleMusic::Plugin

Any advise would be greatly appreciated.

mark-e-mark commented 9 years ago

Came back for another try. Upon $ sudo pip uninstall gmusicapi $ Can't uninstall 'gmusicapi'. No files were found to uninstall so... $ sudo pip install gmusicapi

Requirement already satisfied (use --upgrade to upgrade): gmusicapi in /usr/local/lib/python2.7/dist-packages Requirement already satisfied (use --upgrade to upgrade): validictory!=0.9.2,>=0.8.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): decorator>=3.3.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): mutagen>=1.18 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): protobuf>=2.4.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): requests!=1.2.0,!=2.2.1,>=1.1.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): python-dateutil!=2.0,>=1.3 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): proboscis>=1.2.5.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): oauth2client>=1.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): mock>=0.7.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): appdirs>=1.1.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): gpsoauth>=0.0.2 in /usr/local/lib/python2.7/dist-packages (from gmusicapi) Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/dist-packages (from protobuf>=2.4.1->gmusicapi) Requirement already satisfied (use --upgrade to upgrade): httplib2>=0.9.1 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi) Requirement already satisfied (use --upgrade to upgrade): pyasn1==0.1.7 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi) Requirement already satisfied (use --upgrade to upgrade): pyasn1-modules==0.0.5 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi) Requirement already satisfied (use --upgrade to upgrade): rsa==3.1.4 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi) Requirement already satisfied (use --upgrade to upgrade): six>=1.6.1 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi) Requirement already satisfied (use --upgrade to upgrade): pycrypto in /usr/lib/python2.7/dist-packages (from gpsoauth>=0.0.2->gmusicapi) Cleaning up...

$ cd /usr/local/lib/python2.7/dist-packages root$ cd gmusicapi root$ ls- l total 68 d----wS-w- 2 root staff 4096 Jun 7 10:17 clients ---------- 1 root staff 1006 Jun 7 10:17 compat.py ---------- 1 root staff 1470 Jun 7 10:17 compat.pyc ---------- 1 root staff 818 Jun 7 10:17 exceptions.py ---------- 1 root staff 2180 Jun 7 10:17 exceptions.pyc d----wS-w- 2 root staff 4096 Jun 7 10:17 gmtools ---------- 1 root staff 1188 Jun 7 10:17 init.py ---------- 1 root staff 1375 Jun 7 10:17 init.pyc d----wS-w- 2 root staff 4096 Jun 7 10:17 protocol ---------- 1 root staff 6877 Jun 7 10:17 session.py ---------- 1 root staff 7808 Jun 7 10:17 session.pyc d----wS-w- 2 root staff 4096 Jun 7 10:17 test d----wS-w- 2 root staff 4096 Jun 7 10:17 utils ---------- 1 root staff 26 Jun 7 10:17 _version.py ---------- 1 root staff 183 Jun 7 10:17 _version.pyc

Something is getting changed on today's date. Other checks: $ sudo cpanm --notest Inline Inline is up to date. (0.80) $ sudo cpanm --notest Inline::Python Inline::Python is up to date. (0.49)

Logitechmediaserver log shows same error: plugin failed to load. So...no plugin for me unless someone has some suggestions.

mark-e-mark commented 9 years ago

Looking around at some other issues here, I found this advice: https://github.com/hechtus/squeezebox-googlemusic/issues/61

Here's my result: $ sudo ./mobiledevices.py username password /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning 2015-06-07 17:46:20,594 - gmusicapi.Webclient1 (shared:405) [WARNING]: Received strange login response: {}

You may need to enable less secure logins: https://www.google.com/settings/security/lesssecureapps Could not login to Google Play Music. Incorrect username or password.

I had to generate another app password in my Google account in order to test this, and I have a couple of devices using Play. Checking the link in the error report:

InsecurePlatformWarning New in version 1.11.

Certain Python platforms (specifically, versions of Python earlier than 2.7.9) have restrictions in their ssl module that limit the configuration that urllib3 can apply. In particular, this can cause HTTPS requests that would succeed on more featureful platforms to fail, and can cause certain security features to be unavailable.

If you encounter this warning, it is strongly recommended you upgrade to a newer Python version, or that you use pyOpenSSL as described in the OpenSSL / PyOpenSSL section.

$ sudo apt-get upgrade python2.7 Reading package lists... Done Building dependency tree
Reading state information... Done Calculating upgrade... Done python2.7 is already the newest version. python2.7 set to manually installed.

SSL could be the issue since I the script could not login via API with known working ID and App PW. Do I try to disable SSL or ...what?

calipoop commented 9 years ago

I also have the same "Plugin failed to load" error. Running gmusicapi 5.0 and plugin 4.1. Any possible fixes? Thanks in advance.

kmtathome commented 9 years ago

I'm seeing the same thing. I had been getting errors when trying to access Genres or Stations, so I decided to start from scratch. Upgraded to the latest 7.9 LMS nightly, reinstalled the API, reinstalled the plug-in, and now it won't load. Anyone make any progress on this?

kmtathome commented 9 years ago

I was able to get this to work after removing googlemusic.prefs from /var/lib/squeezeboxserver/prefs/plugin and googlemusic.db from /var/lib/squeezeboxserver/cache. I could then load the plugin again and repopulate the login fields. I did have to use the instructions in #84, use the alternate repo and manually populate the mobile device ID to get it to work.

sundown94 commented 9 years ago

I am suddenly experiencing the same "Plugin failed to load" error. Before having this problem, I was actually attempting to solve the "login in" error discussed in #84. So I went from that error to this error. As background, when I started getting the login error, I was originally using LMS 7.7.5 and Python 2.7. I upgraded to gmusicapi v6.0 (and also tried the dev version) and tried both versions of the plugin (0.4.1 and 0.4.2). I decided to upgrade from Python 2.7 to 2.7.9 when my error in the squeezeboxserver log eventually switched to an SSL error (a little research on the web indicated that Python 2.7 had that issue, but 2.7.9 did not). So after installing Python 2.7.9, my login problems turned into "plugin failed to load" problems like everyone else in this thread. I have continued to troubleshoot by following kmtathome's instructions, which included uninstalling LMS 7.7.2, re-installing the newest nightly version (7.9), uninstalling gmusicapi, re-installing gmusicapi 6.0, and being sure to clear out the prefs and db from the googlemusic plugin. I have also tried to do a ton of other updates/upgrades, etc. and tried every combination I can think of, but nothing is working. For anyone who actually has it working now, if you could just list the versions for any software that would be relevant here, that would be great. I plan to start from a fresh copy of the Raspberry Pi OS (Raspian) and try this all over again, and I'll post again with details if I get it to work. Thanks in advance for any help!!

mark-e-mark commented 9 years ago

Tried again today by reading up on python ssl. https://urllib3.readthedocs.org/en/latest/security.html#openssl-pyopenssl Getting cryptography to install lead me down several rabbit holes, but I eventually got to see an error-free install of pip install pyopenssl ndg-httpsclient pyasn1

Here's the confirmation: $ sudo pip install pyopenssl ndg-httpsclient pyasn1 Requirement already satisfied (use --upgrade to upgrade): pyopenssl in /usr/local/lib/python2.7/dist-packages Requirement already satisfied (use --upgrade to upgrade): ndg-httpsclient in /usr/local/lib/python2.7/dist-packages Requirement already satisfied (use --upgrade to upgrade): pyasn1 in /usr/local/lib/python2.7/dist-packages

Naturally, I get no new results from LMS. I upgraded to LMS 7.9 but see the exact same error: Slim::bootstrap::tryModuleLoad (286) Warning: Module [Plugins::GoogleMusic::Plugin] failed to load:

Since I had apparantly solved the ssl issue, I thought I would try the diagnostic script from https://github.com/hechtus/squeezebox-googlemusic/issues/61

Here's my result: $ sudo ./mobile_devices.py username password Permission denied

Checking my install: /$ sudo pip install git+https://github.com/simon-weber/Unofficial-Google-Music-API.git@develop 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-maxJAg-build Requirement already satisfied (use --upgrade to upgrade): validictory!=0.9.2,>=0.8.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): decorator>=3.3.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): mutagen>=1.18 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): protobuf>=2.4.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): requests!=1.2.0,!=2.2.1,>=1.1.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): python-dateutil!=2.0,>=1.3 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): proboscis>=1.2.5.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): oauth2client>=1.1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): mock>=0.7.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): appdirs>=1.1.0 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): gpsoauth==0.0.4 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): MechanicalSoup in /usr/local/lib/python2.7/dist-packages (from gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): pyopenssl in /usr/local/lib/python2.7/dist-packages (from gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): ndg-httpsclient in /usr/local/lib/python2.7/dist-packages (from gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): pyasn1 in /usr/local/lib/python2.7/dist-packages (from gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/dist-packages (from protobuf>=2.4.1->gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): six>=1.5 in /usr/local/lib/python2.7/dist-packages (from python-dateutil!=2.0,>=1.3->gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): httplib2>=0.9.1 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): pyasn1-modules==0.0.5 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): rsa==3.1.4 in /usr/local/lib/python2.7/dist-packages (from oauth2client>=1.1->gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): pycrypto in /usr/lib/python2.7/dist-packages (from gpsoauth==0.0.4->gmusicapi==7.0.0.dev0) Requirement already satisfied (use --upgrade to upgrade): beautifulsoup4 in /usr/local/lib/python2.7/dist-packages (from MechanicalSoup->gmusicapi==7.0.0.dev0) Installing collected packages: gmusicapi Running setup.py install for gmusicapi Successfully installed gmusicapi-7.0.0.dev0

I tried a new device password from Google Apps and get no other results. Looking at the script, https://raw.githubusercontent.com/hechtus/squeezebox-googlemusic/master/mobile_devices.py, 'permission denied' is a system error and not one from the script. My system logs have no errors or warnings or anything related to this.

mark-e-mark commented 9 years ago

I found mobile_devices.py and chmod 0775. I then received errors that I have missing or out of date packages. New errors are so exciting!
After updating each package only to receive a new error about another package, I then went through a series of missing or out of date pip packages, culminating with me learning to use a requirements.txt list of packages and update the lot of them.
$sudo pip install -r requirements.txt

mobile_devices.py is now working and I am now seeing on an authentication error when I run it. I have created new Google App passwords a few times and still get this: $ ./mobile_devices.py username password !-- begin debug log --! version: 6.0.0 2015-07-11 16:27:57,723 - gmusicapi.Webclient1 (shared:70) [INFO]: initialized 2015-07-11 16:27:57,723 - gmusicapi.Webclient1 (shared:93) [INFO]: logged out 2015-07-11 16:27:57,746 - gmusicapi.Webclient1 (shared:205) [DEBUG]: ClientLogin() 2015-07-11 16:27:57,953 - gmusicapi.Webclient1 (shared:405) [WARNING]: Received strange login response: {}

You may need to enable less secure logins: https://www.google.com/settings/security/lesssecureapps 2015-07-11 16:27:57,953 - gmusicapi.Webclient1 (shared:405) [WARNING]: Received strange login response: {}

You may need to enable less secure logins: https://www.google.com/settings/security/lesssecureapps 2015-07-11 16:27:57,954 - gmusicapi.Webclient1 (webclient:61) [INFO]: failed to authenticate Could not login to Google Play Music. Incorrect username or password.

"Less secure logins" is not an option for me because I use 2-step verification. https://www.google.com/settings/security/lesssecureapps.

Reading the login issues from https://github.com/hechtus/squeezebox-googlemusic/issues/84, I upgraded gmusicapi: $ sudo pip install git+https://github.com/simon-weber/Unofficial-Google-Music-API.git@develop --upgrade Installing collected packages: gmusicapi Found existing installation: gmusicapi 6.0.0 Uninstalling gmusicapi-6.0.0: Successfully uninstalled gmusicapi-6.0.0 Running setup.py install for gmusicapi Successfully installed gmusicapi-7.0.0.dev0

./mobile_devices.py username password !-- begin debug log --! version: 7.0.0-dev 2015-07-11 16:40:29,561 - gmusicapi.Webclient1 (shared:70) [INFO]: initialized 2015-07-11 16:40:29,561 - gmusicapi.Webclient1 (shared:93) [INFO]: logged out /usr/local/lib/python2.7/dist-packages/bs4/init.py:166: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html5lib"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

To get rid of this warning, change this:

BeautifulSoup([your markup])

to this:

BeautifulSoup([your markup], "html5lib")

markup_type=markup_type)) 2015-07-11 16:40:30,024 - gmusicapi.Webclient1 (webclient:62) [INFO]: failed to authenticate Could not login to Google Play Music. Incorrect username or password.

mark-e-mark commented 9 years ago

I decided that perhaps the mobile-devices script was missing my device ID, since it doesn't use that. I enabled the plugin in LMS 7.9 using Hectus's repo and rebooted.

And the plugin loaded. It actually loaded. Wow.

But it didn't work of course. I'm trying to find the failure point, and here's my LMS log entries: Plugins::GoogleMusic::Settings::handler (75) Not able to login to Google Play Music: exceptions.TypeError: login() takes exactly 4 arguments (3 given) at (eval 1112) line 176. [15-07-11 17:05:09.4000] Plugins::GoogleMusic::AllAccess::getStations (565) Not able to get user created radio stations: NotLoggedIn: at line 757

I've verified my GSF ID and even tried using the device ID instead, but same error. I tried Nick's forked repo next to see if it works but I get the same error. What's the 4th arg? I have User,Pass,GSF.

mark-e-mark commented 9 years ago

From https://github.com/hechtus/squeezebox-googlemusic/issues/84#issuecomment-115929334, Disable SSL.

That worked. Pretty sure this means my user name, device ID, and app password are sent cleartext. Oh well, I'm listening to my high bit-rate Jazz again.

mark-e-mark commented 9 years ago

Today I see 'invalid credentials' messages in the log, so I enabled SSL in the Plugin, restart, and voila! Anybody know who changed what?

asplundj commented 8 years ago

I also got plugin failed to load now while trying to solve the login problem. I got the login problem before after a reboot and managed to solve it using the suggestions given in the other threads. However, after another reboot I got the login problem again and when I tried to solve that the plugin won't even start. I have tried all suggestions.

I'm running LMS on a wandboard with Arch Linux

dustinsterk commented 8 years ago

I have fixed this issue! See more here: http://forums.slimdevices.com/showthread.php?98526-Google-Music-Plugin/page11