Play-games-plugin-for-unity: Android crash when enabling Saved Games?

Created on 28 Apr 2016  路  22Comments  路  Source: playgameservices/play-games-plugin-for-unity

We're having crashes every time we build a config with EnableSavedGames

public static void Initialize()
{
    var config = new PlayGamesClientConfiguration.Builder()
        .EnableSavedGames()
        .Build();

    PlayGamesPlatform.InitializeInstance(config);
    PlayGamesPlatform.Activate();
}

Error:

    04-28 11:19:44.683  3849  3849 F DEBUG   : Abort message: 'art/runtime/java_vm_e
    xt.cc:410] JNI DETECTED ERROR IN APPLICATION: can't call void com.google.android
    .gms.common.api.PendingResult.setResultCallback(com.google.android.gms.common.ap
    i.ResultCallback) on null object'

Full log in here: http://pastebin.com/0SgtqwvU (abort message at the very last)

I have no idea where that is coming from or what to do about it...

We use GPG, CB, GPA, StansAssets, UnityPurchasing

Android bug

Most helpful comment

Even if that's the case, it should be handled more gracefully, try/catch, error codes, anything it shouldn't cause a crash. It should just cause syncing to fail.

All 22 comments

Library 9.32 crashes on android directly after login attempt for us.

W/System.err(28954): java.lang.IllegalStateException: A fatal developer error has occurred. Check the logs for further information. W/System.err(28954): at com.google.android.gms.common.internal.zzj$zza.zzc(Unknown Source) W/System.err(28954): at com.google.android.gms.common.internal.zzj$zza.zzw(Unknown Source) W/System.err(28954): at com.google.android.gms.common.internal.zzj$zzc.zzqN(Unknown Source) W/System.err(28954): at com.google.android.gms.common.internal.zzj$zzb.handleMessage(Unknown Source) W/System.err(28954): at android.os.Handler.dispatchMessage(Handler.java:110) W/System.err(28954): at android.os.Looper.loop(Looper.java:193) W/System.err(28954): at android.app.ActivityThread.main(ActivityThread.java:5292) W/System.err(28954): at java.lang.reflect.Method.invokeNative(Native Method) W/System.err(28954): at java.lang.reflect.Method.invoke(Method.java:515) W/System.err(28954): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824) W/System.err(28954): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640) W/System.err(28954): at dalvik.system.NativeStart.main(Native Method)

In 9.30 with enabled save games, authentication always fails.

@claywilkinson any idea?

I'm having the same issue. Enabling saved games crashes on the later half of authentication.

I found the solution. Saved games was not enabled in Google Play Developers Console in Game Services -> Game Details. There is a toggle for saved games to be enabled.

We tested on 4 devices. Worked on 2 (Samsung Galaxy Note 4, Nexus 7 Tablet) and crashed on the other (both Nexus 6P, Android v. 6.0.1) --- We definitely have save enabled in the developer console otherwise it wouldn't have worked for the first two devices. @claywilkinson any ideas?

It seemed like we had to 'publish' the changes we did on Google developer console enabling Google save. So it's not enough to only enable it, you have to publish the changes too!

Hi! Maybe my issue is duplicate, but have the same problem.
https://github.com/playgameservices/play-games-plugin-for-unity/issues/1217

@TinyTitanAli Did your problem was solved? I'm waiting whole day after publishing changes, but it has no effect yet(

@vexe Did your problem was solved?

@hippogamesunity I'm vexe. Yeah it has been solved it seems so far, no issues after committing/publishing that save change in the google developer console. It didn't work right away though, I had to wait till the next day.

Problem was solved after waiting about 30h since publishing changes. I think that plugin should handle this situation and shouldn't cause game crash.

@TinyTitanAli Just to be clear, you have to hit _Publish Game_ on the Google Play Developer Console to have this working? Do you know if it works when it is in the state _Ready to test_?

@felipeota I don't have access to the console so I can't tell. My boss at work did it. I just asked and he said it's called "Publish Changes", and the game was already published. I don't know about 'Ready to test'

@felipeota yes, you should Publish Game and wait 1-2 days.

After turning it on and waiting for two days on _ready to test_ I can confirm that it does work on that state without the need to publish.

Here is some background on the Saved Games configuration.

The saved Games flag is definitely a sensitive spot. For some reason it sometimes takes some time to propagate completely on the backend. 1-2 days is definitely the extreme value, it usually is much faster. There is also a cached value on the device, so clearing the play services cached data and the play games app cached data may also help expedite seeing the new value.

The reason for having the flag is that it controls syncing saved game data between your game and the servers. This sync process takes time, so if you are not using Saved Games, it is an unnecessary performance penalty.

The crash that happens when you try to connect with Saved Games configured on the client and not on the server. The thinking being it is a fatal error since Saved games will not work. I have filed a request with the engineering team to make the message more clear vs. a cryptic call stack.

What I would recommend is when you create a new game in the console, _always_ enable Saved Games. Then if you end up not using it, turn saved games off _before_ publishing. This way you're game services integration works immediately, and then you can optimize the performance.

Even if that's the case, it should be handled more gracefully, try/catch, error codes, anything it shouldn't cause a crash. It should just cause syncing to fail.

Agreed.

had the same issue. turned on saved games in developer console and the issue was no more

We had the same error. Turned saved games ON in dev console, changes were ready to test. We just wiped out Google Play Games cache on a device and it worked. Even before publishing changes.

Should be fixed already in v0.10.06. Feel free to reopen if it reproduces with latest plugin version.

Was this page helpful?
0 / 5 - 0 ratings