This section describes only module-specific error codes. For details about universal error codes, please refer to Universal Error Codes.
Message
System internal error.
Symptom
This error code is reported when an internal system error occurs.
Possible causes
An unknown error occurred.
Solution
Try again.
If the pushService.on('tokenUpdate') API returns error code 1000900001, check for repeated registrations.
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.
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.
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.
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.
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.
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.
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.
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
Failed to send a request to the Push Kit server.
The network is unavailable.
The internal processing of the PushService timed out or is faulty.
Solution
Restart the device.
Switch to a new network and try again.
Message
Illegal application identity.
Symptom
This error code is reported when the app identity is abnormal.
Possible causes
The app configuration is incorrect.
The app is not selected as a HarmonyOS app when created on AppGallery Connect.
Push Kit is not enabled under Project settings > Manage Open Capabilities in AppGallery Connect. Refer to step 5 and step 6 in Enabling Push Kit to complete signing for the corresponding phases.
Push Kit has been enabled under Project settings > Manage Open Capabilities in AppGallery Connect, but a new profile is not requested. Refer to step 5 and step 6 in Enabling Push Kit to complete signing for the corresponding phases.
The network is unavailable.
The Huawei server is abnormal.
Debugging on cloud real devices is not supported.
Solution
Verify the app configuration.
Ensure that your network is working properly.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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
The app or atomic service is not registered in AppGallery Connect.
The subscription type does not match the app type.
Solution
Ensure that the app or atomic service has been registered in AppGallery Connect. For details, please refer to Application Development Preparations.
Ensure that the subscription type matches the app type. Currently, atomic services support subscription via HUAWEI IDs, and apps support subscription via push tokens.
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.
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.
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.
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.
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.
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.
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.
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.