hechtus / squeezebox-googlemusic

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

Plugin has issues with Squeezebox Server on QNAP NAS installation #18

Closed deradam closed 10 years ago

deradam commented 10 years ago

Hi,

I have finally managed to install the plugin on my QNAP NAS (ARM CPU). When I set my username and password and try to log it in, I see the following error in the logs:

[13-12-06 13:32:39.1864] Slim::Utils::PluginManager::load (348) Warning: Couldn't call Plugins::GoogleMusic::Plugin->initPlugin: SSLError: [Errno 218603680] _ssl.c:549: error:0D07A0A0:asn1 encoding routines:ASN1_mbstring_copy:unknown format at line 21

This might be less your issue but an issue with my NAS configuration/installation. Do you have an idea what is missing?

Cheers!

hechtus commented 10 years ago

As I'm running the plugin also on a Raspberry PI it should also be possible to get it running on your ARM NAS. Unfortunately, I've never seen such an error. You could first try to run the mobile_devices.py script on your NAS, to see if the gmusicapi is working in general on your target. The script can be found here:

https://github.com/hechtus/squeezebox-googlemusic/blob/master/mobile_devices.py

deradam commented 10 years ago

Thanks for the quick feedback. Running the script brings the following error:

requests.exceptions.SSLError: [Errno 218603680] _ssl.c:549: error:0D07A0A0:asn1 encoding routines:ASN1_mbstring_copy:unknown format

Seems like my SSL something is fucked up :( Will see what I can do about that...

hechtus commented 10 years ago

So, it's definitely a Python installation issue. The error says that there is something wrong in the Python SSL support.

deradam commented 10 years ago

Hey, I just disabled SSL for the Python client (see issue https://github.com/simon-weber/Unofficial-Google-Music-API/issues/196) and mobile_devices.py is working. The plugin is however still not working. I get the following on the console. Do you have a clue what that could be?

2013-12-07 00:55:32,112 - gmusicapi.Mobileclient1 (shared:208) [DEBUG]: {'url': 'https://www.google.com/accounts/ClientLogin', 'data': {'logincaptcha': None, 'logintoken': None, 'service': 'sj', 'Passwd': 'xxxx', 'source': 'gmusicapi-3.0.0-dev', 'accountType': 'HOSTED_OR_GOOGLE', 'Email': 'xxxx'}, 'method': 'POST'} [13-12-07 00:55:32.4958] Slim::Networking::IO::Select::ANON (147) Error: Select task failed calling Slim::Web::HTTP::processHTTP: SSLError: [Errno 218603680] _ssl.c:549: error:0D07A0A0:asn1 encoding routines:ASN1_mbstring_copy:unknown format at line 21 ; fh=Slim::Web::HTTP::ClientConn=GLOB(0x4f053c8)

hechtus commented 10 years ago

Hmm, the mobile_devices.py script uses the webclient of gmusicapi. I'm not sure, if Simons patch only applies to the webclient but not to the mobileclient the plugin is using. Please ask Simon how to fix the problem for the Mobileclient API.

deradam commented 10 years ago

Updated to the latest developer version of gmusicapi and changed your plugin code to initialize the Webclient and the Mobileclient with (verify_ssl=False). Now it is working like a charme on my QNAP. Thanks for your awesome work and your support. Danke sehr!

hechtus commented 10 years ago

OK. Great. In a future version, I will add an option to the plugin preferences to disable SSL verification. This way you and others will be able to circumvent problems with SSL verification.

deradam commented 10 years ago

Hey Ronald, I have updated the plugin to the latest version (v0.3.2) and now my "SSL tweaks" have been overwritten. Unfortunately I forgot where I added the verify_ssl option to disable the SSL verification. Could you point me to the place where I need to adapt it while Issue #19 is still pending?

Update: I have meanwhile disabled SSL in the gmusicapi (I currently have version 3.1.0_dev installed). Now I get another error:

[14-02-01 10:03:00.0582] Plugins::GoogleMusic::AllAccess::search (214) Not able to search All Access for: fettes brot [14-02-01 10:03:00.0617] Slim::Networking::IO::Select::ANON (147) Error: Select task failed calling Slim::Web::HTTP::processHTTP: Not a HASH reference at /opt/ssods4/var/home/SqueezeboxServer/Cache/InstalledPlugins/Plugins/GoogleMusic/Plugin.pm line 300. ; fh=Slim::Web::HTTP::ClientConn=GLOB(0x479dd40)

Any Idea?

hechtus commented 10 years ago

I will try to add the disable-ssl-option in the upcoming release, as gmusicapi 3.1.0 is out.

Regarding your other problem. Is it always the case that searching does not work? I mean, is all-access-search completely broken?

deradam commented 10 years ago

Hi @hechtus, thanks for the quick feedback. I am looking forward to the SSL "fix".

Yes, it is always on all-access. But there seems to be something wrong anyway, as I cannot search my own library on Google Music either - the search simply returns nothing (Interpreten (0) Alben (0) Titel (0)).

All-Access error: [14-02-03 19:06:28.0665] Plugins::GoogleMusic::AllAccess::search (214) Not able to search All Access for: michael [14-02-03 19:06:28.0697] Slim::Networking::IO::Select::ANON (147) Error: Select task failed calling Slim::Web::HTTP::processHTTP: Not a HASH reference at /opt/ssods4/var/home/SqueezeboxServer/Cache/InstalledPlugins/Plugins/GoogleMusic/Plugin.pm line 300. ; fh=Slim::Web::HTTP::ClientConn=GLOB(0x5a48a08) [14-02-03 19:07:43.0488] Plugins::GoogleMusic::AllAccess::search (214) Not able to search All Access for: michael [14-02-03 19:07:43.0524] Slim::Networking::IO::Select::ANON (147) Error: Select task failed calling Slim::Web::HTTP::processHTTP: Not a HASH reference at /opt/ssods4/var/home/SqueezeboxServer/Cache/InstalledPlugins/Plugins/GoogleMusic/Plugin.pm line 300. ; fh=Slim::Web::HTTP::ClientConn=GLOB(0x5a53118)

hechtus commented 10 years ago

If your library is also not working, then there is something completely wrong. I suspect that your ssl fix does not work.

deradam commented 10 years ago

I upgraded to gmusicapi 3.1.0 (non-dev) and applied my "fixes" to disable ssl verification, restarted the squeezebox server and all is fine. Thanks, so it is working again :)

hechtus commented 10 years ago

OK. Great! I will let you know when the SSL option is finished.