GooglePlus Login fail :The operation couldn’t be completed. (com.google.HTTPStatus error 400.)

2.1k views Asked by At

I'm using Google Play Game Services Prime31 Unity Plugin for my Unity - IOS project. After I import Unity package and build for IOS, I'm not getting build error on Xcode. However, at runtime, when I try Google+ sign in I am getting this error:

"GooglePlus Login fail :The operation couldn’t be completed. (com.google.HTTPStatus error 400.)"

When i press sign in button, choice of google account screen is displayed but after i choose an account, it returns without signing in(following cancel-OK screen is not displayed) and gives the error that I've quoted.

At Unity I've used init method where I passed clientID(which is surely called before auth method) and I set Info.plist additions properly. When I press sign in button PlayGameServices.authenticate() is called. Should I add some other method or sth at Xcode? How can I solve the problem? Thanks in advance.

2

There are 2 answers

1
ZynGie On

u test ur app in iOS 8?? I using another google play service plugin and also getting this error when running in iOS 8. But my app is work well in iOS 7.

0
Alok On

Cause of issue :

Cause 1: May be bundle id of google console and your application is not matching .(application bundle id and google console bundle id should be same).

Solution : Steps a: GoTo google console and login with your application google account .

for finding key :: open google console > select your project > API & Auth > Credential

b: change bundle id and regenerate key .

c: replace previous key with your new generated key . [GMSServices provideAPIKey:@"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"];

Cause 2: May be key is not matching with you google console key .

Solution: Just replace your application key with google console key . [GMSServices provideAPIKey:@"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"];

Note: Make sure your application bundle id and google console bundle id is same .