MrStahlfelge/gdx-gamesvcs

GPGS Android: UserRecoverableAuthException: NeedPermission

PromanSEW opened this issue · 11 comments

I configured my app by Wiki and Google Play Services sdocumentation, but I cannot to sign in
I get the following message in logcat:

W/GamesAuthenticator: Failed to sign in silently
    com.google.android.gms.auth.UserRecoverableAuthException: NeedPermission

How to fix this error?

I use explicit method logIn() by clicking the button

I tested Honor Play, request permission was shown, and login is successful. But on Samsung Galaxy S10e (Android 10) I have this error, and permission request is not showing

That's the normal flow. GpgsClient shows the login request dialog if the silent login fails, but only if you called logIn(). As you do so, please check logcat or via debugger from this line on why the log in does not work:

The Google Play Games app is installed on the S10?

The Google Play Games app is installed on the S10?

Yes

Logs (GPGS):

2019-12-25 20:33:06.252 22677-22785/? I/GPGS: Trying to connect with autostart false
2019-12-25 20:33:07.579 22677-22677/? I/GPGS: onConnectFailed: 4
2019-12-25 20:34:38.061 22677-22677/? I/GPGS: SignInResult - Unable to sign in: 0 <-- Here I pressed Back button
2019-12-25 20:34:38.068 22677-22785/? I/GPGS: Trying to connect with autostart true
2019-12-25 20:34:38.403 22677-22677/? I/GPGS: onConnectFailed: 4
2019-12-25 20:34:38.403 22677-22677/? I/GPGS: Retrying to connect...
2019-12-25 20:34:38.830 22677-22677/? I/GPGS: onConnectFailed: 4

Logs (Google Play Services):

2019-12-25 20:41:01.575 7639-16436/? W/GamesServiceBroker: Client connected with SDK 12451000, Services 19831039, and Games 144490048
2019-12-25 20:41:01.610 7639-7639/? W/GamesLogHelper: Failed to log event: bmo{statusCode=INTERNAL_ERROR, resolution=null, message=null}
2019-12-25 20:41:01.627 7639-7639/? W/GamesLogHelper: Failed to log event: bmo{statusCode=INTERNAL_ERROR, resolution=null, message=null}
2019-12-25 20:41:01.648 7639-7639/? W/GamesLogHelper: Failed to log event: bmo{statusCode=INTERNAL_ERROR, resolution=null, message=null}
2019-12-25 20:41:01.747 7639-7639/? W/GamesLogHelper: Failed to log event: bmo{statusCode=INTERNAL_ERROR, resolution=null, message=null}
2019-12-25 20:41:01.749 7639-7639/? W/GamesLogHelper: Failed to log event: bmo{statusCode=INTERNAL_ERROR, resolution=null, message=null}
2019-12-25 20:41:01.952 7639-7639/? W/GamesLogHelper: Failed to log event: bmo{statusCode=INTERNAL_ERROR, resolution=null, message=null}
2019-12-25 20:41:01.976 7639-7639/? W/GamesLogHelper: Failed to log event: bmo{statusCode=INTERNAL_ERROR, resolution=null, message=null}
2019-12-25 20:41:02.218 7639-29565/? W/GamesAuthenticator: Failed to sign in silently
    com.google.android.gms.auth.UserRecoverableAuthException: NeedPermission
        at bju.a(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):13)
        at bjx.a(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):6)
        at bjx.b(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):3)
        at bjt.a(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):3)
        at caq.a(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):1)
        at cac.c(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):15)
        at dqt.c(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):1)
        at cac.c(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):1)
        at cac.b(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):1)
        at dqt.a(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):3)
        at duz.a(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):5)
        at czv.d(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):10)
        at czv.a(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):262)
        at czv.b(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):22)
        at cxy.c(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):2)
        at eba.a(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):24)
        at eba.a(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):138)
        at bky.a(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):8)
        at bkv.run(:com.google.android.play.games.services@144490040@2019.11.14449 (285495469.285495469-000400):1)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)
2019-12-25 20:41:02.219 7639-7639/? W/GamesLogHelper: Failed to log event: bmo{statusCode=INTERNAL_ERROR, resolution=null, message=null}

@MrStahlfelge I provided logs
resumeSession() in Game.create() also has no effect

I can't see anything in the logs, so best is if you check with the debugger
Is the account on the S10 the same as on the other phone? Most sign in problems are caused by not adding certain accounts to beta test with unpublished GPGS projects.

Both accounts are added

Did you try if any other game can sign in on the device?

Other games work fine

Sorry, can't give you further assistance here. I doubt that it is a problem with the lib, so you should ask in general Android/GPGS help channels.