Error 6003 when calling HMS SDK interface

Time:2020-10-15

For games or common applications integrated with Huawei HMS SDK, the calling interface (such as the getcurrentplayer login interface) always reports an error of 6003. The error codeOfficial documentsThe signature certificate fingerprint is mainly used to verify the authenticity of the application and ensure that the application comes from a trusted source.

In view of this problem, we can check it from the following four points:

  • Check whether the certificate signature used by the current application is consistent with the Huawei background configuration.
  • Check whether the appid parameter in the manifest file is normal.
  • Check for secondary signature or reinforcement.
  • Check whether Huawei signature service is used.

Checkpoint 1: check whether the signature certificate information of the application is consistent with the Huawei background configuration.

  1. Open the APK of the application, unzip the “meta-inf” folder, and get the“ CERT.RSA ”File, via keytool – printcert – file meta-inf/ CERT.RSA Command to print the signature certificate information.
  2. Refer to the configuration signing certificate documentCheck the fingerprint of sha256 certificate configured in the background. If the information is consistent with the above, it is normal.

Error 6003 when calling HMS SDK interface
Note: do not use the debug version of keystore signature package, please use the official version of the package and use the real machine (not simulator) for testing.

Checkpoint 2: check whether the appid parameter in the manifest file is correct

Self inspection can be carried out in the following ways:

  • Check whether the appid configured in the manifest file in the project is correct.
  • Use the decompiler tool to view the appid parameter of the manifest file for the packaged APK file. Tools themselves Baidu.

Checkpoint 3: check whether the application has a secondary signature or reinforcement

At present, Huawei channel does not do secondary signature, so if the application has secondary signature or reinforcement, it needs to solve the problem by itself.

Checkpoint 4: check whether Huawei’s application signature service is used

At present, Huawei also provides an application signature service. Developers can trust the application’s signature secret key to Huawei, and use the secret key to sign the APK that is finally distributed to users.

Official document of application signature:https://developer.huawei.com/consumer/cn/doc/development/AppGallery-connect-Guides/agc-appsigning-newapp

According to the requirements of the official website, if the service is used, the certificate fingerprint generated here needs to be appended to checkpoint 1: check whether the signature certificate information of the application is consistent with the Huawei background configuration.

Error 6003 when calling HMS SDK interface

For more information, see:

HMS core SDK framework error code:https://developer.huawei.com/consumer/cn/doc/development/HMSCore-References-V5/error-code-0000001050045846-V5

New app uses app signature service:https://developer.huawei.com/consumer/cn/doc/development/AppGallery-connect-Guides/agc-appsigning-newapp


Link to the original text:https://developer.huawei.com/consumer/cn/forum/topicview?tid=0203363619150710071&fid=18
Author: Zhao Youting, Gulou