[FAQs] Error Code 50063 Is Returned During the Integration of Health Kit - Huawei Developers

About the Problem​After an app is integrated with the Health SDK, error code 50063 may be returned when you try to log in to and authorize the app on a HUAWEI phone.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
1. According to Health Kit development guide, error code 50063 indicates that API fails to be called because the installed HMS Core (APK) is not of the required version, which means, you need to update the HMS Core (APK) to the latest version and try again.
2. Uninstall the HMS Core (APK) from the phone, and install the latest version. If the error core 50063 is still returned, go the next step.
3. Call HuaweiApiAvailability#isHuaweiMobileServicesAvailable(Context context) and check the returned code. If the HMS Core (APK) has successfully been installed, the returned code should be 1.
4. Run the adb logcat > log.txt command to obtain complete logs for further troubleshooting.
Troubleshooting​Filter the log by the keyword HMSSDK_, and you will find E/HMSSDK_X509CertUtil: Not include alias 052root.
This message indicates that, no 052root information is found in the hmsrootcas.bks certificate, which causes the verification to be failed, and therefore the login failure. In normal cases, if the SDK is integrated using the Maven repository, the hmsrootcas.bks certificate is automatically saved in the assets directory of the APK.
If no log is available, you can also check whether the hmsrootcas.bks file in the APK contains 052root using a tool.
Solution​1. Check whether the hmsrootcas.bks file exists in the assets directory of the project. If so, delete it, and then the hmsrootcas.bks file will be automatically packed into the APK during app packaging.
2. If the hmsrootcas.bks file does not exist in the assets directory, or the problem persists even after you have deleted it and packaged the APK, manually integrate the BKS file containing the 052root information as follows:
Download the Health SDK.
Decompress the downloaded file, find the hmsrootcas.bks file in the following path, and integrate the file into the hmssdk-eclipse-6.9.0.300\Security-ssl\assets directory of the project.
3. Recompile the project.
References​HMS Core Health Kit
Developer Guide
More FAQs About Integrating Health Kit

Related

What Can I Do When Result Code 6003 Is Returned ?

When I integrate the HMS Core SDK into my app or game, result code 6003 is always returned during an API call. The official document indicates that this fault is caused by an incorrect signing certificate fingerprint. A signing certificate fingerprint is used to verify the app authenticity.
To locate the fault, perform the following operations:
Ensure that the app's certificate signature is the same as that configured in AppGallery Connect.
Ensure that the appid parameter in the manifest file is correct.
Check whether the app is hardened or re-signed.
Check whether HUAWEI App Signing is enabled.
Step 1: Ensure that the app's certificate signature is the same as that configured in AppGallery Connect.
Open the APK file of the 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 display the signature certificate information.
Check the SHA-256 certificate fingerprint configured in AppGallery Connect by referring to Configuring the Signing Certificate Fingerprint. If the information is the same as the preceding information displayed, the certificate fingerprint is correct.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Note: The keystore signature of the debug version for packaging. Use the official version for packaging and utilize a real device (non-simulator) for testing only.
Step 2: Ensure that the appid parameter in the manifest file is correct.
You can perform the check in either of the following ways:
View the parameter directly in the manifest file under the project.
Decompile the packaged APK file, and view the parameter. You can use any decompliation tool for that.
Step 3: Check whether the app is hardened or re-signed.
Since AppGallery Connect does not re-sign an app currently, you need to locate the fault if your app has been hardened or re-signed by yourself.
Step 4: Check whether HUAWEI App Signing is enabled.
Huawei provides the App Signing service for developers to let Huawei host their app's signature key and use it for the APK file to be distributed.
According to the official document, if the service is enabled, the generated certificate fingerprint must be added in AppGallery Connect.

What Can I Do When My App Is Rejected Due to the Update Pop-up Failing to Display on a Mobile Phone with HMS Core (APK) 2.5.3 or Earlier?

