This section describes only module-specific error codes. For details about universal error codes, please refer to Universal Error Codes.
Message
System internal error.
Description
This error code is reported when a system internal error occurs.
Possible causes
Another unknown error occurred.
Solution
Message
Extension does not exist.
Description
This error code is reported when the ExtensionAbility does not exist.
Possible causes
The ExtensionAbility to be started does not exist in the system.
Solution
Verify that the extensionAbilities module is correctly configured in the src/main/module.json5 file of the project based on the scenario-specific message type.
Message
Extension callback execution failed.
Description
This error code is reported when the ExtensionAbility callback execution fails.
Possible causes
An exception occurred when the onReceiveMessage() callback of the ExtensionAbility is executed.
Solution
Verify the code execution logic in the onReceiveMessage() callback of the ExtensionAbility.
Message
Extension callback execution timed out.
Description
This error code is reported when the ExtensionAbility callback execution times out.
Possible causes
Executing the onReceiveMessage() callback of the ExtensionAbility timed out.
Solution
Verify the code execution logic in the onReceiveMessage() callback of the ExtensionAbility.
Message
Messages of the same push type cannot be received repeatedly.
Description
This error code is reported when a same type of scenario-specific messages is repeatedly registered.
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.
Description
This error code is reported when an error occurs in the PushService connection.
Possible causes
The PushService is faulty.
Solution
Message
Internal error of the AAID service.
Description
This error code is reported when an exception occurs in the internal task processing of the PushService.
Possible causes
The internal processing of the PushService timed out or is faulty.
Solution
Message
Failed to connect to the push service.
Description
This error code is reported when an error occurs in the PushService connection.
Possible causes
The PushService is faulty.
Solution
Message
Internal error of the push service.
Description
This error code is reported when an exception occurs in the internal task processing of the PushService.
Possible causes
Solution
Message
Illegal application identity.
Description
This error code is reported if the app identity is invalid.
Possible causes
Solution
Message
The network is unavailable.
Description
This error code is reported when the network is abnormal.
Possible causes
The network is unavailable.
Solution
Message
Push rights are not activated.
Description
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
Complete operations in Procedure.
Message
Cross-location application is not allowed to obtain the token.
Description
This error code is reported when an app obtains a push token across data storage locations.
Possible causes
The app obtains a push token across data storage locations
Solution
Verify that the device location matches the data processing location set in AppGallery Connect.
Message
The device does not support getting token.
Description
This error code is reported when the device does not support token application.
Possible causes
The device does not support token application.
Solution
Use a phone, tablet, or 2-in-1 device for debugging.
Message
The number of bound profile-app relationships exceeds the maximum.
Description
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 binding and unbinding time, please refer to Developing Account Authentication for Notification Messages.
Message
The os distributed account is not logged in.
Description
This error code is reported when the HUAWEI ID is not signed in.
Possible causes
The HUAWEI ID to be bound is not signed in.
Solution
Go to Settings on the device and check whether the HUAWEI ID is signed in. If not, sign in with the HUAWEI ID and try again.
Message
Current operation does not support.
Description
This error code is reported when the current device or the region where the device is located does not support authorization on notification subscription.
Possible causes
1. When your app initiates message subscription based on a push token, the device is not in the Chinese mainland, or the device is not a phone, tablet, 2-in-1 device, or emulator.
Solution
1. When your app initiates message subscription based on a push token, use a phone, tablet, 2-in-1 device, or emulator in the Chinese mainland to request authorization on notification subscription.
Message
Number of calls exceeded.
Description
This error code is reported when API calls are too frequent.
Possible causes
The number of requests to this API in a short period of time exceeds the limit.
Solution
Decrease the API call frequency.
Message
Illegal entity id.
Description
This error code is reported when an invalid template ID is passed.
Possible causes
1. When an app subscribes to notifications based on a push token, the template ID is not a valid one obtained from Push Kit.
Solution
1. When an app subscribes to notifications based on a push token, obtain a valid template from Push Kit. For details, please refer to Viewing Template Details.
Message
App token is empty.
Description
This error code is reported when the push token of an app is empty.
Possible causes
The app does not obtain a push token before calling this API.
Solution
Obtain a push token before calling this API.
Message
App is not available or not registered.
Description
This error code is reported 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. Verify that the app or atomic service has completed registration in AppGallery Connect. For details, please refer to Preparations.
2. Verify that the subscription type matches the app type. Currently, only apps support subscription through a push token.
Message
Notification switch off.
Description
This error code is reported when the app's notification function is disabled.
Possible causes
The app's notification function is disabled.
Solution
Go to Settings > Notifications & status bar and enable the notification function for the app.
Message
Number of entity ids exceed the upper limit.
Description
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
Verify that the number of passed template IDs does not exceed 3.
Message
Failed to display subscription UI.
Description
This error code is reported when the notification subscription authorization pop-up fails to be displayed.
Possible causes
The notification subscription authorization pop-up has been displayed in the foreground.
Solution
Verify that no notification subscription authorization pop-up is displayed in the foreground.
Message
No rights to access entity id.
Description
This error code is reported when the message subscription permission is not enabled for an app.
Possible causes
1. The message subscription capability is not enabled for the app that subscribes to messages based on a push token.
Solution
1. Enable message subscription for the app that subscribes to messages based on a push token.
Message
The user has not logged in with HUAWEI ID.
Description
This error code is reported when a user has not signed in to the HUAWEI ID during subscription through a HUAWEI ID.
Possible causes
The user has not signed in to the HUAWEI ID.
Solution
Go to Settings, verify that the HUAWEI ID is signed in, and subscribe again.