4

I removed the all gms related apis and added hms ones. My debug version is working awesome, I have the agconnect file in my project root. But If I download my app directly from appGallery, my hms core related apis are not working. (like pushkit and iap). I checked the console when my app's release version is running and I saw this error:

 com.huawei.hms.common.ApiException: 6003: certificate fingerprint error

There are two SHA-256 fingerprint code:

enter image description here

How did I build the app?

It was pretty same with gms version. I selected the Build->Generate Signed Bundle or Apk menu and I builded with my existing keystore file which I also use for Google Play, then uploaded to AppGallery connect. There was no error or warning.

How can I fix it?

Tolgay Toklar
  • 4,151
  • 8
  • 43
  • 73

2 Answers2

2

Check whether the appid is the same as the appid on AppGalleryConnect. Check your configuration carefully. In addition, check the certificate fingerprint. Ensure that the JSON file is stored in the project-level directory instead of the application-level directory, check the following items configuration process carefully.

1.Check whether the fingerprint certificate is correctly configured when you apply for related services. Open the APK file of an app, extract the META-INF directory from the file, obtain the CERT.RSA file in the directory, and run the keytool -printcert -file META-INF/CERT.RSA command to print the signature certificate information.

2.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.

3.Sign in to AppGallery Connect, click My apps. On the page that is displayed, go to Develop > Project settings > conventional, check whether SHA-256 certificate fingerprint is consistent with the fingerprint in step 1.

4.For third-party access, check the value of appid.

<meta-data android:name="com.huawei.hms.client.appid" android:value="Your appid"/> 

or

<meta-data android:name="com.huawei.hms.client.appid" android:value="appid=Your appid"/>

Also you're advised to upgrade the SDK.

Hope this could help with your issue. :)

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108
  • 1
    I realized I was using android debug certificate. Now I created new jks file and I run the configuration wizard again but with my new certificate. It succced, after that I run the integration test with my new certificate and the results: https://imgur.com/a/VoJA8L6, I didn't change anything in AGC. Now If I sign my app with that certificate, will everything be ok? – Tolgay Toklar Jan 27 '21 at 08:35
  • The new parsed SHA-256 certificate must be updated to the AGC. And also the part with signature certificate must be updated. – zhangxaochen Jan 27 '21 at 09:04
  • I created a new signed apk and decompressed it, like you said on the step 1, and checked the SHA256 it is same with the AGC – Tolgay Toklar Jan 27 '21 at 09:07
  • I uploaded my app with the new certificate and it rejected due to certificate incostincy. It says your existing version of the app is using a different certificate. What should I do now? – Tolgay Toklar Jan 27 '21 at 13:12
  • The uploaded certificate must be the same as that on-shelf. Try using the original certificate may solve your problem. – zhangxaochen Jan 28 '21 at 03:16
  • Or you can append your new certificate fingerprint to AGC,For Detail,pls kindly refer: https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-appsigning-fingerprint – zhangxaochen Jan 28 '21 at 08:29
  • I need to use that new certificate, because with the old certificate my agc services are not working. Also I don't want to create a new app. Is this possible? – Tolgay Toklar Jan 28 '21 at 08:31
  • If your app has been released and needs to be modified, need to submit a ticket. (choose **AppGallery Connect**→**App Signing**)Applying for modification.If your app has not been released, Ensure that all the part with signature certificate must be updated. – zhangxaochen Jan 28 '21 at 09:33
  • Unfortunately my app is already released with debug certificate :( – Tolgay Toklar Jan 28 '21 at 09:35
  • That's unlucky.Try to Submit a ticket online.https://developer.huawei.com/consumer/en/support/feedback/#/ – zhangxaochen Jan 28 '21 at 09:40
0

The 6003 error is caused by inconsistent certificate fingerprint configurations. Check the following items:

  1. Ensure that the certificate 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 in AppGallery Connect. Generating Signing Certificate

  2. Check the fingerprint entries in the certificate. It is recommended that you use a single entry.

  3. If the 6003 error persists when you run the local client after the fingerprint is configured, the debug certificate is running by default. You need to manually go to Settings > Apps > Apps > Search (HUAWEI Mobile Services) to clear the cache and data, close the app, and try again.