IT TIP

Google Play 게임 서비스-로그인 할 수 없음

itqueen 2020. 12. 1. 20:20
반응형

Google Play 게임 서비스-로그인 할 수 없음


어제의 Google I / O 기조 연설 직후에 내 앱 중 하나에 게임 서비스를 통합하기 위해 Android SDK를 업데이트했습니다.

지금까지 내가 한 일 :

  1. Dev Console (게임 서비스)에 내 앱을 추가하고 연결했습니다.
  2. 내 앱 / 매니페스트에 OAuth 클라이언트 ID를 포함했습니다.
  3. 추가 BaseGameActivityGameHelper내 프로젝트에 ( GitHub에서 )
  4. 내 프로젝트에 google-play-services 라이브러리를 추가했습니다.
  5. 확장 BaseGameActivity, 추가com.google.android.gms.common.SignInButton

게임 메타 데이터와 몇 가지 성과도 설정했습니다. 개발 콘솔에 출시 할 준비가되었다고 표시됩니다. 로그인 흐름과 성과를 테스트하기 위해 두 개의 Google+ 계정을 테스트 사용자로 추가했습니다.

하지만 SignInButton을 테스트하면 Unknown error 경고가 나타납니다 . 다음은 logcat입니다.

ERROR/Volley: il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/me
ERROR/SignInIntentService: Access Not Configured
ERROR/LoadSelfFragment: Unable to sign in - application does not have a registered client ID

ProGuard와 올바른 인증서를 사용하여 프로덕션 모드에서 애플리케이션을 빌드했습니다.

내가 뭘 놓 쳤니?

업데이트-더 많은 시도

그 동안 내가 시도한 것에 대한 간략한 개요는 다음과 같습니다. 도움이되지 않았습니다.

  • 연결된 Android 앱 항목을 제거하고 다시 만듭니다 (이중 확인 된 인증서 지문).
  • 불법 복제 방지 비활성화
  • 프로 가드 건너 뛰기
  • 새 (테스트) 게임을 만들고 클라이언트 ID 사용

문제는 테스트 용 계정 섹션 과 관련이 없습니다 . 테스트에 사용할 수없는 계정을 사용하면 다른 오류 메시지가 표시됩니다.

E/GameAgent: Unable to retrieve 1P application 547xxxxxx457 from network
E/CheckGameplayAcl: Unable to load metadata for game

Hartok의 솔루션!

Hartok의 솔루션은이 문제를 해결하는 데 많은 도움이되었습니다. 이전에 Google API 콘솔을 방문한 적이 없습니다 . 게임에서 연결된 앱을 제거하거나 게임을 삭제할 때 (개발 콘솔에서) OAuth 클라이언트 ID가 삭제되지 않는다는 점을 아는 것이 중요합니다. API 콘솔을 방문하여 수동으로 제거해야합니다.

자동 선택된 SHA1 지문은 (항상) 잘못되었습니다! 직접 찾아봐야합니다.

keytool -exportcert -alias <your-alias> -keystore <path-to-keystore> -list -v

내 (올바르게) 연결된 앱의 새 클라이언트 ID는 89xxxxxxxx73-2u6mXXXXXXXXXXXXXXXXXXX8903.apps.goo...이전과 같이 12 자리 숫자가 아니라 처럼 보였습니다 . 마침내 대시와 영숫자를 제외하고 12 자리 숫자 만 사용해야한다는 사실을 알아 냈습니다.


이 문제를 해결했습니다.

제 경우에는 앱 (아직 게시되지 않음)을 Google Play 게임 서비스 프로젝트에 연결했을 때 Google Play에서 자동으로 선택한 인증서 지문이 좋지 않았습니다.

이 문제를 해결하기 위해 Google API 콘솔 에서 내 앱 클라이언트 ID를 삭제하고 앱 연결을 해제 한 다음 적절한 인증서 지문으로 다시 연결했습니다. 이 지문은 Eclipse에서 앱을 내보낼 때 표시됩니다 (ADT 플러그인이 최신 상태 인 경우).

