I am trying to integrate Huawei Site Kit Search Activity into the Flutter application. However, I got the error as shown in the picture, and no result was getting back.
2 Answers
You can try adding debug to buildTypes. like the following:
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
signingConfig signingConfigs.debug
}
}
According to the following:
Error code 6003 is caused by inconsistent certificate fingerprint configurations. Check the following items:
- Check that the fingerprint has been configured, and the certificate for packing the signature on the local client is the same as the certificate for configuring the fingerprint on the server.
- Check the fingerprint entries in the certificate. It is recommended that you use a single entry.
- If error code 6003 persists when you run the local client after the fingerprint is configured, the debug certificate is running by default. Clear the cache of HUAWEI HMS Core (APK) and run the client again.

- 32,744
- 15
- 77
- 108
-
I have reconfirmed all the required information as stated above and even uninstall and reinstall the HUAWEI HMS Core(APK) but I still get the error code 6003 @shirley – Foody Feb 04 '22 at 14:55
-
I use Huawei Scan Kit in my app as well, it works. But I get error code 6003 for Huawei Site Kit in my app. @shirley – Foody Feb 04 '22 at 14:57
-
hi@Foody, you are advised to follow [this](https://stackoverflow.com/questions/67251791/how-to-view-the-signanature-of-apk-file) to parse the packaged APK signature and compare it with the SHA256 of the AGC. In addition, if signature match, pls provide us with how you configured for us to check? like the following [pics1](https://i.stack.imgur.com/PfU3j.png) and [pics2](https://i.stack.imgur.com/XoMDy.jpg). – zhangxaochen Feb 07 '22 at 02:43
-
Hi @shirley, I have checked and unfortunately the APK signature is not the same as the SHA256 in AGC. How can I make both the signature the same? I am following this page for configuration (https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides/config-agc-0000001050179166) – Foody Feb 08 '22 at 04:20
-
Could you kindly provide us your screenshot about how you configured like the following [pics1](https://i.stack.imgur.com/PfU3j.png) and [pics2](https://i.stack.imgur.com/XoMDy.jpg)? – zhangxaochen Feb 08 '22 at 08:38
-
I have added the pictures on the post above @shirley – Foody Feb 08 '22 at 10:48
-
hi@Foody, i updated my answer, pls kindly refer that. – zhangxaochen Feb 09 '22 at 02:24
-
I have added debug to buildTypes, clean the project, sync the gradle, clear the cache of the HMS Core(APK) and try again. However, I still encounter the same error code(6003). Is there anything else I can do for this issue? @shirley – Foody Feb 10 '22 at 01:57
-
1You could try to add the SHA256 certificate fingerprint of the APK to the AGC and download and update the agcconnect.json file again. [Docs link](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/android-sdk-config-agc-0000001061560289). [pics](https://i.stack.imgur.com/2PsZG.png). – zhangxaochen Feb 10 '22 at 02:19
Error code 6003 means Inconsistent certificate fingerprint configurations. The proposed solution is:
Ensure that the certificate fingerprint packed in the app on your device is consistent with that configured through SHA-256 certificate fingerprint in AppGallery Connect. For details, please refer to Configuring App Information in AppGallery Connect.
HMS Core (APK) will cache the signature file. You need to find HMS Core (APK) on the Apps page of your device and clear its cache, restart your app, and perform the previous operation again.
You can use either way to get your apk fingerprint and compare to make sure it's the same one.
command example: jarsigner -verbose -verify MyAPK_base_v11.0.apk > MyAPK_info.txt
review MyAPK_info.txt and find ".RSA" path and use below command
unzip -p MyAPK_base_v11.0.apk META-INF/BNDLTOOL.RSA | keytool -printcert
Result:
Certificate fingerprints:
SHA1: D0:88:29:99:94:C3:72:44:EA:CF:B1:6B:09:3E:01:95:FE:E4:45:BE
SHA256: EF:68:A7:0A:3A:47:F8:DD:46:58:52:EA:E2:59:AE:D6:1A:43:38:D8:14:26:05:9E:D3:99:C2:D1:F6:34:D9:DE
Signature algorithm name: SHA1withRSA (weak)
Subject Public Key Algorithm: 1024-bit RSA key (weak)
- command example: (apksigner.bat normally is in /android/build-tools folder)
apksigner.bat verify --print-certs MyAPK_base_v10.2.6-8569.apk
result:
Signer #1 certificate DN: CN=Michael Smith, OU=My Org, O=A Team, L=Okemos, ST=Michigan, C=US
Signer #1 certificate SHA-256 digest: ef68a70a3a47f8dd465852eae259aed61a4338d81426059ed399c2d1f634d9de
Signer #1 certificate SHA-1 digest: d088299994c37244eacfb16b093e0195fee445be
Signer #1 certificate MD5 digest: 68710e87d99e7f946958db33d3fcf13c

- 1,947
- 2
- 5
- 20