1
votes

When verifying the signature, the background server displays {"rtnCode":-1,"errMsg":"check playerSSign fail"} The data provided by the client is

if(huaweiid != null){
PlayersClient player = Games.getPlayersClient(this, huaweiid);
player.getCurrentPlayer().addOnSuccessListener(new OnSuccessListener<Player>() {
    @Override
    public void onSuccess(Player player) {
        String ts = player.getSignTs();
        String playerId = player.getPlayerId();
        int playerLevel = player.getLevel();
        String playerSign = player.getPlayerSign();
        //String displayName = player.getDisplayName();
        //Uri hiResImageUri = player.getHiResImageUri();
        //Uri iconImageUri = player.getIconImageUri();
        JSONObject jo = new JSONObject();
        try {
            jo.put("signTs", ts);
            jo.put("playerId", playerId);
            jo.put("playerLevel", playerLevel);
            jo.put("playerSign", playerSign);

            EditText ed = findViewById(R.id.editText);
            ed.setText(jo.toString());
            Log.i("huawei user info", jo.toString());
        } catch (JSONException e) {
            e.printStackTrace();
            Log.i("huawei user info", Objects.requireNonNull(e.getMessage()));
        }
    }
});

} Use the preceding four data items and the following description document:

https://developer.huawei.com/consumer/cn/doc/HMSCore-References-V5/verify-login-signature-0000001050123503-V5

An error always occurs during the verification in the background.

{"rtnCode":-1,"errMsg":"check playerSSign fail"} 

appId/cpid is obtained from agconnect-services.json and agconnect-services.json is downloaded from the background.

what’s the reason?

1

1 Answers

0
votes

The following table describes the typical setting errors of the input parameters. Please verify the parameter settings. enter image description here

https://developer.huawei.com/consumer/cn/doc/development/AppGallery-connect-Guides/faq-check-login-0000001050746133-V5