도움이 되었기를 바랍니다.


같은 문제가있었습니다. 내 솔루션은 Dev Console에서 동일한 패키지를 두 번 연결하는 것이 었는데, 첫 번째는 내 인증서의 SHA1 지문을 사용하고 두 번째는 내 디버그 키 SHA1을 사용했습니다.

나는 이것 전에 하나 또는 다른 하나만 사용해 보았지만 어느 쪽에도 효과가 없었습니다.


긴 2 주 동안이 문제를 해결하려고 노력한 끝에이 문제를 해결하기위한 단계를 만들고 동일한 문제를 겪고있는 모든 사람과 공유하기로 결정했습니다. 테스트에 사용됩니다. 게시 시간이되면 앱 게시 단계를 공유하고 Google Play 게임 서비스에서 작동하는지 확인하겠습니다.

내가하려는 모든 작업은 서명 후 발생해야하는 작업에 대한 조치없이 Google 로그인 버튼을 사용하여 로그인하는 것뿐입니다. 또한 Google play 예제의 BaseGameUtils를 라이브러리로 사용했으며 선택한 IDE를 사용했습니다. 이 모든 작업을 수행하기 위해 Eclipse가있었습니다.

다음은 이클립스를 사용하는 단계입니다.

1- Eclipse 작업 공간의 라이브러리로 BaseGameUtils를 가져오고 가져 오기 후 오류가 발생하지 않는지 확인하십시오. 오류가 발생한 경우 다음을 수행하십시오.

a- 프로젝트 탐색기에서 BaseGameUtil 프로젝트를 마우스 오른쪽 버튼으로 클릭합니다.

자바 빌드 경로를 b- 클릭

c- 클릭하여 거기에서 외부 jar를 추가하고 SDK 위치로 이동하여 Google-Play-services.jar을 찾습니다.

d- 선택하고 확인을 클릭하십시오 ---> JAR 및 클래스 폴더 창에 추가 된 jar가 표시되어야합니다.

라이브러리 오른쪽에있는 주문 및 내보내기 탭으로 이동하여 "Android 비공개 라이브러리"및 "Android 종속성"이 선택되어 있는지 확인하고 google-play-services.jar도 선택되었는지 확인합니다.

2- 이제 사용하려는 앱에서 가져온 BaseGameUtility를 올바르게 참조하는지 확인하십시오. "간단한 hello world 애플리케이션을 만들어 테스트 할 수 있습니다."이제 다음과 같이 hello world 애플리케이션에서 BaseGameUtility를 참조합니다.

(중요한 것은 hello world와 BaseGameUtil이 모두 같은 드라이브에 있는지 확인하십시오. 두 개의 드라이브가 작동하지 않습니다)

프로젝트 탐색기의 오른쪽에있는 hello world 애플리케이션을 마우스 오른쪽 버튼으로 클릭합니다.

Java 빌드 경로를 b- 클릭하십시오.

라이브러리에서 c- 클릭

d- 외부 또는 내부 소스에서 필요한 경우 android support-v4 추가 (필수 아님)

e- 클래스 폴더 추가를 클릭하여 기본 게임 utils .jard를 추가하고-> BaseGameUtilProject를 선택한 다음 / bin 폴더를 선택합니다-애플리케이션으로 가져와야합니다

필요한 경우 외부 소스에서 google-play-services.jar를 f-add합니다.

g-in "order and export"는 기본적으로 선택되어야하는 일반 SRC 및 GEN과 함께 다음이 선택되었는지 확인합니다.

3- 이제 java 파일 helloworld.java에서 기본 화면에 필요한 모든 가져 오기가 있는지 확인한 다음 BaseGameUtil을 확장하고 프로젝트가 ViewOnClickListener를 구현하는지 확인하십시오.

4- 다음을 포함하도록 Android 매니페스트를 편집합니다.

 <meta-data android:name="com.google.android.gms.games.APP_ID"
        android:value="@string/app_id" />

