Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google plus client "An internal error occured" [duplicate]

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?

like image 788
Oleg Karakoz Avatar asked Dec 21 '12 09:12

Oleg Karakoz


2 Answers

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!

like image 100
Door Avatar answered Oct 19 '22 05:10

Door


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...

like image 43
Oleg Karakoz Avatar answered Oct 19 '22 05:10

Oleg Karakoz