harmony 鸿蒙Access Control Error Codes
Access Control Error Codes
NOTE
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}.
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.
Solution
Check and correct input parameters. For details about the valid values, see Permission List.
12100002 TokenId Not Exist
Error Message
TokenId does not exist.
Possible Causes
- The specified tokenId does not exist.
- The process of the specified tokenId is not an application process.
Solution
Check and correct input parameters. For details about the valid values, see Permission List.
12100003 Permission Not Exist
Error Message
Permission does not exist.
Possible Causes
- The specified permissionName does not exist.
- The specified permissionName does not match the tokenId in the permission authorization or revocation scenario.
- The specified permissionName is not a sensitive permission that requires user authorization.
Solution
Check and set input parameters correctly. For details about the permissions, see Application Permissions.
12100004 Listener APIs Not Used in Pairs
Error Message
The API is not used in pair with others.
Possible Causes
- One of the listener APIs that must be used in pairs is repeatedly called.
- One of the listener APIs that must be used in pairs is independently called.
Solution
- For the APIs that must be used in pairs, for example, on() and off(), check whether on() with the same parameters is called again before off() is called.
- For the APIs that must be used in pairs, for example, on() and off(), check whether off() is called before on().
12100005 Listener Overflows
Error Message
The number of listeners exceeds the limit.
Possible Causes
The number of listeners exceeds 200.
Solution
Release unused listeners in a timely manner.
12100006 Permission Granting or Revocation Not Supported
Error Message
The specified application does not support the permissions granted or ungranted as specified.
Possible Causes
- The specified tokenId is the identity of a remote device. Distributed permission granting and revocation are not yet supported.
- The specified tokenId belongs to a sandbox application, which is not allowed to request the specified permission.
Solution
- Check whether the method of obtaining tokenId is correct.
- Check whether the sandbox application works in restrictive mode. Most permissions cannot be granted to a sandbox application in restrictive mode.
12100007 System Service Not Working Properly
Error Message
The service is abnormal.
Possible Causes
- The permission management service fails to start properly.
- The data read or write via IPC fails.
Solution
Try again later or restart the device.
12100008 Out of Memory
Error Message
Out of memory.
Possible Causes
The system memory is insufficient.
Solution
Try again later or restart the device.
12100009 Internal Service Error
Error Message
Common inner error.
Possible Causes
An internal error occurs in the system service.
Solution
Analyze the fault log to identify the error.
12100010 Pending Request
Error Message
The request already exists.
Possible Causes
The last request has not been processed yet.
Solution
Wait until the last request is processed.
12100011 All Requested Permissions Granted
Error Message
All permissions in the permission list have been granted.
Possible Causes
All requested permissions have been granted.
Solution
No action is required. If this error code is returned, the permission has been granted and the permission settings dialog box 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.
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.
Possible Causes
The global switch is already turned on.
Solution
No action is required. If this error code is returned, the global switch has been enabled and the dialog box for setting the global switch will not be displayed.
你可能感兴趣的鸿蒙文章
harmony 鸿蒙AbilityAccessControl
harmony 鸿蒙OH_NativeBundle_ApplicationInfo
harmony 鸿蒙OH_NativeBundle_ElementName
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