<uses-permission android:name="android.permission.INTERNET"></uses-permission>

5- 애플리케이션 ID를 생성 한 후 포함 할 ids.xml 파일이 리소스에 있는지 확인합니다.

<string name="app_id"></string>

나중에 응용 프로그램 ID를 입력해야하므로 지금은 공백으로 둘 수 있습니다.

개발자 콘솔에이 애플리케이션을 추가하기 전에 Eclipse IDE에있는 디버그 키를 6- 복사하십시오. 이클립스에서 그렇게하는 것은 다음과 같이 발생합니다.

a- 창을 클릭합니다. b- 안드로이드를 선택합니다. c- 클릭 빌드를 선택합니다. d- SHA1 지문을 복사하고 개발자 콘솔에서 앱을 만들 때 사용할 수 있도록 보관합니다.

7- 개발자 콘솔에서 게임을 만들고 6 단계에서 검색 한 SHA1을 사용합니다.

8- 5 단계에서 강조 표시된 ids.xml에 애플리케이션 ID를 배치합니다.

9- 값을 다시 확인하고 개발자 콘솔과 매니페스트 파일간에 패키지 이름이 모두 올바른지 확인합니다.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
**package="com.helloword.check"**
android:versionCode="1"
android:versionName="1.0" >

10- 완료되면 개발자 콘솔의 애플리케이션이 keytool을 사용하여 개발자 콘솔에 할당 된 SHA1과 일치하는지 확인합니다. 이건 제가 알아 내기 위해 2 주가 걸린 단계입니다.

a- hello world 프로젝트의 bin 폴더에서 애플리케이션 APK를 찾아 다른 위치에 복사하여 나중에 키 도구로 ID를 확인합니다.

b-locate your keytool-> 일반적으로 컴퓨터의 JAVA 폴더 아래에 있습니다. 제 경우에는 C : \ Program Files \ Java \ jdk1.7.0_09 \ jre \ bin에있었습니다.

c- 임시 위치에서 APK 추출

d- 다음 명령을 실행하십시오.

keytool -printcert -file "TempLocation \ Meta-INF \ CERT.RSA"

SHA1 및 SHA256과 함께 MD5가 제공됩니다.

SHA1이 개발자 콘솔의 것과 일치하는지 확인합니다.

11- 개발자 콘솔에서 SHA1을 확인하는 방법은 다음과 같습니다.

a- 게임 서비스로 이동

b- 우리의 경우 helloWorld에서 게임 이름을 클릭하십시오.

c- "API 콘솔 프로젝트"까지 아래로 스크롤합니다.

d- "이 게임은 helloworld라는 API 콘솔 프로젝트에 연결되어 있습니다."가 표시되어야합니다.

e- helloworld는 하이퍼 링크 여야합니다.

f- 그러면 Google APis 콘솔이 열립니다.

g- APconsole에서 API 액세스를 클릭합니다.

h- "설치된 애플리케이션의 클라이언트 ID"까지 아래로 스크롤하면 SHA1이 10 단계에서 이전에 키 도구에서 생성 된 것과 동일한 지 확인해야합니다. (일치하지 않는 경우 개발자 콘솔에서 게임을 삭제하고 올바른 SHA1로 다시 만들어야합니다.) "Google API 콘솔에서 SHA1을 변경하면 문제가 발생할 수 있습니다.

패키지 이름이 Android 매니페스트에서 동일한 패키지 이름인지 확인합니다. 즉, 패키지 이름이 언급되는 모든 곳에서 "설치된 애플리케이션의 클라이언트 ID"에있는 것과 일치하는지 확인합니다 (제 경우에는 내 매니페스트의 4 행)

이제 Google Play 게임 서비스를 사용하여 로그인을 테스트 할 수 있습니다.


In Step 3. Generate an OAuth 2.0 client ID it specifically gives a warning as follows:

