Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

application crash on Android during Authenticate #1684

Open
neoshamangames opened this issue Apr 10, 2017 · 17 comments
Open

application crash on Android during Authenticate #1684

neoshamangames opened this issue Apr 10, 2017 · 17 comments

Comments

@neoshamangames
Copy link

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!

@neoshamangames
Copy link
Author

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)

@mostdeep123
Copy link

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

@neoshamangames
Copy link
Author

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.

@starloop-alexander
Copy link

starloop-alexander commented Apr 12, 2017

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.

@alexr1221
Copy link

Same for me (Unity 5.6.0 f3)

@mostdeep123
Copy link

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.

@chungh17
Copy link

chungh17 commented Apr 17, 2017

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

@VusalJalilov
Copy link

VusalJalilov commented Apr 19, 2017

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.

@1samuel411
Copy link

1samuel411 commented Apr 20, 2017

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 :)

@mostdeep123
Copy link

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

@chechulinYuri
Copy link

chechulinYuri commented Apr 24, 2017

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) =>
        {
                //
        });`

@chechulinYuri
Copy link

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\

@mostdeep123
Copy link

aar version 10.2.1 solve the problem in Unity 5.6 ?

@mostdeep123
Copy link

because currently i used the 5.5 Unity Version

@chechulinYuri
Copy link

@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

@fliperamma
Copy link

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

@abramovks
Copy link

This helped me.

#2217 (comment)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants