Play-games-plugin-for-unity: application crash on Android during Authenticate

Created on 10 Apr 2017  路  17Comments  路  Source: playgameservices/play-games-plugin-for-unity

I just update to v0.9.37.

Now my game crashes whenever I call Social.localUser.Authenticate().

The last thing logcat shows is " Building GPG services, implicitly attempts silent auth"

I'm supposed to be releasing this week. Please help!

All 17 comments

I have some additional info that may be helpful. The full log (not filtering for Unity) shows this:

I/Unity (18820): Autehenticate

I/Unity (18820):

I/Unity (18820): (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

I/Unity (18820):

D/dalvikvm(18820): Trying to load lib /data/app-lib/com.NeoShamanGames.Brilliance-1/libgpg.so 0x42c15e48

D/dalvikvm(18820): Added shared lib /data/app-lib/com.NeoShamanGames.Brilliance-1/libgpg.so 0x42c15e48

D/GamesUnitySDK(18820): Performing Android initialization of the GPG SDK

V/AudioPolicyManagerALSA( 328): AudioPolicyManager::getDeviceForStrategy()..strategy 0, fromCache 1

I/Unity (18820): Building GPG services, implicitly attempts silent auth

I/Unity (18820):

I/Unity (18820): (Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

I/Unity (18820):

I/GamesNativeSDK(18820): Using existing jar.

I/GamesNativeSDK(18820): Writing 1941 bytes to jar file

I/GamesNativeSDK(18820): Using existing jar.

I/GamesNativeSDK(18820): Writing 1066 bytes to jar file

W/dalvikvm(18820): Superclass of 'Lcom/google/android/gms/games/nearby/NativeConnectionRequestListener;' is interface 'Lcom/google/android/gms/nearby/connection/Connections$ConnectionRequestListener;'

W/dalvikvm(18820): Link of class 'Lcom/google/android/gms/games/nearby/NativeConnectionRequestListener;' failed

E/GamesNativeSDK(18820): Exception in dalvik/system/DexClassLoader.loadClass: java.lang.IncompatibleClassChangeError: superclass is an interface.

E/dalvikvm(18820): ERROR: couldn't find native method

F/libc (18820): Fatal signal 11 (SIGSEGV) at 0x00000018 (code=1), thread 18852 (main)

are you already follow the instructions to integrate to Google Play Service ? you have to Optimze anything needed to Intgerate of to google play service , like Change App Package in Android Manifest, and get resources from Google Developer Console, and also remove .aar item 10.0.2 to 10.0.1 version in below AppCompat file if you build it to android.. i hope that will solve you problem

I ran the setup from Window->Google Play Games->Setup->Android Setup with the Resources pasted in.

Can you provide more specific instructions for what to do with the appcompat file? I don't know how to view or edit this file.

I'm also not clear on what you are suggesting I do to the Android Manifest.

I have the same issue, the plugin doesn't work on Unity 5.6.0f3. I've tried with different play services versions. All crash after trying to authenticate.

Same for me (Unity 5.6.0 f3)

below the app compat file, there ara some .aar version 10.0.2 you have to change the version to 10.0.1, not the appcompat file, but you have to overwrite the files that have the same folder with the appcompat files.

I has same isses. If I remove
PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder() .EnableSavedGames() .RequestEmail() .RequestServerAuthCode(false) .RequestIdToken() .Build(); PlayGamesPlatform.InitializeInstance(config);
then no problem and I can get user name
Unity 5.6.0f3 - GPS 10.2.1 - Package version 0.9.37

my game crashes whenever I call Social.localUser.Authenticate().
Unity 5.5.0 f3

I reverted back to GooglePlayGamesPlugin-0.9.36 build. No crashing, but login fails.

Oh my god. I somehow was able to get this fixed. What I did:

  1. Backup
  2. Delete all plugins and clear the plugins folder
  3. Reinstall all plugins with the most up to date versions
  4. Don't forget to setup your plugins again, including GPGS

Currently running 0.9.37 with no issue thus far, and had the same error posted above. Good luck people :)

it didn't solve for me, you have to change the .aar files below the appcompat file on android manifest.xml via the folder plugin and you have to overwrite the 10.0.2 version to 10.0.1 version, that will solve the issues

I've faced the same issue with a 5.6.0f3 and with a plugin Version 0.9.37.
Android application is crashing each time after the Social.localUser.Authenticate call.

There is a screenshot with logs https://pp.userapi.com/c836529/v836529028/3a5a2/g2BNb6CGmKU.jpg

There is my code
`

         PlayGamesPlatform.Activate();

        // authenticate user:

        Social.localUser.Authenticate((bool success) =>
        {
                //
        });`

Fixed by doing these steps:
1) disable Bckground resoulution in the Android resolver settings
2) replace all 10.0.1 AARs with 10.2.1 from the AndroidSDK\extras\google\m2repository\com\google\android\gms\

aar version 10.2.1 solve the problem in Unity 5.6 ?

because currently i used the 5.5 Unity Version

@mostdeep123 yes, for me it has solved the problem in unity 5.6. But you can try it in the Unity 5.5. I think the problem in AARs files, so it does not matter which version of Unity you use

I would also say, remove all files and install again fresh. Its easier for me to find which files to remove by just double clicking the latest .unitypackage file: the import window should show all the files that will be imported/updated so you can find and remove them. As @chechulinYuri pointed out, you should disable the Background resolution before this.

Another important thing that I can remember is to make sure that you have your Android SDK also up-to-date.
To verify this, you can go to your Android SDK folder, then "tools" and then execute the "android" file, which will start the Android SDK Manager (if you have Android Studio installed you can also use the SDK Manager there).

update-android-sdk

sdk-manager

This helped me.

https://github.com/playgameservices/play-games-plugin-for-unity/issues/2217#issuecomment-417619382

Can confirm this works:
open template-AndroidManifest.txt
"\ APP_ID" to "\u003__APP_ID__"
setup GPGS from Unity (press Window/Google Play Services/Setup)

True, after the correction, I received the error "Authentification failed". But it was a problem with SHA-1. It was decided when I did
keytool -exportcert -keystore user.keystore -list -v
And put the correct SHA-1 in https://console.developers.google.com/apis/credentials in the application settings.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lolmourne picture lolmourne  路  3Comments

easycg picture easycg  路  3Comments

RafikTSG picture RafikTSG  路  3Comments

parkJeongOck picture parkJeongOck  路  4Comments

YogendraChauhan picture YogendraChauhan  路  4Comments