playgameservices / android-basic-samples

Google Play game services - Android samples
Apache License 2.0
970 stars 972 forks source link

Getting Crash from IllegalStateException Max XP must be more that Min XP #304

Open protoDean opened 4 years ago

protoDean commented 4 years ago

This happens every time a score is submitted and it results in the app crashing. Once it happens once, to a player, it will happen every time they submit a score, killing the app. Only way to stop it is to log out and log in with another user.

We can reproduce it by submitting a score very early, while GPGS is still trying to log in.

Any help here would be great. There doesnt seem to be anything we can do to avoid this other than killing GPGS. Its bad.

Full stack:

com.google.android.gms.common.internal.Preconditions.checkState (Unknown Source:29) com.google.android.gms.games.PlayerLevel. (com.google.android.gms:play-services-games@@18.0.1:3) com.google.android.gms.games.PlayerRef. (com.google.android.gms:play-services-games@@18.0.1:14) com.google.android.gms.games.PlayerRef. (com.google.android.gms:play-services-games@@18.0.1:1) com.google.android.gms.games.leaderboard.LeaderboardScoreRef. (com.google.android.gms:play-services-games@@18.0.1:2) com.google.android.gms.games.leaderboard.LeaderboardScoreBuffer.get (com.google.android.gms:play-services-games@@18.0.1:4) com.google.android.gms.games.leaderboard.LeaderboardScoreBuffer.get (com.google.android.gms:play-services-games@@18.0.1:6) com.google.android.gms.common.data.DataBufferIterator.next (Unknown Source:8) com.prime31.PlayGameServicesPlugin.jsonFromLeaderboardScoreBuffer (PlayGameServicesPlugin.java:249) com.prime31.PlayGameServicesPlugin.access$1500 (PlayGameServicesPlugin.java:82) com.prime31.PlayGameServicesPlugin$ScoreLoadListener.onResult (PlayGameServicesPlugin.java:2041) com.prime31.PlayGameServicesPlugin$ScoreLoadListener.onResult (PlayGameServicesPlugin.java:2007) com.google.android.gms.common.api.internal.BasePendingResult$CallbackHandler.handleMessage (Unknown Source:10) android.os.Handler.dispatchMessage (Handler.java:106) com.google.android.gms.internal.base.zap.dispatchMessage (Unknown Source:8) android.os.Looper.loop (Looper.java:280) android.app.ActivityThread.main (ActivityThread.java:6710) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:858)

MigrantP commented 4 years ago

We are getting reports of the same issue in one of our games. It's on Unity 2019.2.11 and GPGS 0.9.63.

aaronflippo commented 1 year ago

I'm seeing this issue too in a Unity game. Unity 2020.3.29f1, unity plugin 0.11.01. Anyone know of a workaround or fix?