playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.47k stars 966 forks source link

Google Play services has stopped after logging in #1714

Open bbb0x opened 7 years ago

bbb0x commented 7 years ago

Getting Google Play services has stopped when trying to login. Have debug on and everything is okay inside debug log. Also the login callback returns true even through it crashes. Using current version. Code I'm executing:

    playGamesConfig = new PlayGamesClientConfiguration.Builder()

    .RequestEmail()

    .RequestServerAuthCode(false)

    .RequestIdToken()
    .Build();

    PlayGamesPlatform.InitializeInstance(playGamesConfig);

    PlayGamesPlatform.DebugLogEnabled = true;

    PlayGamesPlatform.Activate();`

`
Then later when touching on the start screen:

Social.localUser.Authenticate((bool success) => { print(Social.localUser.userName); cb(success); });

Service works fine on other games on my phone, already restarted, reinstalled, cleared cache etc. Is there anything I can see why it crashes in a log? Thanks for any help!!

EDIT: Logcat:

04-24 20:08:08.799 4944 21563 W AppOps : Bad call: specified package com.google.android.play.games under uid 10229 but it is really 10172 04-24 20:08:08.799 4944 21563 W AppOps : java.lang.RuntimeException: here 04-24 20:08:08.799 4944 21563 W AppOps : at com.android.server.AppOpsService.getOpsRawLocked(AppOpsService.java:1356) 04-24 20:08:08.799 4944 21563 W AppOps : at com.android.server.AppOpsService.checkPackage(AppOpsService.java:1035) 04-24 20:08:08.799 4944 21563 W AppOps : at com.android.internal.app.IAppOpsService$Stub.onTransact(IAppOpsService.java:169) 04-24 20:08:08.799 4944 21563 W AppOps : at android.os.Binder.execTransact(Binder.java:573)

claywilkinson commented 7 years ago

The bad call line is annoying, but harmless. Can you share the full log?

bbb0x commented 7 years ago

Logcat log of my app when trying to login:

04-29 15:16:17.677 6993 6993 D ViewRootImpl@af4875[UnityPlayerActivity]: ViewPostImeInputStage processPointer 0 04-29 15:16:17.678 6993 6993 W System : ClassLoader referenced unknown path: /system/framework/QPerformance.jar 04-29 15:16:17.679 6993 6993 E BoostFramework: BoostFramework() : Exception_1 = java.lang.ClassNotFoundException: Didn't find class "com.qualcomm.qti.Performance" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib, /vendor/lib]] 04-29 15:16:17.679 6993 6993 V BoostFramework: BoostFramework() : mPerf = null 04-29 15:16:17.777 6993 6993 D ViewRootImpl@af4875[UnityPlayerActivity]: ViewPostImeInputStage processPointer 1 04-29 15:16:17.821 6993 7008 D GamesUnitySDK: Performing Android initialization of the GPG SDK 04-29 15:16:17.896 6993 7008 I Unity : Building GPG services, implicitly attempts silent auth 04-29 15:16:17.896 6993 7008 I Unity : 04-29 15:16:17.896 6993 7008 I Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) 04-29 15:16:17.896 6993 7008 I Unity : 04-29 15:16:17.898 6993 7008 I GamesNativeSDK: Using existing jar. 04-29 15:16:17.898 6993 7008 I GamesNativeSDK: Writing 1941 bytes to jar file 04-29 15:16:17.905 6993 7008 I GamesNativeSDK: Using existing jar. 04-29 15:16:17.905 6993 7008 I GamesNativeSDK: Writing 1066 bytes to jar file 04-29 15:16:17.916 6993 7008 W PopupManager: You have not specified a View to use as content view for popups. Falling back to the Activity content view. Note that this may not work as expected in multi-screen environments 04-29 15:16:17.917 6993 7092 I GamesNativeSDK: Auth operation started: SIGN IN 04-29 15:16:17.917 6993 7092 I GamesNativeSDK: Connecting to Google Play... 04-29 15:16:17.931 6993 7008 I Unity : Using AuthHelper to sign in 04-29 15:16:17.931 6993 7008 I Unity : 04-29 15:16:17.931 6993 7008 I Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) 04-29 15:16:17.931 6993 7008 I Unity : 04-29 15:16:17.941 6993 7008 W Unity : !!! [Play Games Plugin DLL] 04/29/17 15:16:17 +02:00 WARNING: Creating new PlayGamesPlatform 04-29 15:16:17.941 6993 7008 W Unity : 04-29 15:16:17.941 6993 7008 W Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) 04-29 15:16:17.941 6993 7008 W Unity : 04-29 15:16:17.942 6993 7008 I Unity : [Play Games Plugin DLL] 04/29/17 15:16:17 +02:00 DEBUG: Activating PlayGamesPlatform. 04-29 15:16:17.942 6993 7008 I Unity : 04-29 15:16:17.942 6993 7008 I Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) 04-29 15:16:17.942 6993 7008 I Unity : 04-29 15:16:17.942 6993 7008 I Unity : [Play Games Plugin DLL] 04/29/17 15:16:17 +02:00 DEBUG: PlayGamesPlatform activated: GooglePlayGames.PlayGamesPlatform 04-29 15:16:17.942 6993 7008 I Unity : 04-29 15:16:17.942 6993 7008 I Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) 04-29 15:16:17.942 6993 7008 I Unity : 04-29 15:16:17.942 6993 7008 I Unity : [Play Games Plugin DLL] 04/29/17 15:16:17 +02:00 DEBUG: Creating platform-specific Play Games client. 04-29 15:16:17.942 6993 7008 I Unity : 04-29 15:16:17.942 6993 7008 I Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) 04-29 15:16:17.942 6993 7008 I Unity : 04-29 15:16:17.942 6993 7008 I Unity : [Play Games Plugin DLL] 04/29/17 15:16:17 +02:00 DEBUG: Creating Android IPlayGamesClient Client 04-29 15:16:17.942 6993 7008 I Unity : 04-29 15:16:17.942 6993 7008 I Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) 04-29 15:16:17.942 6993 7008 I Unity : 04-29 15:16:17.950 6993 7008 D TokenFragment: Creating fragment 04-29 15:16:17.951 6993 6993 D TokenFragment: onStart() 04-29 15:16:17.951 6993 6993 D TokenFragment: onResume called 04-29 15:16:17.956 6993 6993 W PopupManager: You have not specified a View to use as content view for popups. Falling back to the Activity content view. Note that this may not work as expected in multi-screen environments 04-29 15:16:17.957 6993 7008 I Unity : ---- [0] -- 1048605 04-29 15:16:17.957 6993 7008 I Unity : 04-29 15:16:17.957 6993 7008 I Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) 04-29 15:16:17.957 6993 7008 I Unity : 04-29 15:16:17.958 6993 7008 E TokenFragment: Already a pending token request! 04-29 15:16:17.958 6993 7008 D TokenFragment: Fragment exists.. calling processRequests 04-29 15:16:18.001 6993 7008 D TokenFragment: Done with processRequest! 04-29 15:16:18.002 6993 7008 I Unity : ---- [0] -- 2097209 04-29 15:16:18.002 6993 7008 I Unity : 04-29 15:16:18.002 6993 7008 I Unity : (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) 04-29 15:16:18.002 6993 7008 I Unity : 04-29 15:16:18.012 6993 6993 D TokenFragment: Done with processRequest! 04-29 15:16:18.017 6993 6993 D ViewRootImpl@af4875[UnityPlayerActivity]: MSG_WINDOW_FOCUS_CHANGED 0 04-29 15:16:18.067 6993 7097 I System.out: (HTTPLog)-Static: isSBSettingEnabled false 04-29 15:16:18.067 6993 7097 I System.out: (HTTPLog)-Static: isSBSettingEnabled false 04-29 15:16:18.096 6993 7008 I sensor : ASensorEventQueue_disableSensor: handle=0, name=K6DS3TR Acceleration Sensor, ret=0 04-29 15:16:18.206 6993 6993 D InputTransport: Input channel constructed: fd=86 04-29 15:16:18.206 6993 6993 D ViewRootImpl@5e82bd0[SignInHubActivity]: setView = DecorView@41437c9[SignInHubActivity] touchMode=true 04-29 15:16:18.259 6993 6993 D InputTransport: Input channel constructed: fd=89 04-29 15:16:18.259 6993 6993 D ViewRootImpl@f6c34fc[SignInHubActivity]: setView = DecorView@1f8785[SignInHubActivity] touchMode=true 04-29 15:16:18.301 6993 6993 D ViewRootImpl@af4875[UnityPlayerActivity]: MSG_RESIZED: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 72 - 0, 0) or=2 04-29 15:16:18.301 6993 6993 D ViewRootImpl@af4875[UnityPlayerActivity]: MSG_RESIZED: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=2 04-29 15:16:18.303 6993 6993 D ViewRootImpl@af4875[UnityPlayerActivity]: MSG_RESIZED: ci=Rect(0, 0 - 0, 0) vi=Rect(0, 72 - 0, 0) or=2 04-29 15:16:18.304 6993 6993 D ViewRootImpl@5e82bd0[SignInHubActivity]: MSG_RESIZED_REPORT: ci=Rect(0, 72 - 0, 0) vi=Rect(0, 72 - 0, 0) or=2 04-29 15:16:18.325 6993 6993 D ViewRootImpl@f6c34fc[SignInHubActivity]: MSG_RESIZED_REPORT: ci=Rect(0, 72 - 0, 0) vi=Rect(0, 72 - 0, 0) or=2 04-29 15:16:18.330 6993 6993 V GamesNativeSDK: Play Games callback indicates connection. 04-29 15:16:18.337 6993 7092 I GamesNativeSDK: Successfully connected to Google Play. 04-29 15:16:18.531 6993 7122 W GamesNativeSDK: Could not automatically seed event cache. 04-29 15:16:18.560 6993 6993 D InputTransport: Input channel destroyed: fd=60 04-29 15:16:23.377 6993 7092 V GamesNativeSDK: Detaching from JVM on thread main_dispatch

