cgisca / PGSGP

Play Games Services plugin for Godot Game Engine - Android
MIT License
217 stars 61 forks source link

Fixed org.godotengine.godot.Godot as Activity. Updated the aar to Godot 3.3. #63

Open oneseedfruit opened 3 years ago

oneseedfruit commented 3 years ago

See: https://github.com/godotengine/godot/issues/47198

Also fixes https://github.com/cgisca/PGSGP/issues/58

Xioor commented 3 years ago

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)

Xioor commented 3 years ago

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

oneseedfruit commented 3 years ago

@Xioor I've also built and uploaded the aar file here: https://github.com/oneseedfruit/PGSGP/releases/tag/3.1.1

ugothmeex commented 3 years ago

@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)

oneseedfruit commented 3 years ago

@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.

Squatnet commented 3 years ago

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

himaghnam commented 3 years ago

https://www.youtube.com/watch?v=6qIlkRxFkeA

Squatnet commented 3 years ago

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."}]}
oneseedfruit commented 3 years ago

@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

Squatnet commented 3 years ago

@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

Tekuzo commented 3 years ago

@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

oneseedfruit commented 3 years ago

@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 commented 3 years ago

@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.

oneseedfruit commented 3 years ago

@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.

Tekuzo commented 3 years ago

The SHA-1 fingerprint from Release -> Setup -> App Integrity matches the fingerprint in Play Games Services ->Configuration -> Authorization.

oneseedfruit commented 3 years ago

@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 commented 3 years ago

@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.

Tekuzo commented 3 years ago

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

oneseedfruit commented 3 years ago

@Tekuzo good to know you've figured it out! Don't worry about wasting my time, I don't mind!

tatarinovvladimir commented 3 years ago

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?

Tekuzo commented 3 years ago

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.

tatarinovvladimir commented 3 years ago

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 .

Tekuzo commented 3 years ago

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.

tatarinovvladimir commented 3 years ago

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.

oneseedfruit commented 3 years ago

@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 commented 3 years ago

@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?

Tekuzo commented 3 years ago

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.

tatarinovvladimir commented 3 years ago

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.

tatarinovvladimir commented 3 years ago

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. 1) My keys on google play. Autosigning is on: 1 2) Credentials for gogole signing, my generated keystore and debug keystore: 2 3) Comparison of fingerprint in Google Play and in Google Cloud, so that you make sure that everything fits together exactly. 3 4) Once again, we check through keytool.exe that the application is signed with this particular key 4 5) Plugin included in export 5 6) My AndroidManifest.xml with needed stings in down of 6 7) My String.xml in build->res->values 7 8) Adding scene with scipt to autoload: 8 9) 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. 9 10) Мой код с инструкции в 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.

Tekuzo commented 3 years ago

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?

tatarinovvladimir commented 3 years ago

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?

Right now its "Verification in progress", i try to veriificate it, but when it was in "Testing" it doesnt work to, but I added my account to testers.

Tekuzo commented 3 years ago

Was your account added before?

tatarinovvladimir commented 3 years ago

Was your account added before?

Sure

tatarinovvladimir commented 3 years ago

@oneseedfruit @Xioor @Squatnet @Tekuzo Can anyone help with this?

himaghnam commented 3 years ago

https://github.com/gamergamesz/Himaghnam/tree/master/Plugins-Build/Godot-3.3.2/GPGS it's the release of this "pull branch" xD and I have also merged #60

himaghnam commented 3 years ago

I did everything according to doc and it worked for me, tested on old project and is working fine ( I am from GameDevArts {YTD} ) so this video is still little bit valid - https://www.youtube.com/watch?v=6qIlkRxFkeA&t=279s I'll probably restart working on my channel again as soon as I get my motivation back xD [waiting for godot 4.0 alpha for big refractors !!]

oneseedfruit commented 3 years ago

@tatarinovvladimir your OAuth consent screen is all filled up correctly right?

tatarinovvladimir commented 3 years ago

@tatarinovvladimir your OAuth consent screen is all filled up correctly right?

image

Yes. There are also more screenshots in my comment up here. There I indicated that all keys match the keys in .apk and in the Play Console

oneseedfruit commented 3 years ago

@tatarinovvladimir How about this? Is your email address in this "Testers" list?

Screenshot_2021-05-26_11-17-48

tatarinovvladimir commented 3 years ago

@tatarinovvladimir How about this? Is your email address in this "Testers" list?

