目录

Result Codes

The result codes of Push Kit consist of HMS Core SDK Framework Result Codes and HMS Core Push SDK Result Codes. If you encounter a result code that cannot be found here, contact technical support. Technical support personnel will get back to you as soon as possible.

HMS Core SDK Framework Result Codes

Result Code

Value

Description

Solution

ErrorCode.ARGUMENTS_INVALID

907135000

Incorrect input parameters.

Verify that related input parameters are correctly set. For example, check whether appid in the Manifest file is correctly set.

ErrorCode.INTERNAL_ERROR

907135001

An internal error occurred and cannot be rectified.

Retry or restart the process.

ErrorCode.NAMING_INVALID

907135002

Failed to query the specified service API, because the API does not exist or the API instance failed to be created.

Verify that the service API exists and the API instance is successfully created.

ErrorCode.CLIENT_API_INVALID

907135003

Invalid ApiClient object.

Verify that ApiClient is not null and isConnected is true.

ErrorCode.EXECUTE_TIMEOUT

907135004

AIDL call timed out.

Verify that the service is not terminated and the binder is valid.

ErrorCode.NOT_IN_SERVICE

907135005

This service is unavailable in this region.

Verify that the API is supported in the region where the user is located.

ErrorCode.SESSION_INVALID

907135006

HMS Core SDK internal error. The AIDL connection session is invalid.

Generally, this error does not occur. Try again if this error code is returned. If the error persists after several retries, submit a ticket online.

ErrorCode.DENY_NETWORK

907135007

Failed to access the network, because you did not agree to the privacy statement in the out-of-box experience (OOBE) phase.

Agree to the privacy statement in the OOBE phase.

ErrorCode.GET_SCOPE_ERROR

907135700

Failed to call the gateway to query Scope of the app.

  1. Verify that your phone has Internet access.
  2. Verify that the current app has been created and has applied for related services.

ErrorCode.SCOPE_LIST_EMPTY

907135701

Scope of OpenGW is not configured.

  1. Verify that your phone has Internet access.
  2. Verify that the current app has been created and has applied for related services.

ErrorCode.CERT_FINGERPRINT_EMPTY

907135702

No certificate fingerprint is configured for OpenGW.

  1. Verify that your phone has Internet access.
  2. Verify that the certificate fingerprint is correctly configured when you apply for related services. Sign in to AppGallery Connect, click My projects, and select a required project. On the displayed page, select the app, go to Project settings > General information, and check whether the value in SHA-256 certificate fingerprint is the same as that generated in the signing certificate. If not, change the value.

ErrorCode.PERMISSION_LIST_EMPTY

907135703

The permission of OpenGW is not configured.

Verify that the related function has been enabled during app creation. For example, to represent a user using unionId in an app, enable unionId when creating the app.

ErrorCode.GET_SCOPE_NETWORK_ERROR

907135704

Failed to call the gateway to query Scope of the app due to an exception returned by the server.

  1. Verify that your phone has Internet access.
  2. Verify that you can access https://api.cloud.huawei.com/rest.php?nsp_svc=nsp.scope.app.get&nsp_fmt=json&type=2&appid=***. (Replace *** with your app ID.)

CommonCode.BusInterceptor.PRIVACY_CNCEL_ERROR_CODE

907135705

The user does not agree to the HMS Core privacy statement.

Ensure that the user has agreed to the HMS Core privacy statement.

CommonCode.ErrorCode.KIT_NOT_EXIST

907135900

The kit does not exist.

Verify that the kit is supported on the device. You can check whether the kit is included in the remoteconfig file on the device. If no, the kit is not supported on the device.

CommonCode.ErrorCode.DEVICE_POLICY_INTERCEPTOR

907135901

This function is currently unavailable on the device.

Do not use this function on the device.

StatusCode.AUTH_INFO_NOT_EXIST

6002

The app's authentication information does not exist.

Verify that the current app has been created and has applied for related services.

StatusCode.CERT_FINGERPRINT_ERROR

6003

Certificate fingerprint verification: Incorrect signing certificate fingerprint.

  1. Verify that the certificate fingerprint is correctly configured when you apply for related services.

    Android: 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 record the signing certificate information.

    HarmonyOS: Decompress the HAP package at multiple levels to obtain the *.EC file in the META-INF directory. Then, run the following keytool command of the JDK to view the EC file:

    keytool -printcert -file {File name}

  2. Sign in to AppGallery Connect, click My projects, and select a required project. On the displayed page, select the app, go to Project settings > General information, and check whether the value in SHA-256 certificate fingerprint is the same as that in step 1.