Warning: Do not open the Google APIs Console directly and manually add your Client IDs on that page. Doing so might cause errors when you send requests to the game services.

So my experience was that you need to follow the guide religiously: Setting Up Google Play Game Services with the Google Play Developer Console


I was fighting this problem a lot. Changes in Google APIs Console only break OAuth Client ID- don't touch it. The only solution for me was to create new game service and connect signed apk with normal(not debug) key- because once you add apk with any key, if you will try again to add it with different key it will not work. Deleting game will not work, google will still remember the package name. You can try to change apk package name (of course it is not the best idea) and try again but it is not always work.

So once you will have this problem the best solution is to change apk package name and create new game service - this for sure always work- and please be careful with the game service name - don't make it with name you used earlier - it will mess up everything.

From few problems I have got with this service the funniest is that I now have my apk connected with game service but it is not listed in it and I cannot add it because of an error:This client ID is globally unique and is already in use- I think that client ID is not an OAuth ID - I cannot delete it - there is no such option- and maybe this is a root problem of what we got here.


Make sure that the ID that you enter in the meta-data is your app id, not your client id. And you can't hardcode it, as it must be an string, you must specify it in your resources and then reference it in your manifest.

Read this for more info:

https://developers.google.com/games/services/console/enabling#c_specify_client_id_settings

Note: For Android, you do not need to include the full client ID in your application, as it will be derived automatically from the application ID.


I'm experiencing similar issues and I see that this page was updated on 30th May 2013:

https://developers.google.com/games/services/android/troubleshooting

It may help some of us.


Guy, Have you correctly set up your account for testing ?

See https://developers.google.com/games/services/console/testpub#enabling_accounts_for_testing

If your game is in an unpublished state, you must whitelist the user accounts that you want to grant access for testing. Otherwise, your testers will encounter OAuth and 404 errors when attempting to access the game services endpoints.

This was the missing step for me. After that I didn't get those errors anymore :

E/GameAgent: Unable to retrieve 1P application 547xxxxxx457 from network
E/CheckGameplayAcl: Unable to load metadata for game


The trick that worked for me was to publish game services configuration since I already had an APK published for alpha testing.

For more details see paragraph "Other causes" in troubleshooting https://developers.google.com/games/services/android/troubleshooting


Hartok's approach was helping me aswell, however "You might need to delete the projects from google api console." this sound sufficient, but it's not , at least not for me. Google has little "undelete" function in API Console. You can simply restore everything , this means they store your SHA-1 keys, but flagged as deleted(?). What worked for me to use the debug key again, which was also blocked, is that I undeleted all my test projects and manually deleted all OAuth Keys within "API Access" option from all those deleted projects, after that I could use my debug key again. Hope that helps someone...


Here's a checklist:

  1. First check if you haven't done any silly mistake or mismatches described on https://developers.google.com/games/services/android/troubleshooting
  2. A common problem is a conflicting 'app_id' resource id, for instance, if you're using a Facebook SDK it might be using a key with the same name, so double check that and rename the other ones in case you find conflicts. (I would keep the 'app_id' allocated to this project, as the BaseGameUtils library refers to it as 'app_id' in some source code I checked).

  3. Although the docs refer to 'Google Developers Console' don't play smart and try to add the Client ID's from there. Although, at the end, the Client ID's will be also end up there. There's a small note that can be easily misread:

You must create the new client ID in the Google Play Developer Console, not in the Google Developers Console.

  1. So based on this note, create your Client IDs only from the Google Play Developer Console, in other words, by 'Adding a linked app'. So you would usually create 2 linked apps one for using the 'debug.keystore' (using the same package, but with different fingerprints) and another 'linked app' for the 'production' keystore, yet using the same package, but with different fingerprints.

I think this covers all, most people might find themselves in a trap, as all looks fine in Google Developer Console, but in fact, they've probably missed the steps 3 and 4 above.


