Sdkboxplay Sign in failed on android, error code: 8

Hello,
I’ve recently added SDKboxPlay to my cocos2d-x project and when i try to sign in to google play games on an android device i get this error in the logcat

W/SdkboxGPGAuthentication: sign in failed:8 null

Previously i had this problem:

W/SdkboxGPGAuthentication: sign in failed:4 null

Which I resolved by adding another app to my google play game console, with the same package name, but with my upload certificate instead of my signing certificate, so that i could test google play games in a version that don’t come from the playstore.
After that I’ve seen the account selection UI for the first time, and once I’ve selected my account (enabled for testing) I got that waring in the console (errorCode: 8, that means INTERNAL_ERROR).

I’ve imported sdkbox play using the sdkbox cli, so it should be alright!

Here are some data:

Platform: linux
Cocos2d-x version: 3.17
build mode: release

  _______ ______  _     _ ______   _____  _     _
  |______ |     \ |____/  |_____] |     |  \___/ 
  ______| |_____/ |    \_ |_____] |_____| _/   \_
 Copyright (c) 2016-2018 SDKBOX Inc. v1.0.2.8
 installed packages:
     v2.4.3.3 sdkboxplay
     v2.4.3.3 googleplayservices

If you need somthing else (android.mk, gradle.build, ecc) let me know.

Thanks.
Carlo

Edit:
Created a new cocos2d-x 3.17 project and imported sdkboxplay, nothing else.
Still it does not work

W/SdkboxGPGAuthentication: sign in failed:8 null

My dependencied from build.gradle:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation project(':libcocos2dx')
    implementation 'com.google.android.gms:play-services-ads:15.0.1'
    implementation 'com.google.android.gms:play-services-auth:15.0.0'
    implementation 'com.google.android.gms:play-services-games:15.0.0'
    implementation 'com.google.android.gms:play-services-drive:15.0.0'
}

Manifest:

<?xml version='1.0' encoding='UTF-8'?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.drenlab.xxxxx" android:installLocation="auto">
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-feature android:glEsVersion="0x00020000" />
    <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name">
        <meta-data android:name="android.app.lib_name" android:value="MyGame" />
        <activity android:configChanges="orientation|keyboardHidden|screenSize" android:label="@string/app_name" android:name="org.cocos2dx.cpp.AppActivity" android:screenOrientation="landscape" android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
        <meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/google_app_id" />
        <activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:name="com.google.android.gms.ads.AdActivity" android:theme="@android:style/Theme.Translucent" />
        <activity
            android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
            android:exported="false"
            android:excludeFromRecents="true" />
    </application>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>

strings.xml.

<?xml version='1.0' encoding='UTF-8'?>
<resources>
    <string name="app_name">prova gpg</string>
    <string name="google_app_id">414872731xxx</string>
</resources>

plz do some check with:

  1. http://docs.sdkbox.com/en/plugins/sdkboxplay/v3-cpp/#google-play-check-list
  2. http://docs.sdkbox.com/en/qa/sdkboxplay_troubleshoot/

I integrate the SDKBoxPlay plugin step by step and let you know the result.

Hello!
I’ve followed the checklist step by step, but it was all right.
I do not find any useful information in the troubleshoot for my problem.
I’ve added my manifest to the main post

Has the Sign-in UI displayed?
Have you upload the release-build APK to google console and make Alpha/Beta test AFTER added SDKBoxPlay?

this is play console Create new poject savegame issue.
StateManager.cpp -> remove .EnableSnapshots()
and then sign success

1 Like

this is new Project savegame issue.
remove .EnableSnapshots()

in play console
this is create new poject savegame isuue.
StateManger.cpp —> remove .EnableSnapshots()
and then sign in success.

1 Like

I’ll try this!

I’m sorry but i do not understand, can you explain it better? Thanks

The sign in UI does not display, but my game stops and becomes darker while a loading circle appears (i guess that’s part of the sign in ui).
I uploaded the release-build to google play in alpha test AFTER SDKBoxPlay integration, but the error persists.

Maybe it has something to do with this:
I’ve also integrated firebase in my project, and firebase uses

<string name="google_app_id" translatable="false">1:795086958816:android:XXXXXXXXXXX</string>

So I had to change the google play games app id attribute name in

<string name="gpg_app_id">xxxxxxxxxxx</string>

Of course changed also in the AndroidManifest.
Is this attribute used somewhere else? (Maybe in the SDKBoxPlay sources)

here is a google id conflict soulation. same as your’s.

http://docs.sdkbox.com/en/plugins/firebase/v3-cpp/#json-configuration

Hello!
Thank you for your answer!
If you read carefully that’s exactly what I did!
I’m still stuck then… :frowning:

error code:8

this should be something wrong in app config or google web config.

  1. can you double check keystore’s SHA (http://docs.sdkbox.com/en/qa/sdkboxplay_troubleshoot/#keystore)
  2. compare this sample project, to check project config. https://github.com/sdkbox/sdkbox-sample-cpp317/tree/sdkboxplay

Hello, thanks for your answer,
This is my signing configuration:
I’ve joined two apps to the google play games console:

  1. The one for production, with the google play signing key
  2. The one for test, with my upload certificate, so that i don’t have to upload my app every time i want to test something about google play games

    Here you can see the sha1:
Impronte digitali certificato:
	 SHA1: 8F:7F:55:58:75:9D:A1:48:15:80:7A:7F:D3:A7:XX:XX:XX:XX:XX:XX
	 SHA256: 91:A3:59:F9:29:B1:B6:5E:3E:EC:B0:A2:76:DE:61:29:D4:63:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
Nome algoritmo firma: SHA256withRSA
Algoritmo di chiave pubblica oggetto: Chiave RSA a 2048 bit

Both versions (downloaded from the google play store and installed directly) give me the same problem :frowning:

  1. two apps in google play games console, which one are you use?

  2. use your app config on the sample project is another way.

Hello,
Both apps on the google play games console are linked to the same google play app (same package name), the only thing that changes is the key (one for debug and one for production) but both ones don’t work.
(I’ve tried with one app linked but it does give me the same problem!)
I do not understand point nr. 2

Did you manage to fix this!? I’m experiencing the same issue :frowning:

Still stuck :frowning:
Hoping that someone can help us! :persevere:

Created a clean 3.17.1 project just with a single signin(). Also repeated all steps in google console… yet again… error 8 :frowning: