Google Play Game Services Unity Crash

So I’m trying to add GPGS to my Unity project so I can have achievements and leaderboards on the game, and after building it, the app crashes before starting, sometimes I can see a black screen for some seconds, sometimes it crashes instantly.
I believe GPGS fails to authenticate then crashes, tried to see if anything specific was showing up on logcat but couldn’t detect anything.

Only plugin I got besides GPGS is Unity Ads.

Logcat attached,

Thanks in advance :slight_smile:

5134982–508013–logcat RocketJ.txt (386 KB)

There are multiple errors

2019-11-03 21:34:30.303 24330-24354/? E/Unity: NullReferenceException: A null value was found where an object instance was required.
at TranslateScript.OnEnable () [0x00000] in <filename unknown>:0

(Filename: currently not available on il2cpp Line: -1)
2019-11-03 21:34:30.305 24330-24367/? D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2019-11-03 21:34:30.430 24330-24354/? D/UnityAds: com.unity3d.services.core.misc.Utilities.writeFile() (line:127) :: Wrote file: /data/user/0/com.FarSouth.RocketJumper/files/UnityAdsStorage-public-data.json
2019-11-03 21:34:30.431 24330-24354/? D/UnityAds: com.unity3d.services.core.device.Storage.sendEvent() (line:81) :: Couldn't send storage event to WebApp
2019-11-03 21:34:30.493 24330-24354/? E/Unity: NullReferenceException: A null value was found where an object instance was required.
at LevelManager.Start () [0x00000] in <filename unknown>:0

Though I don’t see exact crash. You may want to try Development player instead

Oh I see, out these 4 I’m certain the first one is not causing any issues, maybe the third one too since it seems that it is Unity Ads related and ads were working normally, unless GPGS changes Unity Ads behavior?

This may help but a while ago I built the game without GPGS authenticating, so the plugin was there but it wouldn’t initialize, obviously, the game worked normally though, it started crashing after I started .executing SignIn method shown below:

void Awake() {
        if (instance != null) {
            Destroy(gameObject);
            print("Duplicate music player destroyed");
        }
        else {
            instance = this;
            GameObject.DontDestroyOnLoad(gameObject);
        }      
    }
    void Start()
    {
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder().Build();
        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.Activate();

        SignIn();

    }

    void SignIn() {

        Social.localUser.Authenticate(success => { });
    }

Thanks for your reply!

Fix your NRE’s first to rule them out. You should have none.

Ok, thanks for the reply!
It seems I fixed the NRE’s, the difference now is that its taking a little bit longer before the crash happens, but it still crashes.
New logcat attached.

5152628–510473–logcat2.txt (521 KB)

I would suggest building with Development player, there’s nothing in the log which would say why it crashed.

Though there is a log saying something about low storage, out of curiosity, do you have enough storage on your phone?

Yes I do have 4 Gbs of free storage on my phone,
I think I will skip Play Services for now, I already lost 3-4 months trying to fix Google Admob (with no sucess) issues with this app and now GPGS doesn’t wanna work aswell, seems that it nevers goes smoothly when it comes to google plugins, thanks for the attention.