7

Last day I started to receive "An internal error occured" while trying to sign user with Google Plus in my application, that I used well and have not changed. The code has not changed for a long time.

GmsClient returns

connect: bindService returned true for Intent { act=com.google.android.gms.plus.service.START }
service broker connected, binder: android.os.BinderProxy@40fdbd20

And right after that shows toast message "An internal error occured".

I tried to compile Google SDK+ samples and run on the same device but it shows the same error. Maybe something changed in Google APIs?

tomrozb
  • 25,773
  • 31
  • 101
  • 122
Oleg Karakoz
  • 532
  • 1
  • 6
  • 18

4 Answers4

10

My "internal error occur" solution:

Follow the demo of https://developers.google.com/+/mobile/android/getting-started

it create the PlusClient by

mPlusClient = new PlusClient.Builder(this, this, this)
                .setVisibleActivities("XXXX/AddActivity", "XXXX/BuyActivity")
                .setScopes("PLUS_LOGIN")  // Space separated list of scopes
                .build();

And in my own app, when I remove ".setScopes("PLUS_LOGIN")" and show as:

mPlusClient = new PlusClient.Builder(this, this, this)
        .setVisibleActivities("XXXX/AddActivity", "XXXX/BuyActivity")
        .build();

The error solved, wired!

Hounshell
  • 5,321
  • 4
  • 34
  • 51
Door
  • 101
  • 1
  • 2
5

This is too dumb but I have not found any information googling internet and groups. But it solved replacing:

//static final String[] SCOPES = new String[] { Scopes.PLUS_PROFILE, PLUS_WRITE_MOMENT };
static final String[] SCOPES = new String[] { Scopes.PLUS_PROFILE };

Seems the error occured because of PLUS_WRITE_MOMENT... I don't understand why, but without this it works.

I like google...

Oleg Karakoz
  • 532
  • 1
  • 6
  • 18
  • 4
    I am having the same error, but can't getting the way, wher to put the fix from the answer ? – Abdul Wahab Apr 03 '13 at 11:42
  • 1
    FYI: This answer is now out of date following the Google+ Sign-In release and new SDKs that occurred on February 28th. – BrettJ Jun 27 '13 at 22:35
1

I also had this problem, which suddenly appeared out of nowhere seemingly. Unfortunately, Oleg's answer didn't help me.

The fix for me was to setup OAuth in the Google APIs Console (https://code.google.com/apis/console). It was very easy to setup. Quickstart instructions here: https://developers.google.com/+/quickstart/android.

When I first created the project the Simple API Access worked. But, within a month of not changing any code, it wasn't enough.

Anonsage
  • 8,030
  • 5
  • 48
  • 51
1

My experience / solution:

I tried everything listed above (checking client id, consent screen, changing scopes, etc.). Nothing solved the issue for me permanently.

When I viewed the detailed adb logs using this:

adb shell setprop log.tag.GooglePlusPlatform VERBOSE

I got the following log:

I/GLSUser (  854): GLS error: BAD_REQUEST xxxxx@gmail.com oauth2:profile https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/contacts.readonly

Finally, what did solve the issue was moving from PlusClient (which is deprecated) to using GoogleApiClient.

Migration is pretty simple (explained nicely here: http://www.riskcompletefailure.com/2014/02/migrating-from-plusclient-to.html).

After moving to GoogleApiClient, I never got this error again.

sid
  • 11
  • 1