This topic describes only module-specific error codes. For details about universal error codes, see Universal Error Codes.
12100001 Invalid Parameters
Error Message
Invalid Parameter. Error message: messageInfo.
Description
The input parameter is incorrect.
Possible Causes
- The value of tokenId is 0.
- The permission name is empty or exceeds 256 characters.
- The flag value in the permission authorization or revocation request is invalid.
- The parameters specified for registering a listener are incorrect.
- The specified context does not belong to the current application.
- The requested permissions do not belong to the same permission group.
- The requested permissions include permissions that are not declared by the application.
- The type of the requested global switch is invalid.
- The specified permission is not a user_grant permission.
- The number of array members exceeds 1024 or all members are invalid.
- The start time and end time of the permission usage record to be viewed are invalid.
- The specified permission is not declared in the application.
Solution
Check the input parameters and correct them to valid values. For valid values, see the parameter description of the corresponding API in @ohos.abilityAccessCtrl (Program Access Control Management).
12100004 Listener APIs Not Used in Pairs
Error Message
The API is not used in pair with others.
Description
This error code is returned when the APIs are not called in the required pairing relationship, or are repeatedly called before the pairing relationship is released.
Possible Causes
- The current API is repeatedly called with the same input parameters before the pairing relationship is released.
- One of the listener APIs that must be used in pairs is independently called.
Solution
Check whether the current API is used with its matching API:
- The listener registration API and the listener unregistration API must be used together: after the listener registration API is called, the listener registration API cannot be called again with the same input parameters before the corresponding listener unregistration API is called; the listener unregistration API can be called only after the corresponding listener registration API is called.
Related APIs:
- Subscribe to the permission state change event of the current application: on
- Unsubscribe from the permission state change event of the current application: off
12100005 Listener Overflows
Error Message
The number of listeners exceeds the limit.
Description
The number of listeners exceeds the upper limit.
Possible Causes
The number of registered listeners exceeds the system limit of 200.
Solution
Release unused listeners in a timely manner.
12100007 System Service Not Working Properly
Error Message
Service exception.
Description
The system service is abnormal.
Possible Causes
- The permission management service cannot start properly.
- Failed to read or write IPC (Inter-Process Communication) data.
Solution
Try again later or restart the device.
12100009 Internal Service Error
Error Message
Common inner error.
Description
This error code is returned when an internal service error or a permission popup error occurs.
Possible Causes
- Internal error
- An internal service error or database error occurs.
- Permission popup error
- The application is in the background and cannot properly bring up the popup.
- The device is in the locked state and cannot properly display the popup.
- The popup is not processed in time after being brought up, and the popup process is reclaimed by the system because the application exits. For example, the user clears the application process in the recent tasks screen.
Solution
- Internal error
- Restart the device and try again.
- Permission popup error
- Ensure that the application is in the foreground before initiating the popup request.
- Make sure the device is unlocked before initiating the permission popup request.
- Make sure the popup is handled in a timely manner. If the popup process is reclaimed by the system because the application exits, no additional operation is required.
- If the problem persists, submit a ticket online with the problem description and log information. Technical support personnel will handle it in a timely manner.
12100010 Pending Request
Error Message
The request already exists.
Description
An unprocessed request exists.
Possible Causes
The last request has not been processed yet.
Solution
Wait until the previous permission request is complete, finish the authorization based on the result returned by the previous request, and then initiate the request again.
12100011 All Requested Permissions Granted
Error Message
All permissions in the permission list have been granted.
Description
All input permissions have been granted.
Possible Causes
All requested permissions have been granted.
Solution
No handling is required. This error code indicates that the requested permission has been granted, and the permission setting popup will not be displayed.
12100012 Not All Permissions Are Rejected by the User
Error Message
The permission list contains the permission that has not been revoked by the user.
Description
Some input permissions have not been denied by the user.
Possible Causes
The requested permissions include the permissions that are not rejected by the user.
Solution
Call requestPermissionsFromUser to request permissions from the user first.
12100013 Global Switch Enabled
Error Message
The specific global switch is already open.
Description
The global switch is enabled.
Possible Causes
The global switch is already turned on.
Solution
No handling is required. This error code indicates that the global switch is already enabled, and the global switch setting popup will not be displayed.
12100014 Unexpected Permission
Error Message
Unexpected permission.
Description
The input permission does not meet the requirements.
Possible Causes
- When requestPermissionOnSetting is called to display the permission setting popup again, a permission with the manual_settings authorization mode is passed in.
- During authorization or authorization cancellation, the permission of the non-user_grant or manual_settings authorization mode is passed.
- When openPermissionOnSetting is called to display the popup for redirecting to the settings page, a permission with a non-manual_settings authorization mode is passed in.
Solution
Check whether the input permission meets the requirements.