Thanks to Sachin Chavan finally solved it, the problems was:
1. Google play took the wrong sha1.
2. Tried to add it from the Google Developer Console - didnt work.
After looking at Sachin Chavan post and link, I saw you can link same app from Google Play Console multiple times, so I took the alias SHA1 with:

keytool -exportcert \
-alias <your-key-name> \
-keystore <path-to-production-keystore> \
-list -v

and the debug SHA1 with:

keytool -exportcert \
-alias androiddebugkey \
-keystore <path-to-debug-keystore> \
-list -v

I linked the app two more time, first time I entered the alias SHA1 and the second time the debug SHA1, after day of alot of errors, that solved it (the stages in bold).


Still not working for me. Google did a full reset of my Google Play Game Services, and did step by step the integration. Still said i doesn't have a registered google client ID. Pretty a failure, considering 3 years to make Google Play Games Services.

Last thing, account with @googlemail.com are not recognized, you can't export the IDs of the achievements (you need to copy past the html, when you have 40 achievements, it's quite a pain).

05-22 00:35:57.914: I/dqi(11166): I/O exception (org.apache.http.NoHttpResponseException) caught when processing request: The target server failed to respond 05-22 00:35:57.914: I/dqi(11166): Retrying request 05-22 00:35:58.135: E/Volley(11166): [506] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/me 05-22 00:35:58.195: E/Volley(11166): [506] il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/me 05-22 00:35:58.205: E/SignInIntentService(11166): Access Not Configured 05-22 00:35:58.205: E/SignInIntentService(11166): aol 05-22 00:35:58.205: E/SignInIntentService(11166): at ajy.a(SourceFile:108) 05-22 00:35:58.205: E/SignInIntentService(11166): at abm.a(SourceFile:213 05-22 00:35:58.205: E/SignInIntentService(11166): at abm.a(SourceFile:194) 05-22 00:35:58.205: E/SignInIntentService(11166): at aav.a(SourceFile:486) 05-22 00:35:58.205: E/SignInIntentService(11166): at aqu.a(SourceFile:221) 05-22 00:35:58.205: E/SignInIntentService(11166): at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:343) 05-22 00:35:58.205: E/SignInIntentService(11166): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65) 05-22 00:35:58.205: E/SignInIntentService(11166): at android.os.Handler.dispatchMessage(Handler.java:99) 05-22 00:35:58.205: E/SignInIntentService(11166): at android.os.Looper.loop(Looper.java:137) 05-22 00:35:58.205: E/SignInIntentService(11166): at android.os.HandlerThread.run(HandlerThread.java:60) 05-22 00:35:58.205: E/LoadSelfFragment(15328): Unable to sign in - application does not have a registered client ID

In my case I forgot to change package name in AndroidManifest.xml; that was all. I think this should be checked first.


Please, try this:

  1. Register your app as testing (if not published yet) (on Google developer site).
  2. Make some testing user id and register them over there.
  3. Now write your SHA1 id there.
  4. Note down your developer id generated by Google.
  5. Put it at appropriate place in your app.

If you already do that then follow this most important step.

6 - Now export your app with same keystore and now install it in your device (in which you have logged as tester id, registered on Google).
Now surely you will access Google real time server with out any error.


Version ID! I had to change my version ID to a value greater than my most recent release. Suddenly I could log in!

For me, I was using a Sample (Button Clicker) and disguising it as one of my released apps. I probably still had to do all the SHA1 changing stuff since it seemed to be off, but the change that tipped in my favor was updating the version id to 3 since the sample starts at 1 and my real/published app was set at 2.


For me debug signing is working, signed not ;/ Can we contact google about this ? I have spend my all day on it;/ I get "there is no linked app associated with this client ID" but both of them are in Google Api under the right project.

Also i accidentally have two linked and published apps pointing into the same app_ID in developer console, both published and cannot be removed.


Please check the internet connection when the app is running. If you are not connected, this error message is logged.

참고URL : https://stackoverflow.com/questions/16580885/google-play-game-services-unable-to-sign-in

반응형