GPGS is broken?

Sorry for the very late reply, but I just published and old game I had with Google Play game services v3

Happy to share code, but from an integration perspective, I added plugin and googlePlayGamesAppId to build.settings and called .init()

--
	-- Android section
	--
	android =
	{
		googlePlayGamesAppId = "3831549xxxxxx",
		usesPermissions =
		{
			"android.permission.INTERNET",
		},
	},

	--

	--
	-- Plugins section
	--
	plugins =
	{
			["CoronaProvider.gameNetwork.apple"] =
			{
					publisherId = "com.coronalabs",
					supportedPlatforms = { iphone=true, android=false },
			},
			["plugin.gpgs.v3"] =
			 {
					 publisherId = "com.solar2d",
			 },
	},

Yesterday I was getting no leaderboards or log-in with my build keystore md5 key and had to swap with my App Integrity MD5 on my client id and now work great :slight_smile:


Hi Scott
My setup seems correct based on what I’ve read in google’s documentation and what you’ve posted. It used to work until some weeks back and then suddenly didn’t work and hasn’t since.

For most of my projects I only needed it for signing in and was able to successfully move to your Google sign in plugin which also requires similar steps to set up the authentication procedure but that works just fine so it could be some idiosyncratic issue with GPGS. I’ll try again once shortly to see if it works now.

Dear famousdoggstudios,
I’ve been waiting for google to remove my erroneous cloud projects for the last month so I could attempt to implement the steps you kindly listed in my thread regarding this.
I was going to give it a go this week then saw this thread…could you please confirm if resolved?
Would really like to ascertain how to get this implemented as I’ve had it in mind for my latest title since day dot.
Many thanks,
Nick

Using Scott’s Google Sign in plugin as an alternative for GPGS has worked without much problem. I only needed to access the user’s name and ID so for now this serves my purpose but honestly, I haven’t properly worked out yet why the same steps didn’t work for GPGS.

Most of the set up on the Google Console is same for both and they both recommend integrating the project with Firebase but I did notice that the documentation on Scott’s website suggested adding SHA1 fingerprints for the upload and signing keys on Firebase BEFORE downloading the GoogleServices JSON file-- something that I hadn’t previously done while implementing GPGS into my project. I suspect that this might have been the reason why I wasn’t able to sometimes log in with GPGS but I’m yet to go back and try this again.

1 Like

Thank you for replying and supplying further info.
I’m attempting saves, acheivements and leaderboards so seems the plugin will not suffice.
I’ll spend some time on it this week and feed back.
Good luck!!

Right, so I’ve been doing other things for a couple weeks.
I’ve now attempted once more to get this set up.
I’ve followed all the steps you provided on the other thread so now include firebase, etc, added the json, etc, etc, etc.
It’s still not working.
Actually doing all this again and taking dozens of hours over the course of several months and not acheiving anything is quite depressing. Especially as I was displaying a leaderboard without too much hassle a year ago.
I’m going to spend a couple more hours on it this week and if I can’t resolve will strip out all the GPGS menus from my game and just release it.
If anyone else has any suggestions I would greatly appreciate them at this stage, but I think I’m about done here.

I am seriously considering in moving solely to Apple, as am not looking forward to a future dealing with Google, it’s not just Solar2D that’s not working their whole workflow is a tedious mess.
Does anyone have experience publishing to Apple store, using leaderboard and acheivements?

Yeah gamenetwork integration is much smoother with apple. Once you’ve got the provisioning profiles and test account set up, it just works

Their certificate and provisioning profiles used to feel like a chore initially but qt least they’re consistent in handling their products unlike google.

Next they’re going to announce android is just windows so deal with it :joy: lost count of how many products they’ve forced on users only to then discontinue them.

I’ve just spent the whole evening on this once more.
I’ve recreated everything from scratch.
I’ve followed every step I can find.
Still no login.
I’m currently dealing with Google Developer support which isn’t helping either.
@Scott_Harrison It seems to me currently you are the only one who can get this running.
Can you please assist further?

Oh.
My.
God.

I don’t know what I’ve just changed but I’ve re-run the app and it’s only bleddy logged in!!!

[Edit]
Answer: I hadn’t changed anything since last attempt - last thing I changed in Google config was to make the Firebase SHA1 the same as the Cloud Client ID. Guess it just took some time for the settings to become effective.

1 Like

Well I’m sure you’ve done that previously as well when it wasn’t working. The bottomline I think is that the whole firebase, cloud console, and Play Developer Console integration is a mess and their documentation is often outdated and distributed in all sorts of different places.

After your last post, I have been trying to push an update for a project where the leaderboards had stopped showing some time back but it didn’t see many users so I hadn’t bothered. Recently Google said that some other SDK was out of date and slapped us with a June 04 deadline so I figured I’d also sort out GPGS and I’m now in the same boat as you were until 2 days back (and I’ve been so many times in the past). Everything is configured exactly how it should be but I only get a successful login like 1 in 10 times and there’s no clear lead that’ll allow me to work out what I’m doing right or wrong and where.

Mobile gaming honestly will get crappier by the day because there’s basically two platforms and neither one wants developers to use tools like Solar2D that will facilitate cross-platform development so they’d keep adding new things for us to deal with and the game engines will constantly be fire-fighting or rushing to meet some pointless deadline (sunset as Google likes to call it).

Anyway, I’m happy it worked for you. Now I just have to wait 30 days before the cloud console will delete a duplicate project and allow me to put in the correct SHA1 xD