Symptom
My project has integrated HUAWEI IAP and other services using the HMS Core SDK 4.x. However, the app is rejected during Huawei app review, for an update pop-up cannot be displayed on a mobile phone with HMS Core (APK) 2.5.3 or earlier.
Problem Reoccurrence
On a Huawei mobile phone, I went to Settings > Apps > Apps, then searched for and tapped HMS Core (APK). On the displayed page, I tapped the button in the upper right corner, and chose to uninstall the APK update. The operation failed. When I contacted Huawei technical support,
I was told that the problem was because the HMS Core (APK) version on my phone is earlier than 2.5.3. Each of the following solutions can be used to reoccur the problem.
Find a Huawei phone and perform the preceding steps.
If the uninstallation fails, find a non-Huawei phone and uninstall HMS Core (APK).
If the Huawei phone has been rooted, just uninstall HMS Core (APK).
Problem Analysis and Solution
1. Log analysis: Here, I used a non-Huawei phone and uninstalled HMS Core (APK). As expected, the update pop-up did not show up when I initiated a payment in my app. The following error information was displayed in the logs.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2. Result code analysis: I searched for the result code in Huawei’s materials, and found more than one result. The result that we need is that which is described in In-App Purchases.
3. Code check: In the documentation, I checked the project code and determined the fault. The input parameter in our project is of the Context type, rather than the Activity type, which is why the error information indicated that no activity was found.
I then modified the code to resolve the problem.

Result Code 28 Reported During Check for an App Package Released Through the Huawei Channel: Copy the assets directory of the HMS Core SDK to the app

Symptom
When I submitted my game to AppGallery Connect for check, the following message was displayed:
Error 28: Copy the assets directory of the HMS SDK to the app project's root directory.
Cause​I submitted a ticket to Huawei technical support, and they told me that the problem occurred because no .bks certificate file was found in the packaged project.
You can also check whether there are .bks files in the project by using a decompiling tool to decompile the package. The following example shows that .bks files exist in the project.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Outcome​Usually, when an app calls a service API provided by the HMS Core SDK, for example, the sign-in or payment API, if a user's phone does not have HMS Core (APK) installed or the APK version is too early, a pop-up will be displayed to prompt the user to install or update HMS Core (APK).
The .bks files in the app package ensure that the pop-up is displayed as expected. If such files are missing, service functions may fail to work properly.
Solution​
If you use the Maven repository to integrate the HMS Core SDK in Android Studio, the certificate files are automatically stored in the assets directory of the APK.
If you download the HMS Core SDK package for local integration in Eclipse, the certificate files are included in the HMS Base Eclipse SDK package. You can manually copy the certificate files in the assets directory in each of the folder of the HMS Base Eclipse SDK package to your project's root directory by referring to the official documentation.
My project was developed using Eclipse, so I followed the instructions and copied the .bks files. Then, I submitted the package for check again and it passed.

Operations and FAQs of AppGallery Connect Services Demo in Unity

