目录

ArkTS API Error Codes

This section describes only module-specific error codes. For details about universal error codes, please refer to Universal Error Codes.

1000900001 System Error

Message

System internal error.

Symptom

This error code is reported when an internal system error occurs.

Possible causes

An unknown error occurred.

Solution

  1. Try again.

  2. If the pushService.on('tokenUpdate') API returns error code 1000900001, check for repeated registrations.

1000900002 Extension Does Not Exist

Message

Extension does not exist.

Symptom

The ExtensionAbility does not exist.

Possible causes

The ExtensionAbility to start does not exist.

Solution

Check whether the extensionAbilities module in the src/main/module.json5 file of the project is correctly configured based on the scenario-specific message type.

1000900003 Failed to Execute the ExtensionAbility Callback

Message

Extension callback execution failed.

Symptom

The ExtensionAbility callback failed to be executed.

Possible causes

An exception occurred when the onReceiveMessage() callback of the ExtensionAbility was executed.

Solution

Check the code execution logic in the onReceiveMessage() callback of the ExtensionAbility.

1000900004 ExtensionAbility Callback Execution Timed Out

Message

Extension callback execution timed out.

Symptom

The ExtensionAbility callback execution timed out.

Possible causes

The execution of the onReceiveMessage() callback of the ExtensionAbility timed out.

Solution

Check the code execution logic in the onReceiveMessage() callback of the ExtensionAbility.

1000900005 Duplicate Registration of the Same Scenario-Specific Message Is Not Allowed

Message

Messages of the same push type cannot be received repeatedly.

Symptom

This error code is reported when scenario-specific messages of the same type are registered repeatedly.

Possible causes

pushService.receiveMessage() is called repeatedly to register a same type of scenario-specific messages.

Solution

Delete unnecessary pushService.receiveMessage() calls, and process the received scenario-specific message in the same callback.

1000900006 AAID Service Connection Failure

Message

Failed to connect to the AAID service.

Symptom

This error code is reported when an error occurs during the connection to the AAID service.

Possible causes

The AAID service is running abnormally.

Solution

Try again.

1000900007 AAID Service Internal Error

Message

Internal error of the AAID service.

Symptom

This error code is reported when an exception occurs during task processing in the AAID service.

Possible causes

The internal processing of the AAID service timed out or was abnormal.

Solution

Try again.

1000900008 PushService Connection Failure

Message

Failed to connect to the push service.

Symptom

This error code is reported when an error occurs during the connection to the PushService.

Possible causes

The PushService is running abnormally.

Solution

Try again.

1000900009 PushService Internal Error

Message

Internal error of the push service.

Symptom

This error code is reported when an exception occurs during task processing in the PushService.

Possible causes

  1. Failed to send a request to the Push Kit server.

  2. The network is unavailable.

  3. The internal processing of the PushService timed out or is faulty.

Solution

  1. Restart the device.

  2. Switch to a new network and try again.

1000900010 App Authentication Failure

Message

Illegal application identity.

Symptom

This error code is reported when the app identity is abnormal.

Possible causes

Solution

  1. Verify the app configuration.

  2. Ensure that your network is working properly.

1000900011 Network Unavailable

Message

The network is unavailable.

Symptom

This error code is reported when the network is abnormal.

Possible causes

The network is unavailable.

Solution

  1. Try again later or reconnect to the network.

  2. The IP address of the push server to which the device connects is dynamically allocated, making it impossible to allow traffic by configuring an IP trustlist. You are advised to connect to an unrestricted network or allow traffic through ports 5223 and 443, and then try again.

1000900012 Push Kit Not Enabled

Message

Push rights are not activated.

Symptom

This error code is reported when Push Kit is not enabled for the app in AppGallery Connect.

Possible causes

Push Kit is not enabled for the app in AppGallery Connect.

Solution

Sign in to AppGallery Connect, open your project, go to Grow > Push Kit in the navigation pane on the left, and enable Push Kit. For details, please refer to step 3 in Procedure.

1000900013 Cross-region Token Application Is Not Allowed

Message

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

Symptom

This error code is reported when an app requests a push token across different data storage locations.

Possible causes

The app requests a push token across different data storage locations.

Solution

Ensure that the device location matches the data processing location set in AppGallery Connect.

1000900014 Token Application Not Supported by Device

Message

The device does not support getting token.

Symptom

Token application is not supported on the device.

Possible causes

Token application is not supported on the device.

Solution

Use a phone, tablet, or PC/2-in-1 device for debugging. Support for wearables is available since 5.1.0(18), and for TVs since 5.1.1(19).

1000900015 Bound App Accounts Reached Upper Limit

Message

The number of bound profile-app relationships exceeds the maximum.

Symptom

This error code is reported when the number of bound app accounts, specifically, accounts in the app's own account system, has reached the upper limit.

Possible causes

The number of bound app accounts exceeds the upper limit (10).

Solution

Call pushService.unbindAppProfileId() to unbind some accounts and try again. For details about the recommended timing for binding and unbinding, please refer to Developing Account Authentication for Notification Messages.

