Giter VIP home page Giter VIP logo

Comments (19)

hechtus avatar hechtus commented on June 26, 2024

@deradam Please check out the new release v0.3.3

from squeezebox-googlemusic.

deradam avatar deradam commented on June 26, 2024

@hechtus checked out v0.3.3 and now it is not working anymore. I reinstalled the gmusicapi (v3.1.0) and did not change anything. Unfortunately it seems that checking the "ignore ssl" setting does not work. When applying the change, the console tells me the following. So it seems that it still uses SSL. Can you point me to your changes in the code, that should disable the ssl verification?

[14-02-07 11:03:52.8775] 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 37
[14-02-07 11:05:36.0262] Slim::Utils::Misc::msg (1304) Warning: [11:05:36.0240] Async::HTTP: Unable to load IO::Socket::SSL, will try connecting to SSL servers in non-SSL mode
[14-02-07 11:05:46.3458] 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 37
; fh=Slim::Web::HTTP::ClientConn=GLOB(0x4547df8)

from squeezebox-googlemusic.

hechtus avatar hechtus commented on June 26, 2024

Did you restarted the media server? It should have done automatically when changing the option.

from squeezebox-googlemusic.

deradam avatar deradam commented on June 26, 2024

If I check the option and click on apply, the pages keeps on loading and refreshing and never stops loading. A manual restart of the server shows that the option is still disabled. So actually, I cannot even enabled the disable option.

Btw. I found your changes in the GoogleAPI.pm in line 20. Looks good to me ;)

from squeezebox-googlemusic.

hechtus avatar hechtus commented on June 26, 2024

Hmm, is it possible that you check out the v0.3 branch, which I'm currently using to fix v0.3.3 and test my current changes?

from squeezebox-googlemusic.

deradam avatar deradam commented on June 26, 2024

Sure, give me few minutes please :)

from squeezebox-googlemusic.

deradam avatar deradam commented on June 26, 2024

@hechtus I have now copied the latest v0.3 branch stuff (last commit 10fa865) onto the server and it all seems fine. Thanks very much for your support and I believe it's time for version v0.3.4 then ;-)

from squeezebox-googlemusic.

hechtus avatar hechtus commented on June 26, 2024

Wow, that's fantastic. So I will release v0.3.4 now. Thanks for testing!

from squeezebox-googlemusic.

hechtus avatar hechtus commented on June 26, 2024

Done and tested.

from squeezebox-googlemusic.

hechtus avatar hechtus commented on June 26, 2024

Hi, even if it is working now, I'm not sure if it completely solved. I'd like to ask you for a last test. What happens when you uncheck the option again and allow to restart the server. Is it still possible to go to the settings page and disable ssl verification again?

from squeezebox-googlemusic.

deradam avatar deradam commented on June 26, 2024

Hi Ronald, as you expected, this does not work completly. I activated SSL, restarted, checked deactivate SSL and clicked on apply and now the browser is in a never ending loading loop. So it seems that this is indeed not yet finished. Could it be that you need to persist disableSSL before trying to check the credentials? I remember that you persist the disableSSL setting more towards the end in the "apply settings" function. Let me know, when I can test the fixes :)

from squeezebox-googlemusic.

hechtus avatar hechtus commented on June 26, 2024

Could you please send some snippets of your server log. I expect some error messages in there.

from squeezebox-googlemusic.

deradam avatar deradam commented on June 26, 2024

This is what I get after a fresh restart and trying to check the disable option:

[14-02-09 19:24:16.1314] main::init (354) Starting Logitech Media Server (v7.7.2, r33893, Wed Mar 14 06:37:22 MDT 2012) perl 5.010000
[14-02-09 19:24:16.1303] main::init (354) Starting Logitech Media Server (v7.7.2, r33893, Wed Mar 14 06:37:22 MDT 2012) perl 5.010000
[14-02-09 19:24:16 ] ssctrl SqueezeboxServer started.
[14-02-09 19:24:16 ] ssctrl Setting nice level to +0
[14-02-09 19:24:27.1764] 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 37
[14-02-09 19:25:22.8420] 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 37
; fh=Slim::Web::HTTP::ClientConn=GLOB(0x44bd428)

from squeezebox-googlemusic.

hechtus avatar hechtus commented on June 26, 2024

OK. Thanks. I can only guess what happened. First, Plugin::initPlugin() is crashing. Either logging in to Google raises an exception or refreshing My Library/Playlists.

The second error seems to be raised when you are trying to modify the settings (checking the Disable SSL check box). I guess you did this about one minute after restarting the server. As there is also a call to login to Google I suspect that the other exception is also thrown by this.

I will try to catch the exceptions thrown by login() and will let you know a small patch you could try.

from squeezebox-googlemusic.

deradam avatar deradam commented on June 26, 2024

Great. I will only be able to test a fix in the evening. Vielen Dank für Deine Unterstützung und die tolle Software!

from squeezebox-googlemusic.

hechtus avatar hechtus commented on June 26, 2024

As a first shot I tried the following. Is it possible for you to apply the following patch:

diff --git a/GoogleMusic/Plugin.pm b/GoogleMusic/Plugin.pm
index 61cc8ec..ff08139 100644
--- a/GoogleMusic/Plugin.pm
+++ b/GoogleMusic/Plugin.pm
@@ -96,10 +96,17 @@ sub initPlugin {
        $recent_searches->{$a}->{ts} <=> $recent_searches->{$a}->{ts}
    } keys %$recent_searches;

+   # Try to login
+   eval {
+       $googleapi->login($prefs->get('username'),
+                         $prefs->get('password'));
+   };
+   if ($@) {
+       $log->error("Not able to login to Google Play Music: $@");
+   }

-
-   if (!$googleapi->login($prefs->get('username'),
-                          $prefs->get('password'))) {
+   # Refresh My Library and Playlists
+   if (!$googleapi->is_authenticated()) {
        $log->error(string('PLUGIN_GOOGLEMUSIC_NOT_LOGGED_IN'));
    } else {
        Plugins::GoogleMusic::Library::refresh();
diff --git a/GoogleMusic/Settings.pm b/GoogleMusic/Settings.pm
index c1d9efe..b758b5f 100644
--- a/GoogleMusic/Settings.pm
+++ b/GoogleMusic/Settings.pm
@@ -53,7 +53,14 @@ sub handler {
        # Logout from Google
        $googleapi->logout();
        # Now try to login with new username/password
-       if(!$googleapi->login($params->{'username'}, $params->{'password'})) {
+       eval {
+           $googleapi->login($prefs->get('username'),
+                             $prefs->get('password'));
+       };
+       if ($@) {
+           $log->error("Not able to login to Google Play Music: $@");
+       }
+       if(!$googleapi->is_authenticated()) {
            $params->{'warning'} = cstring($client, 'PLUGIN_GOOGLEMUSIC_LOGIN_FAILED');
        } else {
            $params->{'warning'} = cstring($client, 'PLUGIN_GOOGLEMUSIC_LOGIN_SUCCESS');

from squeezebox-googlemusic.

deradam avatar deradam commented on June 26, 2024

Hey @hechtus, sorry for the delay. Just tested your patch. Could finally disbale SSL again. Great job, seems to be working now. Thank you very much for all the support and the awesome work. I think it's time for yet another version :) 👍

from squeezebox-googlemusic.

hechtus avatar hechtus commented on June 26, 2024

OK. Great. It was a pleasure to help!

from squeezebox-googlemusic.

hechtus avatar hechtus commented on June 26, 2024

Finished.

from squeezebox-googlemusic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.