HaxeExtension / extension-googleplaygames

OpenFL extension for Google Play Games / Android
Other
53 stars 17 forks source link

We have got problems with loging in to gpg #18

Closed Netforza closed 8 years ago

Netforza commented 8 years ago

It's first time I am using the googleplaygames extension so there is a possibility that I didn't configure something correctly. When I try to login to gpg from my haxeflixel game I get "Unknown issue with google play services" error.
The same happens when I try to show a leaderboard or achievements.

I have checked that the correct game ID is included in the project.xml file and that correct sha1 is used when linking the app in developer console. I have even published the leaderboards to check from different devices and the problem is the same on all devices.

I have no idea how to troubleshoot it further. Any help is appreciated.

dismedia commented 8 years ago

Hi, check if package name defined in googlePlay developer console is the same as your package name. (bin/android/src/... MainActivity.java)

if it's correct - you can provide log from logcat monitor

Netforza commented 8 years ago

I have checked the package name defined in googlePlay developer console and it is the same as in MainActivity.java - "com.netforza.GenialSantaClaus2"

I have also checked again the SHA1 signature in the published APK in keystore and in developer console and they all match.

Here is the logcat I got:

shell@thl:/ $ logcat | grep Game D/GameHelper( 8167): GameHelper: Debug log enabled. D/GameHelper( 8167): GameHelper: Setup: requested clients: 5 D/GameHelper( 8167): GameHelper: onStart D/GameHelper( 8167): GameHelper: Connecting client. I/EXTENSION-GOOGLEPLAYGAMES( 8167): PlayGames: onSignInStart I/EXTENSION-GOOGLEPLAYGAMES( 8167): PlayGames: INIT COMPLETE D/PlayGamesService(22529): Binding to games service: Intent { act=com.google.android.gms.games.service.START pkg=com.google.android.gms } D/PlayGamesService(22529): Adding intent: Intent { act=com.google.android.gms.games.service.START pkg=com.google.android.gms } W/GamesServiceBroker(22529): Client connected with SDK 8298000, Services 8489038, and Games 35170038 D/dalvikvm(22529): threadid=67 (PlayGamesAsyncThread177): calling run() D/PlayGamesService(22529): Binding to games service: Intent { act=com.google.android.play.games.service.START_1P pkg=com.google.android.gms } D/PlayGamesService(22529): Adding intent: Intent { act=com.google.android.play.games.service.START_1P pkg=com.google.android.gms } D/Games1pServiceBroker(22529): client connected with version: 8283000 D/GameHelper( 8167): GameHelper: onConnectionFailed D/GameHelper( 8167): GameHelper: Connection failure: D/GameHelper( 8167): GameHelper: - code: INTERNAL_ERROR(8) D/GameHelper( 8167): GameHelper: - resolvable: false D/GameHelper( 8167): GameHelper: - details: ConnectionResult{statusCode=INTERNAL_ERROR, resolution=null, message=null} D/GameHelper( 8167): GameHelper: onConnectionFailed: Will NOT resolve; not user-initiated and max attempts reached: 0 >= 0 D/GameHelper( 8167): GameHelper: onConnectionFailed: since we won't resolve, failing now. D/GameHelper( 8167): GameHelper: Notifying LISTENER of sign-in FAILURE (no error) I/EXTENSION-GOOGLEPLAYGAMES( 8167): PlayGames: onSignInFailed D/PlayGamesService(22529): Unbinding from games service: Intent { act=com.google.android.play.games.service.START_1P pkg=com.google.android.gms } D/PlayGamesService(22529): Removing intent: Intent { act=com.google.android.play.games.service.START_1P pkg=com.google.android.gms } D/PlayGamesService(22529): Unbinding from games service: Intent { act=com.google.android.gms.games.service.START pkg=com.google.android.gms } D/PlayGamesService(22529): Removing intent: Intent { act=com.google.android.gms.games.service.START pkg=com.google.android.gms } D/PlayGamesService(22529): Unbound from all clients. Cleaning up. I/EXTENSION-GOOGLEPLAYGAMES( 8167): PlayGames: displayScoreboard Exception I/EXTENSION-GOOGLEPLAYGAMES( 8167): PlayGames: Forcing Login D/GameHelper( 8167): GameHelper: Debug log enabled. D/GameHelper( 8167): GameHelper: Setup: requested clients: 5 D/GameHelper( 8167): GameHelper: onStart D/GameHelper( 8167): GameHelper: Connecting client. I/EXTENSION-GOOGLEPLAYGAMES( 8167): PlayGames: onSignInStart I/EXTENSION-GOOGLEPLAYGAMES( 8167): PlayGames: INIT COMPLETE D/PlayGamesService(22529): Binding to games service: Intent { act=com.google.android.gms.games.service.START pkg=com.google.android.gms } D/PlayGamesService(22529): Adding intent: Intent { act=com.google.android.gms.games.service.START pkg=com.google.android.gms } W/GamesServiceBroker(22529): Client connected with SDK 8298000, Services 8489038, and Games 35170038 D/dalvikvm(22529): threadid=67 (PlayGamesAsyncThread178): calling run() D/PlayGamesService(22529): Binding to games service: Intent { act=com.google.android.play.games.service.START_1P pkg=com.google.android.gms } D/PlayGamesService(22529): Adding intent: Intent { act=com.google.android.play.games.service.START_1P pkg=com.google.android.gms } D/Games1pServiceBroker(22529): client connected with version: 8283000 D/GameHelper( 8167): GameHelper: onConnectionFailed D/GameHelper( 8167): GameHelper: Connection failure: D/GameHelper( 8167): GameHelper: - code: INTERNAL_ERROR(8) D/GameHelper( 8167): GameHelper: - resolvable: false D/GameHelper( 8167): GameHelper: - details: ConnectionResult{statusCode=INTERNAL_ERROR, resolution=null, message=null} D/GameHelper( 8167): GameHelper: onConnectionFailed: WILL resolve because we have below the max# of attempts, 0 < 1 D/GameHelper( 8167): GameHelper: onConnectionFailed: resolving problem... D/GameHelper( 8167): GameHelper: resolveConnectionResult: trying to resolve result: ConnectionResult{statusCode=INTERNAL_ERROR, resolution=null, message=null} D/GameHelper( 8167): GameHelper: resolveConnectionResult: result has no resolution. Giving up. W/GameHelper( 8167): disconnect() called when client was already disconnected. D/GameHelper( 8167): GameHelper: Notifying LISTENER of sign-in FAILURE (error) I/EXTENSION-GOOGLEPLAYGAMES( 8167): PlayGames: onSignInFailed D/PlayGamesService(22529): Unbinding from games service: Intent { act=com.google.android.play.games.service.START_1P pkg=com.google.android.gms } D/PlayGamesService(22529): Removing intent: Intent { act=com.google.android.play.games.service.START_1P pkg=com.google.android.gms } D/PlayGamesService(22529): Unbinding from games service: Intent { act=com.google.android.gms.games.service.START pkg=com.google.android.gms } D/PlayGamesService(22529): Removing intent: Intent { act=com.google.android.gms.games.service.START pkg=com.google.android.gms } D/PlayGamesService(22529): Unbound from all clients. Cleaning up.

Netforza commented 8 years ago

I solved the problem. It was because I copied GooglePlayGames.init(true); from the examples where true means that I use Save games functionality. But it was not enabled in the config. The logcat gave an error that Drive api is not enabled. When I enabled it everything started to work.

On another game where I was testing I simply changed the true to false in the init function and the game services started to work. I think this needs to be added to the readme. This issue can be closed.

fbricker commented 8 years ago

Hi, documentation has been updated :+1: Thanks for your feedback.