StatusCode.PERMISSION_NOT_EXIST

6004

API authentication: Permission not granted from HUAWEI Developers.

  1. Verify that the current app has been created and has applied for related services.
  2. Clear the HMS Core (APK) cache and try again.

StatusCode.PERMISSION_NOT_AUTHORIZED

6005

API authentication: Permission not granted.

Verify that the current app has been created and has applied for related services.

StatusCode.PERMISSION_EXPIRED

6006

API authentication: Permission expired.

Verify that the current app has been created and has applied for related services.

ErrorCode.ERROR_CODE_FRAMEWORK_UPDATING

1200

The framework is being upgraded, and the AMS and PMS services are not ready.

  1. Verify that the framework upgrade is complete and the AMS and PMS services are ready.
  2. Send the request again.

ErrorCode.ERROR_CODE_FRAMEWORK_NOT_READY

1201

The AMS and PMS services are not ready.

  1. Verify that the AMS and PMS services are ready.
  2. Send the request again.

ErrorCode.ERROR_CODE_PARAMETER_INVALID

1210

Invalid parameter.

Verify that the input parameter is correct.

ErrorCode.ERROR_CODE_SESSION_INVALID

1211

Invalid session.

Verify that the app ID of the caller is correct.

ErrorCode.ERROR_CODE_KIT_NEED_UPDATE

1212

The kit needs to be upgraded.

  1. Verify that the kit upgrade is complete.
  2. Verify that a later version of the kit is available on AppGallery or in the local installation directory.
  3. Send the request again.

ERRORCODE.ERROR_CODE_KIT_BREAKER

1213

The kit needs to be in the circuit breaker state.

Do not call the kit because it is unavailable in the circuit breaker state.

ERRORCODE.ERROR_CODE_FRAMEWORK_BREAKER

1214

The framework needs to be in the circuit breaker state.

Do not call the framework because it is unavailable in the circuit breaker state.

ERRORCODE.ERROR_CODE_MEMORY_OVER_LIMIT

1215

The memory usage exceeds the threshold.

  1. Verify that the memory usage does not exceed the threshold.
  2. If the memory usage exceeds the threshold, release the memory and try again.

ERRORCODE.ERROR_CODE_AUTH_FAILED

1217

Kit authentication failed.

  1. Verify that the current kit has been created and has applied for related services.
  2. Verify that the certificate fingerprint is correctly configured when you apply for related services.

    Android: 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 record the signing certificate information.

    HarmonyOS: Decompress the HAP package at multiple levels to obtain the *.EC file in the META-INF directory. Then, run the following keytool command of the JDK to view the EC file:

    keytool -printcert -file {File name}

  3. Sign in to AppGallery Connect, click My projects, and select a required project. On the displayed page, select the app, go to Project settings > General information, and check whether the value in SHA-256 certificate fingerprint is the same as that in step 2.

ERRORCODE.ERROR_CODE_RUNTIME_AMS

1230

An error occurs during AMS running.

  1. Wait for a few seconds and try again.
  2. Restart HMS Core (APK).
  3. Reinstall HMS Core (APK) from HUAWEI AppGallery.

ERRORCODE.ERROR_CODE_RUNTIME_PMS

1240

An error occurs during PMS running.

  1. Wait for a few seconds and try again.
  2. Restart HMS Core (APK).
  3. Reinstall HMS Core (APK) from HUAWEI AppGallery.

ERRORCODE.ERROR_CODE_RUNTIME_KAC

1250

An error occurs during KAC running.

  1. Wait for a few seconds and try again.
  2. Restart HMS Core (APK).
  3. Reinstall HMS Core (APK) from HUAWEI AppGallery.

ERRORCODE.ERROR_CODE_RUNTIME_OTHER

1260

Other types of errors.

Obtain relevant error logs and submit a ticket online.

BaseCode.OK

0

Success.

-

BaseCode.RESULT_NULL

-1

The returned object is null.

Contact HMS technical support for assistance.

BaseCode.PARAM_ERROR

-2

The input parameter is set to null.

Use the public builder BaseAdapter to build an instance object, and ensure that the input parameter is not set to null.

