androidgoogle-plusgoogle-play-servicesgoogle-plus-one

App occasionally crashes when accessing google play services


In my app I'm using the PlusOneButton and I simulated an automatic click on the actual button - to save the user one more click. For users that aren't signed in with their Google account the next screen that will be displayed is the builtin google dialog to choose an account.

Occasionally, the app crashes when it reaches this phase - I see the following lines in the log

1378-3640/? I/GLSUser﹕ [GLSUser] getTokenFromCache: [account: <ELLIDED:2885>, callingPkg: com.google.android.gms, service: oauth2:https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/pos]
1378-3640/? I/Auth.Core﹕ [TokenCache] Missing snowballing token: no granted scopes set.
1378-3640/? I/GLSUser﹕ [GLSUser] getTokenFromGoogle [account: <ELLIDED:2885>, callingPkg: com.google.android.gms, service: oauth2:https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/pos
6376-6376/com.myapp.android D/AndroidRuntime﹕ Shutting down VM
6376-6376/com.myapp.android W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41fced40)
6376-6376/com.myapp.android I/Process﹕ Sending signal. PID: 6376 SIG: 9

it seems that the crash happens after this line is written

[GLSUser] getTokenFromGoogle [account: <ELLIDED:2885>, callingPkg: com.google.android.gms, service: oauth2:https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/pos

because I don't see it in the log when there are no crashes.

Right now it seems that disabling the automatic click solves the problem - any idea what can be done to enable this automatic click?


Solution

  • The answer to my question is built of 2 parts

    1. As noted by TomTsagk and shkschneider - there must have been an exception that was thrown, and there was! - the problem was that we used an experimental 3rd party sdk and it was swallowing our exceptions system wide
    2. The actual problem that we had was that the plus one intent was null - it was a timing issue - so basically retrying the click until the intent isn't null solved the problem