When I open and close the leaderboard a few times I get the message "Unfortunately, Google Play services has stopped".
After that it's impossible open leaderboard again.
To show the leaderboard I'm doing:
if ( Social.Active.localUser.authenticated ) {
Social.ShowLeaderboardUI();
}
The error:
12-28 00:13:47.298: I/Unity(5984): [Play Games Plugin DLL] 12/28/14 0:13:47 +00:00 DEBUG: ShowLeaderboardUI
12-28 00:13:47.298: I/Unity(5984): UnityEngine.Debug:Internal_Log(Int32, String, Object)
12-28 00:13:47.298: I/Unity(5984): UnityEngine.Debug:Log(Object)
12-28 00:13:47.298: I/Unity(5984): GooglePlayGames.OurUtils.Logger:d(String) (at /Users/jaap/Development/DuckHuntEscape/Assets/GooglePlayGames/OurUtils/Logger.cs:46)
12-28 00:13:47.298: I/Unity(5984): GooglePlayGames.PlayGamesPlatform:ShowLeaderboardUI() (at /Users/jaap/Development/DuckHuntEscape/Assets/GooglePlayGames/ISocialPlatform/PlayGamesPlatform.cs:504)
12-28 00:13:47.298: I/Unity(5984): UnityEngine.Social:ShowLeaderboardUI()
12-28 00:13:47.298: I/Unity(5984): GameManager:ShowLeaderboardUI() (at /Users/jaap/Development/DuckHuntEscape/Assets/GameLogic/GameManager.cs:156)
12-28 00:13:47.298: I/Unity(5984): RankingButton:OnButtonClick() (at /Users/jaap/Development/DuckHuntEscape/Assets/Scripts/Gui/RankingButton.cs:10)
12-28 00:13:47.298: I/Unity(5984): Button:OnMouseUp() (at /Users/jaap/Development/DuckHuntEscape/Assets/Scripts/Button.cs:12)
12-28 00:13:47.298: I/Unity(5984): UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
12-28 00:13:47.298: I/Unity(5984): UnityEngine.HitInfo:SendMessage(String)
12-28 00:13:47.298: I/Unity(5984): UnityEngine.SendMouseEvents:SendEvents(Int32, HitInfo)
12-28 00:13:47.298: I/Unity(5984): UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32
12-28 00:13:47.558: V/GamesNativeSDK(5984): Play Games callback indicates connection.
12-28 00:13:47.569: I/GamesNativeSDK(5984): Successfully connected to Google Play.
12-28 00:13:47.571: E/GamesNativeSDK(5984): Trying to show UI while waiting for a result from an existing UI. Please ensure that OnActivityResult is forwarded to the Games C++ SDK from your Java activity. See android_support.h for more details.
12-28 00:13:47.572: I/Unity(5984): [Play Games Plugin DLL] 12/28/14 0:13:47 +00:00 DEBUG: Showing UI Internal callback: ERROR_UI_BUSY
12-28 00:13:47.572: I/Unity(5984):
12-28 00:13:47.572: I/Unity(5984): (Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 49)
12-28 00:13:47.575: I/Unity(5984): [Play Games Plugin DLL] 12/28/14 0:13:47 +00:00 DEBUG: Received UI callback: ERROR_UI_BUSY
12-28 00:13:47.575: I/Unity(5984):
12-28 00:13:47.575: I/Unity(5984): (Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 49)
12-28 00:13:52.571: W/art(5984): Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[17,tid=8859,Native,Thread*=0xb81e4a88,peer=0x12e234c0,"main_dispatch"]
12-28 00:13:52.571: V/GamesNativeSDK(5984): Detaching from JVM on thread main_dispatch
Experiencing same issue.
After a Leaderboard or Achivement UI is shown using one of Social.ShowLeaderboardUI() or Achivements Google services crashes.
Calling Social.ShowLeaderboardUI() throws UI busy is logcat.
Thanks
SA
I think I have run into this issue if I call ShowLeaderboardUI twice in a row before the leaderboard view appears.
How did you solve it ? Put a flag to check if show leader board has been called ?
Yep, I added a flag and cleared it in OnApplicationPause().
I had the same problem with my game. I made several calls to the library, reporting achievements one after another and then I called ShowAchievementsUI, which resulted in my game dying. When I made sure that all other calls were finished before calling ShowAchievementsUI, things seems to work.
Still having problems with achievement UI. Getting UI busy error.
How did you make sure all calls to reportProgress were done before showAchievements...
Thanks again
It does seem like the plugin could handle it better; I'll pass along the suggestion. reportProgress has a callback which is called when reporting is complete.
I just added a flag, that I cleared once the "sucess"-method was called. Then I used a coroutine that waited until the flag was cleared before issuing the next call.
I used the flag and OnApplicationPause to solve the problem when calling ShowLeaderboardUI but the problem still happen, although with less frequency.
If I open and close the leaderboard several times, even with the flag cleared at OnAplicationPause, the 'Google Play services has stopped' message still appears followed by the BUSY error in the logs.
I'm looking forward to see a better handling by the plugin.
Thanks.
I get this problem regularly on a Lollipop device. (5.0.1).
On anything below, there are no problems, regardless of the number of times tapped.
This seems to be pre-empted by a "Google Play Services has not responded" error :-
01-07 16:21:25.854: D/NativeBridgeActivity(27862): Launching bridge activity
01-07 16:21:25.855: I/ActivityManager(719): START u0 {cmp=xxxxx/com.google.games.bridge.NativeBridgeActivity (has extras)} from uid 10428 on display 0
01-07 16:21:26.360: W/ActivityManager(719): Activity pause timeout for ActivityRecord{372f31a7 u0 xxxxx/com.prime31.UnityPlayerNativeActivity t2046}
01-07 16:21:26.772: I/Choreographer(27862): Skipped 53 frames! The application may be doing too much work on its main thread.
01-07 16:21:26.785: I/ActivityManager(719): START u0 {act=com.google.android.gms.games.VIEW_LEADERBOARDS dat=version:6587000 flg=0x4000000 pkg=com.google.android.gms cmp=com.google.android.gms/.games.ui.client.leaderboards.ClientLeaderboardListActivity (has extras)} from uid 10428 on display 0
01-07 16:21:26.792: I/AdColony(27862): [ADC] AdColony pause called.
01-07 16:21:26.884: I/eFrame(27886): pkgname_before:xxxxx class:com.google.android.gms
01-07 16:21:26.916: W/PopupManager(28233): You have not specified a View to use as content view for popups. Falling back to the Activity content view which may not work properly in future versions of the API. Use setViewForPopups() to set your content view.
01-07 16:21:26.918: W/GmsClientEvents(28233): registerConnectionCallbacks(): listener ClientLeaderboardFragment{2babac20 #0 id=0x7f0f0223} is already registered
01-07 16:21:26.918: W/GmsClientEvents(28233): registerConnectionFailedListener(): listener ClientLeaderboardFragment{2babac20 #0 id=0x7f0f0223} is already registered
01-07 16:21:26.974: I/Adreno-EGL(28233):
01-07 16:21:26.974: I/OpenGLRenderer(28233): Initialized EGL, version 1.4
01-07 16:21:27.127: I/ActivityManager(719): Displayed com.google.android.gms/.games.ui.client.leaderboards.ClientLeaderboardListActivity: +299ms (total +766ms)
01-07 16:21:27.250: D/AndroidRuntime(28233): Shutting down VM
01-07 16:21:27.312: E/AndroidRuntime(28233): FATAL EXCEPTION: main
01-07 16:21:27.312: E/AndroidRuntime(28233): Process: com.google.android.gms.ui, PID: 28233
01-07 16:21:27.312: E/AndroidRuntime(28233): java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.ViewGroup.getLocationInWindow(int[])' on a null object reference
01-07 16:21:27.312: E/AndroidRuntime(28233): at com.google.android.play.a.a.a(SourceFile:128)
01-07 16:21:27.312: E/AndroidRuntime(28233): at com.google.android.gms.games.ui.cp.run(SourceFile:45)
01-07 16:21:27.312: E/AndroidRuntime(28233): at com.google.android.gms.games.ui.co.a(SourceFile:51)
01-07 16:21:27.312: E/AndroidRuntime(28233): at android.support.v7.widget.br.run(SourceFile:248)
01-07 16:21:27.312: E/AndroidRuntime(28233): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
01-07 16:21:27.312: E/AndroidRuntime(28233): at android.view.Choreographer.doCallbacks(Choreographer.java:580)
01-07 16:21:27.312: E/AndroidRuntime(28233): at android.view.Choreographer.doFrame(Choreographer.java:549)
01-07 16:21:27.312: E/AndroidRuntime(28233): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
01-07 16:21:27.312: E/AndroidRuntime(28233): at android.os.Handler.handleCallback(Handler.java:739)
01-07 16:21:27.312: E/AndroidRuntime(28233): at android.os.Handler.dispatchMessage(Handler.java:95)
01-07 16:21:27.312: E/AndroidRuntime(28233): at android.os.Looper.loop(Looper.java:135)
01-07 16:21:27.312: E/AndroidRuntime(28233): at android.app.ActivityThread.main(ActivityThread.java:5221)
01-07 16:21:27.312: E/AndroidRuntime(28233): at java.lang.reflect.Method.invoke(Native Method)
01-07 16:21:27.312: E/AndroidRuntime(28233): at java.lang.reflect.Method.invoke(Method.java:372)
01-07 16:21:27.312: E/AndroidRuntime(28233): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
01-07 16:21:27.312: E/AndroidRuntime(28233): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
01-07 16:21:27.319: I/ActivityManager(719): Process com.google.android.partnersetup (pid 27587) has died
01-07 16:21:27.376: W/ActivityManager(719): Force finishing activity com.google.android.gms/.games.ui.client.leaderboards.ClientLeaderboardListActivity
01-07 16:21:27.386: W/ActivityManager(719): Force finishing activity xxxxx/com.google.games.bridge.NativeBridgeActivity
error_ui_busy in leaderboard, achievement, and other play service UI, now working at all looking for better solution
receiving error_ui_busy while showing leaderboard, not getting any play sevice ui .
I am receiving the same error. Here is my "DEBUG"-filtered log:
10-13 14:31:10.407: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:10 +02:00 DEBUG: Activating PlayGamesPlatform.
10-13 14:31:10.407: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:10 +02:00 DEBUG: PlayGamesPlatform activated: GooglePlayGames.PlayGamesPlatform
10-13 14:31:10.407: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:10 +02:00 DEBUG: Creating platform-specific Play Games client.
10-13 14:31:10.407: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:10 +02:00 DEBUG: Creating Android IPlayGamesClient Client
10-13 14:31:10.737: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:10 +02:00 DEBUG: Starting Auth Transition. Op: SIGN_IN status: ERROR_NOT_AUTHORIZED
10-13 14:31:10.737: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:10 +02:00 DEBUG: Invoking callbacks, AuthState changed from silentPending to Unauthenticated.
10-13 14:31:10.737: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:10 +02:00 DEBUG: there are pending auth callbacks - starting AuthUI
10-13 14:31:10.747: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:10 +02:00 DEBUG: Invoking user callback on game thread
10-13 14:31:11.077: E/SELinux(3133): [DEBUG] get_category: variable seinfo: untrusted sensitivity: NULL, cateogry: NULL
10-13 14:31:11.347: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:11 +02:00 DEBUG: Starting Auth Transition. Op: SIGN_IN status: VALID
10-13 14:31:11.367: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:11 +02:00 DEBUG: Entering internal callback for PlayerManager#InternalFetchSelfCallback
10-13 14:31:11.397: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:11 +02:00 DEBUG: Populating User
10-13 14:31:11.417: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:11 +02:00 DEBUG: Found User: [Player: 'FOO' (id FOO)]
10-13 14:31:11.417: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:11 +02:00 DEBUG: Maybe finish for User
10-13 14:31:11.417: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:11 +02:00 DEBUG: Auth not finished. User=[Player: 'FOO' (id FOO)] achievements=
10-13 14:31:11.507: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:11 +02:00 DEBUG: Entering internal callback for AchievementManager#InternalFetchAllCallback
10-13 14:31:11.507: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:11 +02:00 DEBUG: Populating Achievements, status = VALID
10-13 14:31:11.587: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:11 +02:00 DEBUG: Found 6 Achievements
10-13 14:31:11.587: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:11 +02:00 DEBUG: Maybe finish for Achievements
10-13 14:31:11.587: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:11 +02:00 DEBUG: Auth finished. Proceeding.
10-13 14:31:11.587: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:11 +02:00 DEBUG: Invoking Callbacks: System.Action`2[System.Boolean,System.String]
10-13 14:31:11.617: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:11 +02:00 DEBUG: Invoking user callback on game thread
10-13 14:31:26.837: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:26 +02:00 DEBUG: ShowAchievementsUI callback is
10-13 14:31:26.867: I/Unity(2917): [Play Games Plugin DLL] 10/13/17 14:31:26 +02:00 DEBUG: Entering internal callback for AndroidPlatformConfiguration#InternalIntentHandler
The UI is never showing. Not the achievements and not the leaderboard UI. Anyone can spot the error here?
adding these following lines in androidmanifest file will slove the issue
<activity android:name="com.google.games.bridge.NativeBridgeActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
@ravindra5337
Your solution worked for me. I've put it into the "application" tag inside the AndroidManifest of the google play plugin. Works like charm, thank you.
That does not solve it for me :( Although I have a pure native_glue application.
Most helpful comment
adding these following lines in androidmanifest file will slove the issue
<activity android:name="com.google.games.bridge.NativeBridgeActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />