Analyzing and Solving Error 907135701 from HMS Core Account Kit - Huawei Developers

907135701 is one of the most frequently reported error codes from HMS Core Account Kit. The official document describes the error as follows.
{
"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"
}
Both an Android project and a HarmonyOS project can report this error.
I myself have come across it several times and have summed up some of the causes and solutions for it, as follows.
From an Android Project​Cause 1: The app information is not configured in AppGallery Connect, and the app ID is not generated.
Solution: Configure the app information in AppGallery Connect.
To do this, first register as a Huawei developer and complete identity verification on HUAWEI Developers, as detailed here. Create a project and an app as needed and then obtain the app ID in AppGallery Connect.
Cause 2: The sign certificate fingerprint is not configured or incorrectly configured.
Solution: Verify that the fingerprint configured in AppGallery Connect and the fingerprint used during app packaging are consistent. You can configure the fingerprint by referring to this document.
Cause 3: agconnect-services.json is incorrectly configured, or this file is not placed in the correct directory.
Solution: Verify that the app IDs in agconnect-services.json and AppGallery Connect are the same, and copy the file to the app directory.
Also note that unless necessary, do not toggle on Do not include key in AppGallery Connect.
To re-configure the file, follow the instructions here.
From a HarmonyOS (Java) Project​Cause 1: agconnect-services.json is not placed in a proper directory.
Solution: Move the file to the entry directory.
Cause 2: The sign certificate fingerprint is not configured or incorrectly configured.
Solution: Verify that the fingerprint is configured as specified in Configuring App Signing. After obtaining the fingerprint, verify that it is consistent with that in AppGallery Connect.
Cause 3: The attribute configuration of config.json is incorrect.
Solution: Add the following content to module in the entry/src/main/config.json file of the HarmonyOS app. Do not change the value of name.
Code:
"metaData": {
"customizeData": [
{
"name": "com.huawei.hms.client.appid",
// Replace OAuth Client ID with your actual ID.
"value": "OAuth Client ID" //
}
]
}
Cause 4: The plugin configuration is incorrect.
Solution: Add the AppGallery Connect plugin configuration through either of these methods:
Method 1: Add the following configuration under the declaration in the file header:
Code:
apply plugin: 'com.huawei.agconnect'
Method 2: Add the plugin configuration in the plugins block.
Code:
plugins {
id 'com.android.application'
// Add the following configuration:
id 'com.huawei.agconnect'
}
References​HMS Core Account Kit home page
HMS Core Account Kit Development Guide

Related

Configuring App Information in AppGallery Connect

This thread describes the preparation procedures for configuring your app information in AppGallery Connect.
1. Configuring App Information in AppGallery Connect
Before you start developing an app, configure app information in AppGallery Connect.
1.1 Registering as a Developer
Before you get started, you must register as a HUAWEI developer and complete identity verification on the HUAWEI Developer website. For details, please refer to Register a HUAWEI ID.
1.2 Creating an App
Create an app by referring to Creating a Project and Creating an App in the Project. Special configurations for a game app are as follows:
l Platform: Select Android.
l Device: Select Mobile phone.
l App category: Select App.
1.3 Generating a Signing Certificate Fingerprint
A signing certificate fingerprint is used to verify the authenticity of an app when it attempts to access an HMS Core through the HMS SDK. Before using the HMS Core, you must locally generate a signing certificate fingerprint and configure it in AppGallery Connect.
Please ensure that the following conditions are met:
l You have created the app's signature file.
l The JDK has been installed on your PC.
Perform the following steps:
1. Open the command line tool (using the cmd command) and run the cd command to go to the directory where keytool.exe is located. In the following example, the Java program is installed in Program Files (x86) in the C drive.
{
"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. Run keytool -list -v -keystore <keystore-file> and respond as prompted.
In the preceding command, <keystore-file> is the complete path to the app's signature file.
Example:
Code:
C:\Program Files (x86)\Java\jdk1.7.0_25\bin>keytool -list -v -keystore
E:\HMS_SDK_2.5.1.300\Sample\HMSSdkSample_2.5.1.300_AS\HmsSample\android.keystore.jks
3. Obtain the SHA-256 fingerprint from the result.
1.4 Configuring the Signing Certificate Fingerprint
Sign in to AppGallery Connect and select My projects.
Find your project from the project list and click the app on the project card.
On the Project Setting page, set SHA-256 certificate fingerprint to the SHA-256 fingerprint that is generated from the preceding section of Generating a Signing Certificate Fingerprint.
4. After completing configuration, click the check mark.
1.5 Enabling Required Services
l To use the Drive service, you must also enable the Account and Push services.
For details, please refer to Enabling Services.

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 the Message "miss client id" Is Displayed During AGC

Background
When I referred to official documentation of AppGallery Connect for APM integration and packaged and run the app, an error message was displayed in the run log:
I/com.huawei.agc.apms: failed to fetch remote config: client token request miss client id, please check whether the 'agconnect-services.json' is configured correctly
The log is as follows.
{
"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"
}
Another colleague encountered this error when integrating App Linking of AppGallery Connect.
According to the error message, I checked the agconnect-services.json file of my demo project. It was found that the client ID in the JSON file was correct.
Problem Reoccurring
First, I downloaded the sample code from the official website and replaced it with my own JSON file. Then, I checked the run logs and found no problem. This meant that the AppGallery Connect project configuration had no problem.
Then, I opened the demo downloaded from the official website, deleted the client ID from the JSON file, and repackaged and run the demo. Two lines of error logs were displayed, which were different from the preceding message. This was not the cause.
Next, I compared the demo project downloaded from the official website with the project created by me. Then, I found that I didn't add the AppGallery Connect plug-in to the app-level build.gradle file, that is, the file did not contain the code as follows.
I deleted the code about the AppGallery Connect plug-in from the gradle file downloaded from the official website. The problem was reproduced.
Cause Analysis
Finally, we communicated with Huawei technical support to find out the root cause of the problem.
During building of the Android project, the AppGallery Connect plug-in in the gradle file automatically compiles the client ID in the JSON file to the String.xml file in the resource directory.
If the AppGallery Connect plug-in is missing, the SDK in the project cannot obtain the client ID.
Solution: Add the AppGallery Connect plug-in to the app-level build.gradle file.
HTML:
apply plugin: 'com.android.application'
apply plugin: 'com.huawei.agconnect'
apply plugin: 'com.huawei.agconnect.apms'
For details about how to integrate the AppGallery Connect plug-in, please refer to the following:
https://developer.huawei.com/consum...nnect-Guides/agc-get-started#h2-1587477308727
I am getting error message during the build.gradle file compilation: "com.huawei.agconnect" not found. Help me to resolve this issue
riteshchanchal said:
I am getting error message during the build.gradle file compilation: "com.huawei.agconnect" not found. Help me to resolve this issue
Click to expand...
Click to collapse
You may refer to the following link to solve the problem: General FAQs

Three Steps to Rectify Failure in Creating Cloud DB Object Types

Relevant Logs​You may encounter a failure to create object types when integrating Cloud DB. Typical logs are as follows:
1. The ObjectType quantity is invalid.
XML:
NaturalBase: GenerateDiffSchemas: remove ObjectType is not supported. count of ObjectType is less than current
2. The object types failed to be negotiated.
XML:
E/NaturalBase: OpenNaturalStore: negotiate failed.
W/AGConnectCloudDB: openCloudDBZone: failed to create or open a cloudDBZone.
3. The scheme is not synchronized.
XML:
[NaturalCloudSyncModule][OnConnected]: negotiate schema.
[PushMessageAndNotifyStoreCv] Schema is UnSynced
4. The version of object types been changed but object types themselves are not changed.
XML:
E/NaturalBase: CreateObjectType: ObjectType version has changed, but ObjectType has not changed.
E/AGConnectCloudDB: createObjectType: failed to create ObjectType into the AGCConnectCloudDB.
Cause Analysis​The main cause is that the file matching the object type version in your Android project is inconsistent with the object types set on the AppGallery Connect server.
You can check the object types in AppGallery Connect as follows.
{
"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"
}
To check information relevant to object types in your Android project, check the class in ObjectTypeInfoHelper.
Three Steps to Solve the Problem​1. Exporting Object Types from AppGallery Connect​Since the object types in your Android project are inconsistent with those in AppGallery Connect, you need to export the object types from AppGallery Connect for synchronization.
The export procedure in AppGallery Connect is as follows: Sign in to AppGallery Connect, click My projects, click your project, go to Build > Cloud DB > ObjectTypes, select the specific version, and click Export.
During the export, select JAVA for the file format and android for the file type of Java, and enter a package name.
Decompress the exported ZIP package in your project directory.
2. Checking Versions​You should pay attention to two versions in the object type file, which correspond to the following two fields in the ObjectTypeInfoHelper file:
1. FORMAT_VERSION: The value should match the SDK version.
If the value of FORMAT_VERSION in the exported file is 1, integrate the Cloud DB SDK of a version earlier than 1.2.2. Version 1.2.1.301 is recommended.
If the value of FORMAT_VERSION in the exported file is 2, integrate the Cloud DB SDK of a later version. Version 1.2.3.301 is recommended.
2. OBJECT_TYPE_VERSION
This version is that selected when you export object type information from AppGallery Connect. Generally, you do not need to change it.
3. Uninstalling Your App from Your Device and Installing It Again​If you have encountered the object type problem on your device, the incorrect information will still exist in the cache if you install your app again directly, and object type creation will still fail.
The correct method for performing the app re-installation is as follows:
1. Package your app again.
2. Uninstall the app already installed on your device manually.
3. Install the newly packaged app on your device for debugging.
The correct method for performing the app re-installation is as follows:
https://developer.huawei.com/consum...ect-Guides/agc-clouddb-agcconsole-objecttypes

FAQs and Solutions Related to Analytics Kit Integration

How do I know whether the Analytics SDK has been successfully integrated or reported data? What is the meaning of key log content?​
1. Add the following code to enable the logging function before initializing the Analytics SDK:
Code:
HiAnalyticsTools.enableLog ();
2. Add the following code to initialize the Analytics SDK:
Code:
HiAnalyticsInstance instance = HiAnalytics.getInstance (this);
3. Run the app and check whether data has been successfully reported based on the log content.
If the Analytics SDK fails to be integrated or report data:
An error code will be contained in the log, and some log content may be marked in red. Check whether related solutions are available by referring to Result Codes and Integration and Debugging.
If data is successfully reported, the key log content is as follows:
Code:
HiAnalyticsSDK: SendMission=> events PostRequest sendevent TYPE : oper, TAG : _openness_config_tag, resultCode: 200 ,reqID:xxx
In app debug mode, each time data is reported, the following log content is generated:
Code:
HiAnalyticsSDK: DeviceToolsKit=> debugMode enabled.
In app debug mode, if an event cannot be reported, the following log content is generated:
Code:
HiAnalyticsSDK: ReportRingback=> do not enable APIEvt in debug model
What can I do if the error message "client token request miss client id" is displayed during SDK initialization?​​[Error message]​
Code:
HiAnalyticsSDK: TokenAssignment=> SE-003|get token exception on the AGC! java.lang.IllegalArgumentException: client token request miss client id, please check whether the 'agconnect-services.json' is configured correctly
[Root cause]​
The Do not include key switch next to agconnect-services.json in the App information area on the Project settings page is toggled on. As a result, keys including the client key and API key are excluded from the configuration file, but APIs of the AppGallery Connect SDK have not been called to manually configure the key information.
{
"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"
}
[Solution]​
If you have enabled Do not include key before downloading the agconnect-services.json file, call APIs of the AppGallery Connect SDK to manually configure the key information. For details, please refer to Setting Parameters Using the Configuration File.
3. What can I do if CE-001 or SE-001 is reported during SDK initialization?​
[Error message]​
Code:
HiAnalyticsSDK: jsonParses=> CE-001|Cannot find productId from agconnect-services.json
HiAnalyticsSDK: InitTask=> SE-001|_openness_config_tag instance config init failed!. param error config params is error
[Root cause]​
The parameters for integrating the SDK are incorrect due to the following reasons:
The agconnect-services.json file is saved in the incorrect path.
Content in the agconnect-services.json file is incomplete, or productId has been modified.
In the app-level build.gradle file, apply plugin: 'com.huawei.agconnect' has not been added, or id 'com.huawei.agconnect' has not been added to plugins.
Note: Add com.huawei.agconnect below com.android.application. Otherwise, an error will be reported.
[Solution]​
Place the agconnect-services.json file in the correct path.
Download the agconnect-services.json file from AppGallery Connect again and use it to replace the original one.
Add the com.huawei.agconnect configuration in the correct place.
You can check the configuration by referring to Integrating the SDK.
Learn more​
Official website of Analytics Kit
Development guide of Analytics Kit

Categories

Resources