检查 playerSsign 失败

check playerSSign fail

验证签名时,后台服务器显示{"rtnCode":-1,"errMsg":"check playerSSign fail"} 客户端提供的数据为

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()));
        }
    }
});

} 使用前面的四个数据项和下面的描述文件:

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

后台验证总是出错

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

appId/cpid从agconnect-services.json获取,agconnect-services.json从后台下载

这是什么原因?

下面table描述输入参数的典型设置错误。请验证参数设置。

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