playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.46k stars 964 forks source link

Authentication succeeds but then silently signs out after Unexpected response code 403 #3063

Closed AlexPanayiotou closed 2 years ago

AlexPanayiotou commented 3 years ago

We are getting reports from some of our players that they cannot connect to google play games. Based on the reports, this has started happening around 1 month ago, but we haven't made a changes to the authentication process or updated the plugin in over a year. From the logs we got it sounds similar to #2857, although it could be a completely different cause or issue.

Based on the logs the authentication has been successful but then we get an Unexpected response code 403 and it signs out.

08-23 13:11:42.949 7562 19572 E Volley : [21454] NetworkUtility.b: Unexpected response code 403 for https://www.googleapis.com/drive/v2beta/apps/self?prettyPrint=false&fields=id 08-23 13:11:42.956 7562 26408 W NetworkResponseErrorDec: StatusCode:403 Reason:[accessNotConfigured] Location:[] 08-23 13:11:42.984 30784 30851 I Unity : Calling Signout in token client

More info about the issue:

Full logs adb-logs.txt

ozdemir08 commented 3 years ago

We have checked our logs for your game and everything looks pretty normal. The account in the bug report though, looks to be invalid, which could happen due to a bunch of various reasons. Also, we had an internal migration and are not making any calls to drive/v2beta now.

If you could get a full bug report from another player, I am happy to look into it more. But, so far I would say everything looks good on our side.

AlexPanayiotou commented 3 years ago

Thank you for checking it up. What makes the account invalid? Is there a something we can do about it? Also could the internal migration fix the issue? Would not making calls to drive/v2beta, prevent the client from getting the Unexpected response code which seems responsible for the automatic sign out?

We also have logs for another player who was experiencing this issue, if they can help. sign-in-logs.txt

ozdemir08 commented 3 years ago

Thanks for sharing that. I am circulating this into the team.

AlexPanayiotou commented 2 years ago

Hello, any news regarding this? Our players are still reporting that they are having trouble connecting to google play games. We got some new adb-logs recently but something new appeared It seems as if it is doing 2 sign in requests the first one is successful and on the second it fails due to cloud saves

SignInPerformer-50: Game does not cloud save APIs. Skipping creation and connection to Internal Drive API. [CONTEXT service_id=1 ] Volley : [23025] cnp.b: Unexpected response code 403 for https://www.googleapis.com/drive/v2beta/apps/self?prettyPrint=false&fields=id NetworkResponseErrorDec: StatusCode:403 Reason:[accessNotConfigured] Location:[] GamesServiceGacFactory: Failed to connect. Connection result [cdw{statusCode=INTERNAL_ERROR, resolution=null, message=null}] [CONTEXT service_id=1 ] SignInPerformer-51: Internal error occurred during sign-in. Failed to enable Cloud Save. [CONTEXT service_id=1 ] PlayGamesServices[SignInPerformer]: Internal error occurred during sign-in. Failed to enable Cloud Save. SignInPerformer-51: Reporting unresolvable error for [com.nextgames.android.twd] [CONTEXT service_id=1 ]

Which is weird as have not enabled Cloud Save.

More info on the logs. adb-logs-filtered.txt

adb-logs-full.txt

eantaev commented 2 years ago

Hi Alex,

It seems like the game requests OAuth2.0 scope "https://www.googleapis.com/auth/drive.appdata" (either via EnableSavedGames or via AddOauthScope(scope)) However, "Saved games" feature is not enabled in Play Dev Console. This leads to sign-in failure.

Please let us know if this is not the case and the game does not call neither EnableSavedGames nor AddOauthScope("https://www.googleapis.com/auth/drive.appdata") when configuring a client.

AlexPanayiotou commented 2 years ago

Hello and thanks for the reply. The game does not use either EnableSavedGames or AddOauthScope(scope) The initialization happens by just calling PlayGamesPlatform.Activate(); which from my understanding uses the default configuration which has both of them disabled. Also the weird thing is that only some of the players are having issues connecting to the game.

eantaev commented 2 years ago

Alex, thank you for confirming that the game does not request additional scopes. The issue was on our side. Please let us know if it appears again - i.e. sign-in fails because of cloud save.