Log of Google play services:

04-29 15:27:44.577 9968 12550 W GamesServiceBroker: Client connected with SDK 10298000, Services 10298440, and Games 39080040 04-29 15:27:44.578 9968 11560 W GamesServiceBroker: Client connected with SDK 10298000, Services 10298440, and Games 39080040 04-29 15:27:44.593 9968 9979 W GamesServiceBroker: Client connected with SDK 10298000, Services 10298440, and Games 39080040 04-29 15:27:44.609 9968 11437 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298440, and Games 39080040 04-29 15:27:44.749 9968 11437 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298440, and Games 39080040 04-29 15:27:44.753 9968 11436 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298440, and Games 39080040 04-29 15:27:44.771 9968 11437 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298440, and Games 39080040 04-29 15:27:44.789 9968 10215 I System.out: (HTTPLog)-Static: isSBSettingEnabled false 04-29 15:27:44.789 9968 10215 I System.out: (HTTPLog)-Static: isSBSettingEnabled false 04-29 15:27:44.830 9968 10214 I System.out: (HTTPLog)-Static: isSBSettingEnabled false 04-29 15:27:44.830 9968 10214 I System.out: (HTTPLog)-Static: isSBSettingEnabled false 04-29 15:27:44.832 9968 10216 I System.out: (HTTPLog)-Static: isSBSettingEnabled false 04-29 15:27:44.832 9968 10216 I System.out: (HTTPLog)-Static: isSBSettingEnabled false 04-29 15:27:44.896 9968 10215 E Volley : [535] BasicNetwork.performRequest: Unexpected response code 404 for https://www.googleapis.com/games/v1/applications/played 04-29 15:27:44.897 9968 10157 W GameAgent: Volley error when reporting played 04-29 15:27:44.897 9968 10157 W GameAgent: com.android.volley.ClientError 04-29 15:27:44.897 9968 10157 W GameAgent: at com.android.volley.toolbox.BasicNetwork.performRequest(:com.google.android.gms:164) 04-29 15:27:44.897 9968 10157 W GameAgent: at lgf.performRequest(:com.google.android.gms:63) 04-29 15:27:44.897 9968 10157 W GameAgent: at com.android.volley.NetworkDispatcher.run(:com.google.android.gms:112) 04-29 15:27:44.943 9968 10214 E Volley : [534] BasicNetwork.performRequest: Unexpected response code 404 for https://www.googleapis.com/games/v1/achievements?language=en_US 04-29 15:27:44.944 9968 10161 W AchievementAgent: {"errors":[{"domain":"global","reason":"notFound","message":"The requested application with ID 233110153495 was not found."}],"code":404} 04-29 15:27:44.948 9968 10216 E Volley : [536] BasicNetwork.performRequest: Unexpected response code 404 for https://www.googleapis.com/games/v1/events?language=en_US 04-29 15:27:44.949 9968 10162 W EventAgent: {"errors":[{"domain":"global","reason":"notFound","message":"The requested application with ID 233110153495 was not found."}],"code":404} 04-29 15:27:44.966 9968 11437 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298440, and Games 39080040 04-29 15:27:44.967 9968 29100 W Auth : [GoogleAuthUtil] GoogleAuthUtil 04-29 15:27:44.983 9968 11437 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298440, and Games 39080040 04-29 15:27:44.984 9968 10217 I System.out: (HTTPLog)-Static: isSBSettingEnabled false 04-29 15:27:44.985 9968 10217 I System.out: (HTTPLog)-Static: isSBSettingEnabled false 04-29 15:27:44.988 9968 11436 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298440, and Games 39080040 04-29 15:27:45.106 9968 12574 W GamesServiceBroker: Client connected with SDK 10298000, Services 10298440, and Games 39080040 04-29 15:27:45.240 9968 10217 E Volley : [537] BasicNetwork.performRequest: Unexpected response code 404 for https://www.googleapis.com/games/v1/players/g15744591527920316269/achievements?language=en_US&state=ALL 04-29 15:27:45.242 9968 10161 W AchievementAgent: {"errors":[{"domain":"global","reason":"notFound","message":"The requested application with ID 233110153495 was not found."}],"code":404} 04-29 15:27:45.257 9968 29100 W Auth : [GoogleAuthUtil] GoogleAuthUtil 04-29 15:27:45.257 9968 11436 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298440, and Games 39080040 04-29 15:27:45.268 9968 11436 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298440, and Games 39080040 04-29 15:27:45.296 9968 11436 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298440, and Games 39080040 04-29 15:27:45.300 9968 10215 I System.out: (HTTPLog)-Static: isSBSettingEnabled false 04-29 15:27:45.300 9968 10215 I System.out: (HTTPLog)-Static: isSBSettingEnabled false 04-29 15:27:45.392 9968 10215 E Volley : [535] BasicNetwork.performRequest: Unexpected response code 404 for https://www.googleapis.com/games/v1/achievements?language=en_US 04-29 15:27:45.393 9968 10161 W AchievementAgent: {"errors":[{"domain":"global","reason":"notFound","message":"The requested application with ID 233110153495 was not found."}],"code":404} 04-29 15:27:45.422 9968 10214 I System.out: (HTTPLog)-Static: isSBSettingEnabled false 04-29 15:27:45.422 9968 10214 I System.out: (HTTPLog)-Static: isSBSettingEnabled false 04-29 15:27:45.458 9968 29100 E TokenRequestor: You have wrong OAuth2 related configurations, please check. Detailed error: INVALID_AUDIENCE 04-29 15:27:45.568 9968 10214 E Volley : [534] BasicNetwork.performRequest: Unexpected response code 404 for https://www.googleapis.com/games/v1/players/g15744591527920316269/achievements?language=en_US&state=ALL 04-29 15:27:45.570 9968 10161 W AchievementAgent: {"errors":[{"domain":"global","reason":"notFound","message":"The requested application with ID 233110153495 was not found."}],"code":404} 04-29 15:27:45.580 9968 11437 W GamesServiceBroker: Client connected with SDK 8487000, Services 10298440, and Games 39080040 04-29 15:27:50.574 9968 10185 W PlatformStatsUtil: Could not retrieve Usage & Diagnostics setting. Giving up.

Last line happens exactly when "Google Play services stops working" appears. Before it hangs for about 5 secs.

pradeepkulasekaran commented 7 years ago

Refer #1723

claywilkinson commented 7 years ago

This line 04-29 15:27:44.949 9968 10162 W EventAgent: {"errors":[{"domain":"global","reason":"notFound","message":"The requested application with ID 233110153495 was not found."}],"code":404} indicates a configuration error. Check the app id and package id and the SHA1 fingerprint of your application.