I can’t disagree with you, and the last thing I mentioned to Google Developer support was shame it was such a chore to do.
It’s taken 2 months to get something working this year that I’m sure I had working in a couple days last year.

Some of the additional steps I followed this time:

  • Created a new app in Play Console.

Tip from a Google search. I’d done this before but not followed other steps, so did it again.

  • Created a new keystore.

Although I don’t think this is required, because the SHA1 didn’t match my project I did so. Now I realise that the SHA1 from keystore matches the UPLOAD key and the SHA1 in Cloud project needs to match the APP SIGNING Key.

  • Created a new package with a different filename to the old one that wasn’t working.

Tip from a Google search. Before the only change I made was a capitalisation, this time it was completely different (although both ended in my game name).

  • Deleted the old Cloud Project and created a new one.

Another tip from a Google search - this was the one I was dreading as caused me problems last time (I had a bunch of duplicates). However this time I have not waited for the old Cloud project to be closed, I just selected “No, my game doesn’t use Google APIs” so it created a new one.

  • Delete the old Firebase project and create the new one.

I did this after creating the new app and linked the Firebase project to it. Then I updated the SHA1 on Firebase to match the Google Cloud project. Then downloaded the google-services.json added it to my app folder, recompiled my Solar2D project and created a new release and added the build with the json in it.

  • Uninstalled my app from the tablet, deleted all cache/files from Google Play Services app then reinstalled the game.

This was another Google search tip (lots of users on StackExchange, etc, getting these same issues (for the last decade!!) and none of the ones I found were using Corona/Solar2D - so it’s not just us. This was one that seemed obvious after reading it but not something I’d though of doing before. I knew it was having an effect because relaunching the game after doing so made bootup slower, brought up the GPGS spinner and then asked me to select my Google account.

As mentioned, this didn’t work straight away. I was getting the error message at login (I’ve not even created a leaderboard yet) and was really scratching my head wondering what else could possibly be wrong. I was about to give up for the night when maybe 20 minutes after I’d made the latest change Google side I simply ran my game and it logged in.

The Google Dev support guy game me one tip that helped and that was he advised me it WAS a problem with my Google Cloud account. So at that point (and the fact Scott had it working) and after reading some other tips from people who have suffered like us over the years I was determined to get it working and just went ahead and deleted the app and cloud project and started again. I’d run adb and got a full bugreport text file at his suggestion but this was a complete waste of time.

Yes it’s a massive pain in the ass and I really hope I don’t have to go through it again, but am hoping to make more games and use this functionality again, having Google (and if I ever get that far App Store) account login/saves/etc gives users a higher perception of quality of the product I feel and are more likely to use it, hence my determination.

I am keeping my fingers crossed for you and if my experience helps anyone else then to some extent it’s kinda worth it…!

2 Likes

Personally, I find it so much easier (this is a relative term) to use my own platform independent leaderboards and cloud saves. This also allows players to move seemlessly from one device to another and even play on android and ipad on the same game. None of this config crap (well apart from Google SSO being a minor pain to setup - yes it is not slick at all).

Helps if you a) have a server and b) the backend skills to make the API work. But to be free of platform-specific stuff, be SDK free and offer proper cross platform gameplay is real nice.

Yes since the last time I had a nightmare experience with gpgs, I’ve pretty much gone with SSO through google and cross platform leaderboards using a BaaS service.

This makes much more sense for the long term but the state of gpgs is seriously bad at the moment. Would’ve been nice to not have to implement a UI for leaderboards on an old app that had a single leaderboard where getting gpgs going would have saved a bunch of effort.

On a different topic— have you added in the permission dialogs or whatever in your apps yet for Android 13? I don’t know what the system is in solar2d for handling that (for ios they have the att plugin)

The only permission I request is storage and only then when the player saves a screenshot so that permission popups up only when they are about to save.

I removed notifications because having that ugly permission popup (before the game has started loading) is an awful first time player experience and I noticed only a 40% opt in on the console stats.

Hmm. On iOS we show the permission popup only after users have completed the first few levels in the game. But yeah I can see why you might want to avoid it altogether

I’m sorry people are having issues with the new GPGS; in my experience, google developer documentation and console have not been great, and I generally avoid using it as much as possible.

I will say I did not use Firebase in the my sample game I attached above.

Good to know - I might strip it out at some point if I dare adjusting any config!

I published an updated where the leaderboards are seemingly working for all users except my own test accounts. I’d say don’t touch your setup if it’s working!

2 Likes

Did you guys resolve it well?

My app was working fine with leaderboards, achievements, and snapshots using “gpgs.v2”.

But I am now forced to upgrade to version 3 to fix the “API 33 issue”.

.
.
I just add init() by referring to GitHub, but I am failing to log in. There is no “event.errorMessage”.
.
.

.
.

-- (private beta testing)
--log-- Init event: {
   "name":"init"
}
--log-- Login event: {
   "isError":true,
   "name":"login",
   "phase":"logged in"
}

-- (Production Distribution)
--log-- Init event: {
   "name":"init"
}
--log-- Login event: {
   "isError":true,
   "name":"login",
   "phase":"canceled"
}

I’ve been searching forums, googling and trying to solve the problem for 3 days and I’m getting exhausted.

Please someone help me.

I would like to go back to gpgs.v2 that everything worked fine.

Yes mate I got it working on v3.
The login process is different apparently, I don’t remember exactly how I did it last year on v2 so cannot elaborate I’m afraid.
I do know that you can no longer “side load” the apk and have it working, it needs to come from Play Store.