playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.43k stars 953 forks source link

GPGS 0.11.01 doesn't allow all testers to login #3168

Open DonCrowell opened 2 years ago

DonCrowell commented 2 years ago

Describe the bug Upgraded to GPGS 0.11.01 for Unity (Followed directions provided on github). Able to log in using 1 account. Unable to use other accounts listed as testers in Google Play Console. Double and triple checked account settings in play console, they are correct and were working under previous versions of plugin. Deleted game caches for the accounts as well.

Using logcat found error to be: "Returning Error Code". After tracing GPGS code, there is no way an error code can be returned, only a true/false flag if you are authenticated.

To Reproduce Steps to reproduce the behavior:

  1. Attempt login
  2. See in logcat the error above

Expected behavior All accounts can log in.

Observed behavior Not all accounts can log in

Versions

mspacemedia commented 2 years ago

Similar pattern here, tried using vanilla code

PlayGamesPlatform.Instance.Authenticate(ProcessAuthentication);

And Gley Games Easy Acheivements

GameServices.Instance.LogIn(LoginResult);

Neither are able to login/they show the 'Returning Error Code' and nothing else.

Versions

Unity version: 2022.1.5f1
Google Play Games Plugin for Unity version: 0.11.01
battleheroio commented 2 years ago

I have had the same error. For some reason the automatic authentication does not work. With the manual if it works for me:

PlayGamesPlatform.Activate(); 
PlayGamesPlatform.Instance.ManuallyAuthenticate(OnSignInResult);
kustomphaq commented 2 years ago

Any luck guys? I am stuck on this with Unity 2021.3.4f1 Once i solved external dependencies I get always this error in runtime:

Captura de Pantalla 2022-06-24 a las 14 55 18

I am getting mad with this, the stranger thing is what it worked in last version of my open beta game.

mspacemedia commented 2 years ago

image This is what I found…

kustomphaq commented 2 years ago

image This is what I found…

where you found it? :O

mspacemedia commented 2 years ago

It was on the Unity website itself… I found it via a Google search.

barissmutluuu commented 1 year ago

Same issue. When we build, users can sign in but when it is internal they can't.

Unity 2021.3.2 GPGS 0.11.01

sampenguin commented 1 year ago

I am now experiencing this as well with Unity 2019.4.40f1.

Downgraded back to 10.14 version of the plugin and refactored code to that way of Initializing and Authenticating... now it works. Go figure.

hex commented 1 year ago

Any updates on this issue?

ozdemir08 commented 1 year ago

Could you provide a bug report where you can sign in with one account and can't with another?

DonCrowell commented 1 year ago

We have solved this by upgrading our version of the Unity Authentication package to 2.1+. Works as intended now. See this thread for more info: https://forum.unity.com/threads/google-play-authentication.1266272/

shawnzhang commented 1 year ago

I got the same issue. I was following the Google Play Game Services document and then following the Unity Authentication document, but my Android App still could not sigin to GPGS. The debug information just till "Social.localUser.Authenticate(OnGooglePlayGamesLogin);" or "PlayGamesPlatform.Instance.Authenticate(success =>". It means after call the authenticate function the app never get result.

I use Unity 2022.1.22f1 and try on both Google Plugins such as 0.10.14 and 0.11.01.

happaro commented 1 year ago

It finally helps me:

In Google Cloud -> Credentials -> OAuth 2.0 Client IDs -> SOME CLIENT ID I've changed SHA-1 key.

There is two SHA-1 keys in Google Play Console -> Setup -> App integrity -> App signing

- App signing key certificate (which recommended when you are creating client) - Upload key certificate

I had first one in oath client and changed to second one. It works for me. Hope it helps someone

Source: https://github.com/playgameservices/play-games-plugin-for-unity/issues/2878

Shaswath31 commented 11 months ago

The issue is that the app you download build from Unity and the app you download from google will have different SHA-1 fingerprints. So, all you have to do is to create another OAuth 2.0 Android ID with the release SHA-1 fingerprint which is available under: Setup -> App Signing -> App Signing Key certificate.

Nextoor commented 11 months ago

The issue is that the app you download build from Unity and the app you download from google will have different SHA-1 fingerprints. So, all you have to do is to create another OAuth 2.0 Android ID with the release SHA-1 fingerprint which is available under: Setup -> App Signing -> App Signing Key certificate.

Shaswath31, I'm suffering this problem, and since it's the first game I'm developing, I don't quite understand how to solve it. Could you please tell me the steps to generate this credential and configure it in Unity so that GPGS works in the app? thank you very much.

Faseh-alam commented 4 months ago

Any luck guys? I am stuck on this with Unity 2021.3.4f1 Once i solved external dependencies I get always this error in runtime:

Captura de Pantalla 2022-06-24 a las 14 55 18

I am getting mad with this, the stranger thing is what it worked in last version of my open beta game.

getting the same error can i get some help been stuck on this from 4 days

mohammaddabiri commented 4 months ago

I have had the same error. For some reason the automatic authentication does not work. With the manual if it works for me:

PlayGamesPlatform.Activate(); 
PlayGamesPlatform.Instance.ManuallyAuthenticate(OnSignInResult);

This workaround worked for us too.

njelly commented 3 months ago

The issue is that the app you download build from Unity and the app you download from google will have different SHA-1 fingerprints. So, all you have to do is to create another OAuth 2.0 Android ID with the release SHA-1 fingerprint which is available under: Setup -> App Signing -> Apps Signing Key certificate.

This was my issue, thank you for your comment.

When I initially set up the Android application in the google cloud dashboard, I believe the fingerprint came from the keystore I've been using for development builds. That worked for the builds I made locally on my dev pc and with the builds that I downloaded from Unity cloud build (since they are signed the same way). I assumed it would work for my testers.

However, when I distributed my app to testers through the google play console, I hadn't realized the app was being resigned and now the fingerprint I was using in the Android app on the google cloud dashboard didn't match the client's signature.

When I navigated to Setup -> App Signing -> Apps Signing Key certificate and copied the the fingerprint, then navigated back to my Android app in the google cloud dashboard and pasted the new fingerprint over the existing one, the build I downloaded from the play store was immediately able to authenticate.

Hope that detailed answer helps someone! Of course, now builds that I sign locally no longer authenticate successfully... which is annoying...

Shaswath31 commented 2 months ago

@njelly Your local builds can still be made to work. You will just need to generate one more OAuth client with the debug key SHA-1 fingerprint and add this to your Play Games Configuration on the Developer Console. So now both the keys can authenticate successfully.

The issue is that the app you download build from Unity and the app you download from google will have different SHA-1 fingerprints. So, all you have to do is to create another OAuth 2.0 Android ID with the release SHA-1 fingerprint which is available under: Setup -> App Signing -> Apps Signing Key certificate.

This was my issue, thank you for your comment.

When I initially set up the Android application in the google cloud dashboard, I believe the fingerprint came from the keystore I've been using for development builds. That worked for the builds I made locally on my dev pc and with the builds that I downloaded from Unity cloud build (since they are signed the same way). I assumed it would work for my testers.

However, when I distributed my app to testers through the google play console, I hadn't realized the app was being resigned and now the fingerprint I was using in the Android app on the google cloud dashboard didn't match the client's signature.

When I navigated to Setup -> App Signing -> Apps Signing Key certificate and copied the the fingerprint, then navigated back to my Android app in the google cloud dashboard and pasted the new fingerprint over the existing one, the build I downloaded from the play store was immediately able to authenticate.

Hope that detailed answer helps someone! Of course, now builds that I sign locally no longer authenticate successfully... which is annoying...