1000900016 HUAWEI ID Not Signed In

Message

The os distributed account is not logged in.

Symptom

No HUAWEI ID is signed in.

Possible causes

No HUAWEI ID is signed in during a HUAWEI ID binding attempt.

Solution

Go to Settings on the device and check whether a HUAWEI ID is signed in. If not, sign in with a HUAWEI ID and try again.

1000900017 Operation Not Supported

Message

The device does not support current operation.

Symptom

This error code is reported when the current device or the country/region to which the device belongs does not support the request for subscription notification authorization.

Possible causes

For account-based atomic service subscription, the device is not a phone, tablet, or PC/2-in-1 device, or the atomic service is not in the foreground during subscription.

Solution

For account-based atomic service subscription, ensure that the app is in the foreground during subscription. Ensure that the device is a phone, tablet, or PC/2-in-1 device.

1000900018 API Calls Too Frequent

Message

Number of calls exceeded.

Symptom

This error code is returned when the API is called too frequently.

Possible causes

Too many requests have been made to this API within a short period of time.

Solution

Reduce the API call frequency, and ensure the API call interval is at least 1 second.

1000900019 Invalid Template ID

Message

Illegal entity id.

Symptom

This error code is reported when an invalid template ID is passed.

Possible causes

For account-based atomic service subscription, the template associated with the template ID is not a valid template obtained from the service notification.

Solution

For account-based atomic service subscription, select a valid template from the service notification. For details, please refer to Selecting a Subscription Template.

1000900020 Empty Push Token

Message

App token is empty.

Symptom

This error code is reported when the push token of the app is empty.

Possible causes

The push token is not requested before this API is called.

Solution

Request a push token and call this API again.

1000900021 App Not Registered in AppGallery Connect

Message

App is not available or not registered.

Symptom

This error code is returned when the app or atomic service is not found in AppGallery Connect.

Possible causes

  1. The app or atomic service is not registered in AppGallery Connect.

  2. The subscription type does not match the app type.

Solution

  1. Ensure that the app or atomic service has been registered in AppGallery Connect. For details, please refer to Application Development Preparations.

  2. Ensure that the subscription type matches the app type. Currently, atomic services support subscription via HUAWEI IDs, and apps support subscription via push tokens.

1000900022 Notification Disabled

Message

Notification switch off.

Symptom

This error code is reported when the notification switch is disabled for the app.

Possible causes

The notification switch is disabled for the app.

Solution

Go to Settings > Notifications > status bar and enable the notification switch for the app.

1000900023 Number of Template IDs Exceeds the Upper Limit

Message

Number of entity ids exceed the upper limit.

Symptom

This error code is reported when the number of passed template IDs exceeds the upper limit.

Possible causes

The number of passed template IDs exceeds the upper limit.

Solution

Ensure that the number of passed template IDs does not exceed 3.

1000900024 Failed to Display the Subscription Notification Authorization Pop-up

Message

Failed to display subscription UI.

Symptom

This error code is returned when the subscription notification authorization pop-up fails to be displayed.

Possible causes

The subscription notification authorization pop-up is already displayed in the foreground.

Solution

Verify that no subscription notification authorization pop-up is displayed in the foreground.

1000900025 No Permission for Using the Template ID

Message

No rights to access entity id.

Symptom

This error code is reported when the message subscription permission is not enabled for the app or atomic service.

Possible causes

For account-based atomic service subscription, service notifications are not enabled.

Solution

For account-based atomic service subscription, please refer toEnabling Service Notifications and Selecting a Subscription Template.

1000900026 Invalid Template ID Type

Message

Illegal entity type.

Symptom

For certain template ID types, one-time subscription allows only one type of template ID per request. Otherwise, this error code is returned.

Possible causes

For account-based atomic service subscription, a long-term subscription template is passed.

Solution

Ensure that no long-term subscription template ID is passed during atomic service subscription.

1000900030 User Has Not Signed in to HUAWEI ID

Message

The user has not logged in with HUAWEI ID.

Symptom

The user has not signed in with their HUAWEI ID for HUAWEI ID-based subscription.

Possible causes

The user has not signed in with their HUAWEI ID during subscription.

Solution

Check whether the user has signed in with their HUAWEI ID under Settings, and ensure they are signed in before initiating the subscription.

1000900031 Only One Callback Can Be Registered Per Type

Message

The same type of callback can be registered only once.

Symptom

Callbacks of the same type were repeatedly registered.

Possible causes

The pushService.on('distributedMessageReceive') API is called repeatedly for registration.

Solution

Ensure that the pushService.on('distributedMessageReceive') API is not repeatedly called for registration.

1000900032 Service Notification Setting Does Not Exist

Message

The service notification setting does not exist.

Symptom

The service notification setting does not exist.

Possible causes

No subscription found for this atomic service under the current account.

Solution

Guide the user to subscribe to atomic service notifications. For details, please refer to Initiating an Account-based Subscription Request.