Fixed org.godotengine.godot.Godot as Activity. Updated the aar to Godot 3.3.
See: https://github.com/godotengine/godot/issues/47198
Also fixes https://github.com/cgisca/PGSGP/issues/58
Hey I tried to use GodotPlayGamesServices.gdap and GodotPlayGamesServices.release.aar in this commit but I am getting this error (I am using 3.3):
04-25 13:54:17.572 25238 25269 F art : art/runtime/java_vm_ext.cc:410] JNI DETECTED ERROR IN APPLICATION: JNI CallVoidMethodA called with pending exception java.lang.ClassCastException: org.godotengine.godot.Godot cannot be cast to android.app.Activity 04-25 13:54:17.572 25238 25269 F art : art/runtime/java_vm_ext.cc:410] at void io.cgisca.godot.gpgs.PlayGameServicesGodot.initialize(boolean, boolean, java.lang.String, boolean, boolean, java.lang.String) (PlayGameServicesGodot.kt:194) 04-25 13:54:17.572 25238 25269 F art : art/runtime/java_vm_ext.cc:410] at void io.cgisca.godot.gpgs.PlayGameServicesGodot.init(boolean, boolean, boolean, java.lang.String) (PlayGameServicesGodot.kt:170) 04-25 13:54:17.572 25238 25269 F art : art/runtime/java_vm_ext.cc:410] at void org.godotengine.godot.GodotLib.step() (GodotLib.java:-2) 04-25 13:54:17.572 25238 25269 F art : art/runtime/java_vm_ext.cc:410] at void org.godotengine.godot.GodotRenderer.onDrawFrame(javax.microedition.khronos.opengles.GL10) (GodotRenderer.java:60) 04-25 13:54:17.572 25238 25269 F art : art/runtime/java_vm_ext.cc:410] at void android.opengl.GLSurfaceView$GLThread.guardedRun() (GLSurfaceView.java:1649) 04-25 13:54:17.572 25238 25269 F art : art/runtime/java_vm_ext.cc:410] at void android.opengl.GLSurfaceView$GLThread.run() (GLSurfaceView.java:1354)
Ah it was because the aar file was not updated, got it to work by doing gradlew build with godot-lib.3.3.stable.release.aar in godot-lib
@Xioor I've also built and uploaded the aar file here: https://github.com/oneseedfruit/PGSGP/releases/tag/3.1.1
@Xioor I've also built and uploaded the aar file here: https://github.com/oneseedfruit/PGSGP/releases/tag/3.1.1
i always have this error
- What went wrong: Execution failed for task ':processReleaseManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 18 cannot be smaller than version 21 declared in library [GodotPlayGamesServices.release.aar] C:\Users\Rhon.gradle\caches\transforms-2\files-2.1\a9bc0a0977499d3fdf3a5715d4a28322\jetified-GodotPlayGamesServices.release\AndroidManifest.xml as the library might be using APIs not available in 18 Suggestion: use a compatible library with a minSdk of at most 18, or increase this project's minSdk version to at least 21, or use tools:overrideLibrary="io.cgisca.godot.gpgs" to force usage (may lead to runtime failures)
@bubutime Ah you probably need to edit the file in your custom template: android/build/config.gradle, in ext.versions = [...], change minSdk from 18 to 21.
I am having issues with sign in, could you confirm the format of request_token
as using the xxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com provided in cloud console has given misconfiguration error in logcat (android oauth client)
PlayGamesServices[SignInAuthenticator]: **** APP NOT CORRECTLY CONFIGURED TO USE GOOGLE PLAY GAME SERVICES
PlayGamesServices[SignInAuthenticator]: **** DEVELOPER_ERROR
PlayGamesServices[SignInAuthenticator]: **** This is usually caused by one of these reasons:
PlayGamesServices[SignInAuthenticator]: **** (1) Your package name and certificate fingerprint do not match
PlayGamesServices[SignInAuthenticator]: **** the client ID you registered in Developer Console.
PlayGamesServices[SignInAuthenticator]: **** (2) Your App ID was incorrectly entered.
PlayGamesServices[SignInAuthenticator]: **** (3) Your game settings have not been published and you are
PlayGamesServices[SignInAuthenticator]: **** trying to log in with an account that is not listed as
PlayGamesServices[SignInAuthenticator]: **** a test account.
PlayGamesServices[SignInAuthenticator]: ****
PlayGamesServices[SignInAuthenticator]: **** To help you debug, here is the information about this app
PlayGamesServices[SignInAuthenticator]: **** Package name : uk.co.squatnet.accessdenied
PlayGamesServices[SignInAuthenticator]: **** Cert SHA1 fingerprint: XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX (removed for security)
PlayGamesServices[SignInAuthenticator]: **** App ID from manifest : MY_APP_ID
PlayGamesServices[SignInAuthenticator]: ****
PlayGamesServices[SignInAuthenticator]: **** Check that the above information matches your setup in
PlayGamesServices[SignInAuthenticator]: **** Developer Console. Also, check that you're logging in with the
PlayGamesServices[SignInAuthenticator]: **** right account (it should be listed in the Testers section if
PlayGamesServices[SignInAuthenticator]: **** your project is not yet published).
PlayGamesServices[SignInAuthenticator]: ****
PlayGamesServices[SignInAuthenticator]: **** For more information, refer to the troubleshooting guide:
PlayGamesServices[SignInAuthenticator]: **** http://developers.google.com/games/services/android/troubleshooting
PlayGamesServices[SignInAuthenticator]: ****
PlayGamesServices[SignInActivity]: onSignInFailed()...
PlayGamesServices[SignInActivity]: Sign in failed during 6
PlayGamesServices[SignInActivity]: ==> Returning non-OK result: 10002
and 404 error with web application type
Volley : [8754] NetworkUtility.e: Unexpected response code 404 for https://www.googleapis.com/games/v1/players/me?language=en-GB
PlayGamesServices[PlayerAgent]: Unable to load player g12569322451194792606
PlayerAgent: {"code":404,"errors":[{"reason":"notFound","domain":"global","message":"The requested application with ID 639603357971 was not found."}]}
I assume its something im doing wrong
https://www.youtube.com/watch?v=6qIlkRxFkeA
https://www.youtube.com/watch?v=6qIlkRxFkeA
Thanks, I had done all of that correctly and am still getting 404 errors.
Volley : [8754] NetworkUtility.e: Unexpected response code 404 for https://www.googleapis.com/games/v1/players/me?language=en-GB
PlayGamesServices[PlayerAgent]: Unable to load player g12569322451194792606
PlayerAgent: {"code":404,"errors":[{"reason":"notFound","domain":"global","message":"The requested application with ID 639603357971 was not found."}]}
@Squatnet if it is from a debug export, then it needs to have the same SHA-1 fingerprint (in the debug.keystore) as an OAuth client ID set up in your Google Cloud Platform.
If it is from a release export, the same applies that an OAuth client ID with the same SHA-1 fingerprint (matches the SHA-1 fingerprint in the release keystore) is set up.
However if you have "App signing" enabled, then you need to use a different SHA-1 fingerprint that Google generates AFTER you've uploaded your release. In your Play Console -> Release -> Setup -> App integrity. Copy the SHA-1 certificate fingerprint and make a new OAuth client ID with that same fingerprint. Then set that to be the OAuth client for your Play Games Services.
If your app is not under any kind of testing, "Internal Testing", "Closed Testing", or "Open Testing" with the relevant list of testers assigned to that track, then you need to add the email address associated with the Google account to the "Testers" list: In your Play Console -> Grow -> Play Game Services -> Setup and management -> Testers -> Testers
@oneseedfruit Thank you for your reply. I feel rather stupid now as it turns out i had simply not finished the publishing steps in the play developers console. I do apologise. Everything works perfectly now that there is a (published) play store app
@Xioor I've also built and uploaded the aar file here: https://github.com/oneseedfruit/PGSGP/releases/tag/3.1.1
I am using these files in my game on Godot 3.3 stable and it works just fine on my Pixel 3 and my wife's pixel 3, but when I have given it to some other testers they get the screen where the loading screen will spin endlessly when they try to sign into google play.
My one friend was not able to sign in on a Moto Z3 play and the other has a Moto G Play
I dragged the aar and the gdap file into the plugins directory I edited the androidmanifest.xml file I created the strings.xml file
I modified the config.gradel file to have the minmum API level be 21
The game compiles just fine, Leaderboards work on my Pixel 3, but some phones still have the endless loading issue from issue #57
@Tekuzo I think I might only be able to help if I have logs from those devices when it's loading endlessly. It's not occurring for me, so I'm not able to do anything about it.
That's assuming all email addresses are added in the testers lists accordingly and the SHA-1 fingerprint in the Android build has a matching OAuth client ID all set up.
@Tekuzo I think I might only be able to help if I have logs from those devices when it's loading endlessly. It's not occurring for me, so I'm not able to do anything about it.
That's assuming all email addresses are added in the testers lists accordingly and the SHA-1 fingerprint in the Android build has a matching OAuth client ID all set up.
My Game Services are Live in the Google Play Developer Console and I distribute beta and alpha access right through Google Play so these APK files were digitally signed by Google.
@Tekuzo if you have "App Signing" enabled in your Play Console, then you need to also make sure there is an OAuth client ID with its SHA-1 fingerprint matching the one found in Release -> Setup -> App integrity.
And this OAuth client has to be the one used for your Play Games Services, so it needs to be selected in your Play Games Services configuration -> Credentials.
The SHA-1 fingerprint from Release -> Setup -> App Integrity matches the fingerprint in Play Games Services ->Configuration -> Authorization.
@Tekuzo Try replacing the aar with this and see if that changes anything. https://drive.google.com/file/d/1Y46lebGdbNbyCES5EgYhMo0YshCg9TFq/view?usp=sharing
Otherwise I'll only be able to do something if I have the logs.
@Tekuzo Try replacing the aar with this and see if that changes anything. https://drive.google.com/file/d/1Y46lebGdbNbyCES5EgYhMo0YshCg9TFq/view?usp=sharing
Otherwise I'll only be able to do something if I have the logs.
I am now 99% convinced that this was a layer 8 issue on my part. I am going to retest tonight and I will let you know. Sorry for wasting your time.
I have confirmed that it was a problem with Google's Back End Service. Just like with Squatnet I had not published the service in the google cloud service page.
It produces a screen that is identical to the bug in #57
@Tekuzo good to know you've figured it out! Don't worry about wasting my time, I don't mind!
Hello. I have such a problem that when using signIn (), an error code 4 is returned. Everyone writes that this is a problem with SHA-1, but they have already verified that all SHA-1s are specified correctly in Oath2.0. I have already tried all the options. I'm using Godot 3.3. What could be the problem?
Hello. I have such a problem that when using signIn (), an error code 4 is returned. Everyone writes that this is a problem with SHA-1, but they have already verified that all SHA-1s are specified correctly in Oath2.0. I have already tried all the options. I'm using Godot 3.3. What could be the problem?
If you are making a brand new app, your project in Google Cloud Service is still in test mode. While it is still in test mode google IDs of the testers need to be added manually.
/edit And while in this state you are allowed to have 100 active testers and only 10,000 activations a day.
Making the service go live requires submitting a bunch of web forms to google and a 4-6 week wait while they verify your privacy policy and whatnot.
I added testers manually and use the tester account but still get error code 4 when trying to signIn (). All SHA-1 keys are correct. What else can I try to do to fix this?
пн, 24 мая 2021 г. в 04:10, Steven @.***>:
Hello. I have such a problem that when using signIn (), an error code 4 is returned. Everyone writes that this is a problem with SHA-1, but they have already verified that all SHA-1s are specified correctly in Oath2.0. I have already tried all the options. I'm using Godot 3.3. What could be the problem?
If you are making a brand new app, your project in Google Cloud Service is still in test mode. While it is still in test mode google IDs of the testers need to be added manually.
Making the service go live requires submitting a bunch of web forms to google and a 4-6 week wait while they verify your privacy policy and whatnot.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cgisca/PGSGP/pull/63#issuecomment-846667502, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCSGI3DS2E772ZMLZJZTHTTPGRSHANCNFSM43OOJKYQ .
I added testers manually and use the tester account but still get error code 4 when trying to signIn (). All SHA-1 keys are correct. What else can I try to do to fix this? пн, 24 мая 2021 г. в 04:10, Steven @.***>: … Hello. I have such a problem that when using signIn (), an error code 4 is returned. Everyone writes that this is a problem with SHA-1, but they have already verified that all SHA-1s are specified correctly in Oath2.0. I have already tried all the options. I'm using Godot 3.3. What could be the problem? If you are making a brand new app, your project in Google Cloud Service is still in test mode. While it is still in test mode google IDs of the testers need to be added manually. Making the service go live requires submitting a bunch of web forms to google and a 4-6 week wait while they verify your privacy policy and whatnot. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#63 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCSGI3DS2E772ZMLZJZTHTTPGRSHANCNFSM43OOJKYQ .
Are you trying to test on your device with external debug enabled? Try exporting an APK file with debug enabled and check with SHA-1 fingerprint it is signed with.
The engine signs my debug apks with a SHA-1 fingerprint that is not in my key store. I am not sure what is going on, but when I did that, I added the SHA-1 fingerprint that it was signing my APK files with, and I was able to get USB debugging working with the plugin.
I added testers manually and use the tester account but still get error code 4 when trying to signIn (). All SHA-1 keys are correct. What else can I try to do to fix this? пн, 24 мая 2021 г. в 04:10, Steven @.***>: … Hello. I have such a problem that when using signIn (), an error code 4 is returned. Everyone writes that this is a problem with SHA-1, but they have already verified that all SHA-1s are specified correctly in Oath2.0. I have already tried all the options. I'm using Godot 3.3. What could be the problem? If you are making a brand new app, your project in Google Cloud Service is still in test mode. While it is still in test mode google IDs of the testers need to be added manually. Making the service go live requires submitting a bunch of web forms to google and a 4-6 week wait while they verify your privacy policy and whatnot. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#63 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCSGI3DS2E772ZMLZJZTHTTPGRSHANCNFSM43OOJKYQ .
Are you trying to test on your device with external debug enabled? Try exporting an APK file with debug enabled and check with SHA-1 fingerprint it is signed with.
The engine signs my debug apks with a SHA-1 fingerprint that is not in my key store. I am not sure what is going on, but when I did that, I added the SHA-1 fingerprint that it was signing my APK files with, and I was able to get USB debugging working with the plugin.
Even if I upload the application to internal testing and download from there, it still does not work. Code 4 and that's it. If you have time, we can contact, for example, in telegrams and I will send you screenshots to confirm that everything is set up (as it seems to me) correctly. Perhaps you will find some problem there.
@tatarinovvladimir if you are using Godot 3.3, note that there is a bug where Godot would always look for the debug keystore in a default directory or automatically generate it there if it isn't already there and use that file instead of the keystore file you actually specified in the editor or export settings. This might have caused your SHA-1 fingerprints to not match because the export was actually signed with a different keystore file. This bug should be fixed in Godot 3.3.1, so you probably want to use the later version.
@tatarinovvladimir if you are using Godot 3.3, note that there is a bug where Godot would always look for the debug keystore in a default directory or automatically generate it there if it isn't already there and use that file instead of the keystore file you actually specified in the editor or export settings. This might have caused your SHA-1 fingerprints to not match because the export was actually signed with a different keystore file. This bug should be fixed in Godot 3.3.1, so you probably want to use the later version.
But even if I load my game into the play console for internal testing, and then download it, I still get error code 4. Or is it still because of version 3.3?
But even if I load my game into the play console for internal testing, and then download it, I still get error code 4. Or is it still because of version 3.3?
Download the sample project from the 3.3 plugin releases page, because some of the functions from the 3.3 release are different from the functions in the official documentation.
But even if I load my game into the play console for internal testing, and then download it, I still get error code 4. Or is it still because of version 3.3?
Download the sample project from the 3.3 plugin releases page, because some of the functions from the 3.3 release are different from the functions in the official documentation.
I will try to use 3.3.1 by @oneseedfruit advice and tell about result.
WARNING! A lot of text and pictures!
Okay, I already seem to have done everything, but it does not work. Here is a photo report of my actions.
- My keys on google play. Autosigning is on:
- Credentials for gogole signing, my generated keystore and debug keystore:
- Comparison of fingerprint in Google Play and in Google Cloud, so that you make sure that everything fits together exactly.
- Once again, we check through keytool.exe that the application is signed with this particular key
- Plugin included in export
- My AndroidManifest.xml with needed stings in down of
- My String.xml in build->res->values
- Adding scene with scipt to autoload:
- Just in case, through the Google tool we check the work of my API project in the Google Cloud Platform. Everything works, gives the code 200.
- Мой код с инструкции в GServ.gd:
extends Control
var play_games_services
var debug_text = ""
func _ready():
if Engine.has_singleton("GodotPlayGamesServices"):
play_games_services = Engine.get_singleton("GodotPlayGamesServices")
yield(get_tree().create_timer(1.0), "timeout")
var show_popups := true
var request_email := false
var request_profile := false
var request_token := "**********-******************.apps.googleusercontent.com"
play_games_services.init(show_popups, request_email, request_profile, request_token)
play_games_services.connect("_on_sign_in_success", self, "_on_sign_in_success") # account_id: String
play_games_services.connect("_on_sign_in_failed", self, "_on_sign_in_failed") # error_code: int
play_games_services.connect("_on_sign_out_success", self, "_on_sign_out_success") # no params
play_games_services.connect("_on_sign_out_failed", self, "_on_sign_out_failed") # no params
play_games_services.connect("_on_achievement_unlocked", self, "_on_achievement_unlocked") # achievement: String
play_games_services.connect("_on_achievement_unlocking_failed", self, "_on_achievement_unlocking_failed") # achievement: String
play_games_services.connect("_on_achievement_revealed", self, "_on_achievement_revealed") # achievement: String
play_games_services.connect("_on_achievement_revealing_failed", self, "_on_achievement_revealing_failed") # achievement: String
play_games_services.connect("_on_achievement_incremented", self, "_on_achievement_incremented") # achievement: String
play_games_services.connect("_on_achievement_incrementing_failed", self, "_on_achievement_incrementing_failed") # achievement: String
play_games_services.connect("_on_achievement_info_loaded", self, "_on_achievement_info_loaded") # achievements_json : String
play_games_services.connect("_on_achievement_info_load_failed", self, "_on_achievement_info_load_failed")
play_games_services.connect("_on_leaderboard_score_submitted", self, "_on_leaderboard_score_submitted") # leaderboard_id: String
play_games_services.connect("_on_leaderboard_score_submitting_failed", self, "_on_leaderboard_score_submitting_failed") # leaderboard_id: String
play_games_services.connect("_on_game_saved_success", self, "_on_game_saved_success") # no params
play_games_services.connect("_on_game_saved_fail", self, "_on_game_saved_fail") # no params
play_games_services.connect("_on_game_load_success", self, "_on_game_load_success") # data: String
play_games_services.connect("_on_game_load_fail", self, "_on_game_load_fail") # no params
play_games_services.connect("_on_create_new_snapshot", self, "_on_create_new_snapshot") # name: String
play_games_services.connect("_on_player_info_loaded", self, "_on_player_info_loaded") # json_response: String
play_games_services.connect("_on_player_info_loading_failed", self, "_on_player_info_loading_failed")
play_games_services.connect("_on_player_stats_loaded", self, "_on_player_stats_loaded") # json_response: String
play_games_services.connect("_on_player_stats_loading_failed", self, "_on_player_stats_loading_failed")
yield(get_tree().create_timer(1.0), "timeout")
play_games_services.signIn()
func _on_sign_in_success(account_id):
print_debug("SIGN SUCCESS: ", account_id)
debug_text = "SIGN SUCCESS: " + str(account_id)
func _on_sign_in_failed(error_code):
print_debug("SIGN FAILED: ", error_code)
debug_text = "SIGN FAILED: " + str(error_code)
func _process(delta):
$Label.text = debug_text
@oneseedfruit @Tekuzo As a result, when debugging, releasing, or even downloading an application from Google Play, when I call the signIn () function, I get sign in failed code error 4. I've been tormenting this for a day. Your help is very much needed.
What does it say under "Publishing Status" inside of Google Cloud Platform -> API's & Services -> OAuth Consent Screen?
If your Publishing Status is "testing" is your own gmail account listed as one of the registered testers?