0 votes

Have been trying with no success for a couple of week now to get google play services working. There are a few github repositories out there but every time i try, evertything compiles and builds succesfully. The app runs the first time around (from one click deploy) and initalises the GPGS connection and attempts to login
In all versions (that work at least) the GPGS module immediately disconnects me and any subsequent attempts to load the app without doing an unintall and reinstall is met with

12-04 16:44:06.808 E/godot   ( 5912): **ERROR**: Socket error: 111
12-04 16:44:06.808 E/godot   ( 5912):    At: drivers\unix\net_socket_posix.cpp:199:_get_socket_error() - Socket error: 111
12-04 16:44:06.809 E/godot   ( 5912): **ERROR**: Connection to remote host failed!
12-04 16:44:06.809 E/godot   ( 5912):    At: drivers\unix\net_socket_posix.cpp:339:connect_to_host() - Connection to remote host failed!
12-04 16:44:06.810 E/godot   ( 5912): Could not connect to remotefs: localhost:6010.

Modules tried :
https://github.com/kloder-games/godot-gpgs (issues with gradlew build / No callbacks received)
https://github.com/vini-guerrero/godot-gpgs (issues with gradlew build / immeditaely disconnected for GPGS)
https://github.com/ClaudioEden/godot-GamePlayGoogleServices (immediate disconnect and then app will not reopen)
https://github.com/mani144/gpgs (immediate disconnect and then app will not reopen)
I'm absolutely at a loss as to how to debug these issues further.
im currently using adb logcat -v time godot:* gpgs:* AndroidRuntime:* XXX:* *:S and it really not providing much useful info.

Anyone have a working GPGS module?

in Engine by (201 points)

as i know GoogleApiClient is deprecated , it changed to GoogleApi
will it affect ? i dont know, im not android expert

I had the same problem, tried Kopfenheim's and FrogSquare's modules, none will compile :/

I have this one (mostly) working with Godot 3.2:

I was having a problem where, when signing-in, a GPGS pop up appeared for me to accept their conditions and after "accept", the popup would close and I would get a service error message (a callback withe error code).

I solved the problem when I enabled Google Drive API in Google API Console.

I am using https://github.com/cgisca/PGSGP.
It took two weeks to get this plug-in working in my game. The biggest challenge was getting the project set-up correctly on the Google Play Developer Console, Google Game Play Console, and Google APIs and Services. Frankly, I think Google makes it difficult to set-up just so they don't get a bunch of junk apps in the Play Store.

I finally got it working by doing the following. First, follow the instructions in the plug-in README. Take note of the following if you are using other plug-ins in your game such as an AdMob plugin:

*Note 2: If you have already added other plugin that has meta-data android:name="com.google.android.gms.version" declared inside it's AndroidManifest, remove below lines from the android-pgs-plugin-> AndroidManifest.conf file. (Don't forget to save file after removing below lines)

Also, you have to add the following two lines to res://android/build/gradle.properties:


Next, be sure to add the following APIs to your project in Google APIs & Services Console:
- Google Game Play Services
- Google Play Game Management
- Google Drive API

I was missing the Google Drive API which caused an error code 8 ("Internal Failure") return from the sign-in call. It was frustrating because there are no clues to what is failing. There is nothing in the README that identifies the Drive API is needed. I finally found a clue in the Corona forums for a similar plug-in.

1 Answer

0 votes

I used https://github.com/mani144/gpgs work like charm probably your problem is with the api key
https://console.developers.google.com/apis?pli=1 This website you need to add your game key if it's not available and add that you are using Google play services
on config.py had to change canbuild(plat) to canbuild(env, plat) because it was saying that it was deprecated
an other thing I had to change is the gradle version from 4.6 to 5.1.1
On gradle.build changed the minSdkVersion to 21 (for multidex or multiDexEnabled (bothWorked)) and change compile to implementation
I don't understand none of these changes...but it work with this ad module https://github.com/kloder-games/godot-admob
now i'm trying to figure out 3.2 (it's easier because you don't need to build custom template anymore just plugins )

by (104 points)
edited by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.