4

I ask the user to sign in:

DeezerConnect deezerConnect = new DeezerConnect(this, APP_ID);
DialogListener listener = new DialogListener(){
    @Override
    void onComplete(Bundle values) {
        SessionStore session = new SessionStore();
        session.save(deezerConnect, MainActivity.this);

        Toast.makeText(MainActivity.this, "Sign in successful", Toast.LENGTH_SHORT).show();
    }

    @Override
    void onCancel() {
        Toast.makeText(MainActivity.this, "Sign in required", Toast.LENGTH_SHORT).show();
    }

    @Override
    void onException(Exception e) {
         e.printStackTrace();
    }

}
deezerConnect.authorize(this, PERMISSIONS, listener);

Normal and Facebook sign-in seem to be working fine, but when I tap the Sign in with Google button, the login dialog closes, and in Logcat I see the following lines:

09-30 18:09:19.460 22918-22918/ro.ande.deezwaker W/System.err: com.deezer.sdk.network.connect.event.DialogError: Unexpected URL
09-30 18:09:19.460 22918-22918/ro.ande.deezwaker W/System.err:     at com.deezer.sdk.Country$Blues.shouldOverrideUrlLoading(Unknown Source)
09-30 18:09:19.460 22918-22918/ro.ande.deezwaker W/System.err:     at com.android.webview.chromium.WebViewContentsClientAdapter.shouldOverrideUrlLoading(WebViewContentsClientAdapter.java:74)
09-30 18:09:19.460 22918-22918/ro.ande.deezwaker W/System.err:     at org.chromium.android_webview.AwContentsClient.shouldIgnoreNavigation(AwContentsClient.java:15)
09-30 18:09:19.460 22918-22918/ro.ande.deezwaker W/System.err:     at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(AwContentsClientBridge.java:157)
09-30 18:09:19.460 22918-22918/ro.ande.deezwaker W/System.err:     at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
09-30 18:09:19.460 22918-22918/ro.ande.deezwaker W/System.err:     at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:7)
09-30 18:09:19.460 22918-22918/ro.ande.deezwaker W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:102)
09-30 18:09:19.460 22918-22918/ro.ande.deezwaker W/System.err:     at android.os.Looper.loop(Looper.java:148)
09-30 18:09:19.460 22918-22918/ro.ande.deezwaker W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:7331)
09-30 18:09:19.460 22918-22918/ro.ande.deezwaker W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
09-30 18:09:19.460 22918-22918/ro.ande.deezwaker W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
09-30 18:09:19.460 22918-22918/ro.ande.deezwaker W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

There's also this line:

09-30 18:09:19.540 22918-22918/ro.ande.deezwaker I/chromium: [INFO:CONSOLE(0)] "Refused to display '*some google url*' in a frame because it set 'X-Frame-Options' to 'sameorigin'.", source: *some deezer url* (0)

What does this mean and how do I solve it?

Liam
  • 27,717
  • 28
  • 128
  • 190
tezkerek
  • 186
  • 3
  • 6
  • I'm not too familiar with deezer, but is your dialog's onComplete (session store) for dealing with facebook logins? and, are you using it again for dealing with google logins? – chornge Sep 30 '17 at 18:47
  • Per the docs, SessionStore is used to remember the login the next time the user opens the app. I guess it's universal. I don't think `onComplete` is the problem because it's never reached. – tezkerek Sep 30 '17 at 19:21
  • I think it never worked and they still haven't fixed it, I have this problem as well - see https://stackoverflow.com/questions/23626512/login-with-a-google-account Let me know if your experience has been different. – Steve M Mar 26 '18 at 19:51
  • @SteveM I actually saw that question before asking mine, but I read it as "there is no Google+ sign-in button". In my case the option exists, but it seems to be broken. – tezkerek Mar 27 '18 at 15:53
  • @AndreiAncuța Same thing here, the button is present but either does nothing or causes exception and dialog closes. – Steve M Mar 27 '18 at 22:59

0 Answers0