playgameservices / play-games-plugin-for-unity

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

java.lang.IllegalStateException attempting simplest auth. 0.9.50 and Unity 2018.02b5 #2217

Open bcristian opened 6 years ago

bcristian commented 6 years ago

Starting with a clean empty project, clean Android Studio and SDK installation, and the minimal sample. Crashes as can be seen below. No other related information appears in logcat.

Tried both on real devices and emulators (Andy, Bluestacks), and using Unity or Android Studio to build. The crash is exactly the same in all cases.

`06-05 12:19:32.824 24152-24167/com.asd.qwe I/Unity: Building GPG services, implicitly attempts silent auth

0 0x9ea5ecd0 (libunity.so) GetStacktrace(int) 0x44

 #1 0x9e449308 (libunity.so) DebugStringToFile(DebugStringToFileData const&) 0x230
 #2 0x9d95c698 (libunity.so) DebugLogHandler::Internal_Log(LogType, core::basic_string<char, core::StringStorageDefault<char> >, Object*) 0xa8
 #3 0x9d95c588 (libunity.so) DebugLogHandler_CUSTOM_Internal_Log(LogType, MonoString*, MonoObject*) 0xb4

(Filename: ./Runtime/Export/Debug.bindings.h Line: 43)

06-05 12:19:32.830 24152-24167/com.asd.qwe I/GamesNativeSDK: Writing 1941 bytes to jar file 06-05 12:19:32.956 24152-24167/com.asd.qwe I/GamesNativeSDK: Writing 1066 bytes to jar file 06-05 12:19:33.075 24152-24167/com.asd.qwe 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 06-05 12:19:33.077 24152-24369/com.asd.qwe I/GamesNativeSDK: Auth operation started: SIGN IN 06-05 12:19:33.078 24152-24369/com.asd.qwe I/GamesNativeSDK: Connecting to Google Play... 06-05 12:19:33.116 24152-24152/com.asd.qwe D/AndroidRuntime: Shutting down VM

--------- beginning of crash

06-05 12:19:33.118 24152-24152/com.asd.qwe E/AndroidRuntime: FATAL EXCEPTION: main Process: com.asd.qwe, PID: 24152 java.lang.Error: FATAL EXCEPTION [main] Unity version : 2018.2.0b5 Device model : OUKITEL K6000 Pro Device fingerprint: OUKITEL/full_hct6753_35gu_m0/hct6753_35gu_m0:6.0/MRA58K/1480499932:user/release-keys

Caused by: java.lang.IllegalStateException: A fatal developer error has occurred. Check the logs for further information.
    at com.google.android.gms.common.internal.zze.zzv(Unknown Source)
    at com.google.android.gms.common.internal.zzi.zzakg(Unknown Source)
    at com.google.android.gms.common.internal.zzh.handleMessage(Unknown Source)
    at android.os.Handler.dispatchMessage(Handler.java:111)
    at android.os.Looper.loop(Looper.java:207)
    at android.app.ActivityThread.main(ActivityThread.java:5730)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)

06-05 12:19:33.302 24152-24167/com.asd.qwe W/Unity: !!! [Play Games Plugin DLL] 06/05/18 12:19:33 +03:00 WARNING: Creating new PlayGamesPlatform

0 0x9ea5ecd0 (libunity.so) GetStacktrace(int) 0x44

 #1 0x9e449308 (libunity.so) DebugStringToFile(DebugStringToFileData const&) 0x230
 #2 0x9d95c698 (libunity.so) DebugLogHandler::Internal_Log(LogType, core::basic_string<char, core::StringStorageDefault<char> >, Object*) 0xa8
 #3 0x9d95c588 (libunity.so) DebugLogHandler_CUSTOM_Internal_Log(LogType, MonoString*, MonoObject*) 0xb4

(Filename: ./Runtime/Export/Debug.bindings.h Line: 43)

`

Neecko commented 6 years ago

I am having this same issue. Been trying to solve it for a few days.

RARgames commented 6 years ago

any update? have the same issue

Neecko commented 6 years ago

Solution for me using Unity 2018+ and 9.50 https://github.com/playgameservices/play-games-plugin-for-unity/issues/2013

hippogamesunity commented 6 years ago

The same crash, Unity 2018.2.6, latest GPGS, Android 8

hippogamesunity commented 6 years ago

Can confirm this works:

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

Hungryum commented 6 years ago

hippogamesunity, I want to bake you a cake. That fix worked perfectly! I've been trying to diagnose the issue for so long now, cant believe the issue was on the google play services side.

ajayaradhya commented 6 years ago

Facing same issue on Unity 2018.2.4.f1 and PlayService 0.9.50. Any solutions?

ajayaradhya commented 6 years ago

hippogamesunity,

You are a legend! :) Saved my day :P That fix worked like a charm :O

dreamwagon commented 6 years ago

hippogamesunity

So I had the exact same issue and this solution worked, but why do we need to add that escape character? How in the world did you figure that out? Just curious why we need to take this step for the plugin to work with Unity 2018.2.4.f1 and PlayService 0.9.50?

Edit: When I change that file the error does not happen when I deploy directly to the phone, but when I deploy from the play store the same error occurs. I don't know if this is really a solution.

abramovks commented 6 years ago

hippogamesunity

Very grateful. I could not solve it for 3 days. I do not understand how you found the solution. I will try to spread your solution to as many of the sites I have been looking for.

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.

2nsobi commented 6 years ago

@hippogamesunity Wow you're crazy man, in a good way. Why does this work? I'm crying and laughing.

rlee1990 commented 5 years ago

This is not working for me the app crashes

hippogamesunity commented 5 years ago

@nnobinelo I'm not crazy, I've just found the workaround in some of these threads. And I don't know how this works but it works =)

rlee1990 commented 5 years ago

@hippogamesunity can you provide an example because what i thought it was did not work. It crashed the game