BaseCode.ACTIVITY_NULL

-3

The reference of the passed Activity object is null.

Ensure that the passed object is Activity during the initialization of the HuaweiApi class.

BaseCode.NO_SOLUTION

-4

The service side does not return Intent or PendingIntent.

Obtain relevant error logs and submit a ticket online.

BaseCode.URI_IS_NULL

-5

Failed to obtain the URI field in the header.

Verify that apiName is not null or an empty string.

BaseCode.TRANSACTION_IS_NUL

-6

Failed to obtain the transaction field in the header.

If the transactionId field fails to be obtained or is empty, verify that the field is passed.

BaseCode.DATA_NULL_IN_INTENT

-7

The data field in the intent returned by onActivityResult is set to null, or the intent does not record the update result.

The intent returned by the framework is empty or the intent does not record the update result. Obtain relevant error logs and submit a ticket online.

BaseCode.SOLUTION_GET_RESPONSE_CODE_ERROR

-8

Failed to obtain the service execution result when the GUI processing result is obtained using an intent.

The solution fails to be started. Contact the framework technical support for assistance.

BaseCode.NO_AVAILABLE_LIB_ERROR

-9

The resolution cannot be done because you have not integrated the availableupdate SDK.

Ensure that you have integrated the avaliableupdate SDK.

BaseCode.KPMS_UPDATE_FAILED

-10

The kit failed to be updated using the KPMS.

1. Verify that the network is normal.

2. Verify that relevant kits have been released.

3. If the fault persists, submit a ticket online.

AvailableCode.SERVICE_MISSING

1

The device is not installed with HMS Core (APK).

Download and install HMS Core (APK) on the device.

AvailableCode.SERVICE_VERSION_UPDATE_REQUIRED

2

HMS Core (APK) installed is out of date.

Update HMS Core (APK) from AppGallery.

AvailableCode.SERVICE_DISABLED

3

HMS Core (APK) installed on the device is unavailable.

1. Update HMS Core (APK) from AppGallery.

2. Change settings to allow HMS Core (APK) to automatically start and allow other apps to associatively start HMS Core (APK).

ResolutionResult.INTERNAL_ERROR

8

Internal error.

Try again.

AvailableCode.CANCELED

13

The user cancels the download or installation, or the app uses an incorrect certificate.

  1. Ensure that HMS Core (APK) is downloaded successfully.
  2. Ensure that HMS Core (APK) is installed successfully.
  3. Ensure that the used hmsrootcas.bks certificate is correct and contains "052root".

AvailableCode.SERVICE_UNSUPPORTED

21

The device is outdated and cannot be supported.

Use a later-version device.

AvailableCode.ERROR_ON_ACTIVITY_RESULT

25

Failed to obtain the activity result because the update page is closed unexpectedly.

Contact Huawei technical support and submit a ticket online.

AvailableCode.ERROR_NO_ACTIVITY

26

The Dialog cannot be displayed because no Activity object is passed.

Ensure that the passed object is Activity during the initialization of the HuaweiApi class. The Dialog can be displayed only when the passed Activity is not empty.

AvailableCode.USER_IGNORE_PREVIOUS_POPUP

27

An update Dialog has already been displayed in the frontend.

The user has not clicked buttons in the update popup or the download and installation have not completed within 1 minute after the user clicks buttons in the update popup. Check for version update again.

AvailableCode.APP_IS_BACKGROUND_OR_LOCKED

28

The update Dialog failed to be displayed because the app is running in the background or the screen of the device is locked.

Ensure that the app is running in the foreground.

AvailableCode.HMS_IS_SPOOF

29

HMS Core (APK) is spoofed.

Reinstall HMS Core (APK) from HUAWEI AppGallery.

AvailableCode.USER_ALREADY_KNOWS_SERVICE_UNAVAILABLE

30

HMS Core (APK) is not installed or is not in the required version on the device.

Install the latest version of HMS Core (APK).

AvailableCode.CURRENT_SHOWING_SERVICE_UNAVAILABLE

31

The popup indicating that HMS Core (APK) is not installed or is not in the required version shows up repeatedly.

Close the popup and install the latest version of HMS Core (APK).

HMS Core Push SDK Result Codes

Result Code

Description

Solution

-5

Failed to obtain the token.

Check the obfuscation configuration file. For details, please refer to Configuring Obfuscation Scripts.

-10

Failed to update the kit using the KPMS.

Submit a ticket online for assistance.

907122030

No token.

Ensure that the input parameters are correct for calling the method for obtaining a token.

907122031

The network is unavailable.

Verify that the network is available.

907122032

The token has expired.

Delete the token and obtain a new one.

907122034

The number of topics to be subscribed to exceeds the threshold (2000).

Delete unnecessary topics. For details, please refer to unsubscribe(String topic).

907122035

Failed to subscribe to the topic.

Try again later or contact technical support.

907122036

Push Kit is not enabled.

For details, please refer to Preparations to check whether the related service is enabled for the app.

907122037

Failed to obtain the token.

Try again later or contact technical support.

907122038

No storage location is selected for the app, or the storage location is invalid.

Set a correct data processing location for your app. For details, please refer to Managing the Default Data Processing Location.

907122039

The sender does not have the permission in the multi-sender scenario.

Refer to Configuring the Multi-sender Function.

907122041

The message body size exceeds the maximum (1 KB).

Ensure that the size of the message body does not exceed the maximum.

907122042

The message contains invalid parameters.

Ensure that the parameters in the message body are valid.

907122043

This message is discarded because the number of sent messages reaches the upper limit.

Reduce the number of messages to be sent.

907122044

Before being sent to your server, the message is discarded due to expiration.

Reset the TTL. The maximum value is 1,296,000 seconds (15 days).

907122045

Unknown error.

An internal system exception occurs, and you cannot handle it by yourself. Contact technical support.

907122047

Common Push Kit error.

This error may occur in many scenarios. Contact technical support to locate it.

907122048

HMS Core (APK) cannot connect to Push Kit.

Contact technical support.

907122049

EMUI is not in the required version, or Push Kit is not in the required version.

Update the Push Service (APK) version to the latest one. If the error persists, use a device running EMUI of a later version.

907122050

The operation cannot be performed in the main thread.

Create a thread and call a specific method in the new thread.

907122051

Failed to authenticate the device certificate.

Contact technical support.

907122052

Failed to bind the service.

Try again later or contact technical support.

907122053

Failed to obtain the token. Cross-location application is not allowed.

Ensure that the token is not obtained across data processing locations.

907122054

The HMS Core Push SDK is being automatically initialized.

HMS Core (APK) is not installed or is not in the required version on the device. Search for HMS Core on HUAWEI AppGallery, install it, and try again.

907122055

The system is busy.

Try again later.

907122056

Failed to send an uplink message.

Send the uplink message again later.

907122057

Incorrect input parameter for constructing an object for sending uplink messages.

Ensure that the input parameter for RemoteMessage.Builder to construct an object is push.hcm.upstream.

907122058

The message is discarded because the number of cached uplink messages to be sent by the app exceeds the threshold (20).

Try again later.

907122059

The uplink message sent by the app is cached due to a cause such as network unavailability.

Try again later.

907122060

Your server is offline.

Try again later.

907122061

API call is restricted because your app calls the API too frequently.

Reduce the frequency for your app to call the API.

907122064

The agconnect-services.json file does not contain the projectId field.

Sign in to AppGallery Connect, select My projects, find your project in the project list, choose Project settings, and re-download the agconnect-services.json file.

907122065

Failed to obtain a token for the apps on smart watches, VR devices, or routers.

Apps on third-party smart watches, VR devices, and routers are not supported.

907122066

Failed to obtain HUAWEI ID information.

  • Ensure that the sign-in with a HUAWEI ID is successful and the device network is normal.
  • Sign in with the HUAWEI ID again.

907122067

The number of added user-app relationships exceeds the maximum (10).

Delete the relationships that are no longer used. For details, please refer to deleteProfile(String profileId).

907122070

The Push service version on the device is outdated.

Update the Push service on the device.

907122072

The HMS Core (APK) version is outdated.

Update HMS Core (APK) on your device.

907122101

Failed to obtain the token of the push service.

Contact technical support.

907122102

Failed to delete the token of the push service.

Contact technical support.

907122103

An internal error occurs in the push SDK.

Contact technical support.

907122104

Failed to obtain the domain name.

Try again later or contact technical support.

907122105

Failed to construct the JSON message body for obtaining a token.

Try again later or contact technical support.

If the error persists, contact technical support. Technical support personnel will get back to you as soon as possible.