If you haven’t downloaded the demo for integrating Huawei services in Unity, you can access the demo on GitHub.
1. How to fix the invalid dependencies error reported during package resolving in Unity?​Project has invalid dependencies:
com.unity.textmeshpro: connect ETIMEDOUT 172.81.232.209:443
com.unity.timeline: connect ETIMEDOUT 172.81.232.209:443
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
When the preceding dialog box is displayed, click Continue to open the project. Go to Window > Package Manager.
Update each package with an exclamation mark to the latest version to resolve the problem, as shown in the following figure.
2. How to switch the platform to Android?​Go to File > Build Settings. In the Platform area, select Android and click Switch Platform.
3. How to fix the Visual C# compiler version error reported after the platform is switched to Android?​If the following error occurs, close the project and then reopen it to resolve the problem.
Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e)
Copyright (C) Microsoft Corporation. All rights reserved.
4. How to package and run the demo project?​On the Build Settings page, click Player Settings to display the Project Settings page.
Configure the product name as required.
In Other Settings, set a package name for the Android app, which should be identical to that in the JSON file in AppGallery Connect.
In Publishing Settings, deselect Custom Keystore. (If the services you want to integrate involve app signing, skip this step and perform the necessary operations.)
Download the JSON file from AppGallery Connect and save it to the ..\Assets\Plugins\Android directory of the project.
5. What can I do if error “-Dorg.gradle.jvmargs=-Xmx4096m” “assembleRelease” is reported when I package the demo project?​I have selected a device and clicked Build And Run on the Build Settings page, which reported the following error:
org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
stderr[
Picked up JAVA_TOOLOPTIONS: Dfile.encoding=UTF-8
This problem occurs because the corresponding signature file has been canceled but is still used in the Gradle file.
To resolve this problem, open the launcherTemplate.gradle file in the ..\Assets\Plugins\Android directory, find the following code snippet, and comment it out as shown in the following figure.
6. What can I do if error “launcher-release.apk does not exist” is reported when I package the demo project?​
To resolve this problem, simply select Development Build before packaging the project, as shown in the following figure.

What should I do if HMS Core (APK) cannot be updated (error code 102)?

I integrated the HMS Core SDK via the Maven repository in Android Studio. During the test on a Huawei mobile phone, I was prompted to update HMS Core (APK) to the latest version. But when I tried to update it, error code 102 was displayed, indicating that HMS Core (APK) cannot be updated.
I contacted Huawei technical support personnel (you can also submit a ticket online), and provided the problem reproducing logs without any filter. They told us that the hmsrootcas.bks certificate, which is required for updating HMS Core (APK), was invalid.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Because the project is an Android Studio project, the technical support personnel advised us to delete the hmsrootcas.bks certificate file, build dependencies, and generate the package again according to the reference documentation.
Generally, the problem can be solved by performing the preceding steps. However, when I deleted the hmsrootcas.bks certificate file under the Assets file and integrated the SDK again, the problem still occurred no matter how many times I tried.
In response, technical support told us to download the Base SDK integrated for Eclipse to obtain the msrootcas.bks certificate file and add the file to our project. Using Base SDK 5.3.0.301 as an example, the detailed directory for obtaining the file is hmssdk-eclipse-5.3.0.301.zip/security-ssl-1.1.5.306/assets/hmsrootcas.bks.
If you encounter the same problem when you use Eclipse, delete the hmsrootcas.bks certificate file in the package and download the Assets file of the SDK to the project.
SDK download link:
https://developer.huawei.com/consum..._TOPIC_0000001050121222__section3142161417195
devwithzachary said:
I integrated the HMS Core SDK via the Maven repository in Android Studio. During the test on a Huawei mobile phone, I was prompted to update HMS Core (APK) to the latest version. But when I tried to update it, error code 102 was displayed, indicating that HMS Core (APK) cannot be updated.
I contacted Huawei technical support personnel (you can also submit a ticket online), and provided the problem reproducing logs without any filter. They told us that the hmsrootcas.bks certificate, which is required for updating HMS Core (APK), was invalid.
Because the project is an Android Studio project, the technical support personnel advised us to delete the hmsrootcas.bks certificate file, build dependencies, and generate the package again according to the reference documentation.
Generally, the problem can be solved by performing the preceding steps. However, when I deleted the hmsrootcas.bks certificate file under the Assets file and integrated the SDK again, the problem still occurred no matter how many times I tried.
In response, technical support told us to download the Base SDK integrated for Eclipse to obtain the msrootcas.bks certificate file and add the file to our project. Using Base SDK 5.3.0.301 as an example, the detailed directory for obtaining the file is hmssdk-eclipse-5.3.0.301.zip/security-ssl-1.1.5.306/assets/hmsrootcas.bks.
If you encounter the same problem when you use Eclipse, delete the hmsrootcas.bks certificate file in the package and download the Assets file of the SDK to the project.
SDK download link:
https://developer.huawei.com/consum..._TOPIC_0000001050121222__section3142161417195
Click to expand...
Click to collapse

Categories

Resources