Screenshot_2021-05-26_11-17-48

Yes

image

Tekuzo commented 3 years ago

Have you confirmed the SHA-1 fingerprint on the APK using Keytool because the bug referenced by oneseedfruit was affecting me.

tatarinovvladimir commented 3 years ago

Have you confirmed the SHA-1 fingerprint on the APK using Keytool because the bug referenced by oneseedfruit was affecting me.

I will solve my problem. It turns out that the matter was that the very first Google Cloud project, which was created during the creation of Google Play Services, I deleted. Then I created a new one and set up a new one already correctly, but in no case should this be done, because the very first created project on Google Cloud is linked to your game. If you delete the very first project and create a new one, even with the correct setup, this will not work. It's not obvious, but it is. The application does not link to a new project.

GForceProductions commented 3 years ago

Hi, with this update it works now exporting from Godot 3.3.2.! However, it seems there is a problem with "initWithSavedGames"?

I am using initWithSavedGames(). After that, I run the signIn() function in Godot by pressing a button. I get the following log from logcat:

2021-06-27 13:44:08.603 27164-27195/com.gforceproductions.bounzyx E/godot: **SCRIPT ERROR**: Invalid call. Nonexistent function 'initWithSavedGames' in base 'JNISingleton'.
2021-06-27 13:44:08.603 27164-27195/com.gforceproductions.bounzyx E/godot:    At: res://scripts/GPS.gdc:18:_ready() - Invalid call. Nonexistent function 'initWithSavedGames' in base 'JNISingleton'.
2021-06-27 13:44:09.321 27164-27164/com.gforceproductions.bounzyx E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.gforceproductions.bounzyx, PID: 27164
    kotlin.UninitializedPropertyAccessException: lateinit property signInController has not been initialized
        at io.cgisca.godot.gpgs.PlayGameServicesGodot.access$getSignInController$p(PlayGameServicesGodot.kt:37)
        at io.cgisca.godot.gpgs.PlayGameServicesGodot$signIn$1.run(PlayGameServicesGodot.kt:222)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6762)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Tekuzo commented 3 years ago

What are the parameters you are using with initWithSavedGames()

GForceProductions commented 3 years ago

I am using it as follows: initWithSavedGames(show_popups, "SavedGamesName")

Tekuzo commented 3 years ago

Ya the official documentation doesn't work with the version of the plugin that works on 3.3.x

Try with this

Service.initWithSavedGames(true, 'Save_Data_Name', false, false, "");

GForceProductions commented 3 years ago

Thanks! It now does not crash anymore. However I would like to ask one more thing. When trying to sign in, I get error code 12501. And in logcat the following:

2021-06-27 14:53:05.697 1889-2736/? E/ActivityTrigger: activityResumeTrigger: not whiteListedcom.gforceproductions.bounzyx/com.godot.game.GodotApp/64

Everything worked before when exported from Godot 3.2.3. Is there anything else that changed that I missed?

tatarinovvladimir commented 3 years ago

Add yourself to testers

вс, 27 июн. 2021 г., 16:01 GForceProductions @.***>:

Thanks! It now does not crash anymore. However I would like to ask one more thing. When trying to sign in, I get error code 12501. And in logcat the following:

2021-06-27 14:53:05.697 1889-2736/? E/ActivityTrigger: activityResumeTrigger: not whiteListedcom.gforceproductions.bounzyx/com.godot.game.GodotApp/64

Everything worked before when exported from Godot 3.2.3. Is there anything else that changed that I missed?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cgisca/PGSGP/pull/63#issuecomment-869157995, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGCSGI3YKAZRHGGF5Z64INLTU4OKNANCNFSM43OOJKYQ .

GForceProductions commented 3 years ago

Hmm, in Google Cloud Platform the project is already published though, so it should be accessible to anyone. (And I am also in the list of testers, from it the project was in testing)

EDIT: In case it is useful. I have a different version of the app, which was exported using Godot 3.2.3, pointing to the same Google Cloud Project, where signing in works. If I hide the app using the home button, and bring it to the front again, I will also get the "not whitelisted" message in logcat. However, signing in still works then

EDIT 2: I suddenly thought of something, will try it now

GForceProductions commented 3 years ago

Ok it is solved. This is really stupid from me. Problem was: Updating to Godot 3.3.2, also needed updating the android build template. After that, I forgot to add the lines required by the plugin in the AndroidManifest.xml and strings.xml