• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Access Control Error Codes
2
3> **NOTE**
4>
5> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](../errorcode-universal.md).
6
7## 12100001 Invalid Parameters
8
9**Error Message**
10
11Invalid Parameter. Error message: ${messageInfo}.
12
13**Possible Causes**
14
151. The value of **tokenId** is **0**.
162. The permission name is empty or exceeds 256 characters.
173. The **flag** value in the permission authorization or revocation request is invalid.
184. The parameters specified for registering a listener are incorrect.
195. The specified context does not belong to the current application.
206. The requested permissions do not belong to the same permission group.
217. The requested permissions include permissions that are not declared by the application.
228. The type of the requested global switch is invalid.
23
24**Solution**
25
26Check and set input parameters correctly.
27
28
29## 12100002 TokenId Not Exist
30
31**Error Message**
32
33TokenId does not exist.
34
35**Possible Causes**
36
371. The specified **tokenId** does not exist.
382. The process of the specified **tokenId** is not an application process.
39
40**Solution**
41
42Check and set input parameters correctly.
43
44
45## 12100003 Permission Not Exist
46
47**Error Message**
48
49Permission does not exist.
50
51**Possible Causes**
52
531. The specified **permissionName** does not exist.
542. The specified **permissionName** does not match the **tokenId** in the permission authorization or revocation scenario.
553. The specified **permissionName** is not a sensitive permission that requires user authorization.
56
57**Solution**
58
59Check and set input parameters correctly. For details about the permissions, see [Application Permissions](../../security/AccessToken/app-permissions.md).
60
61
62## 12100004 Listener APIs Not Used in Pairs
63
64**Error Message**
65
66The API is not used in pair with others.
67
68**Possible Causes**
69
701. One of the listener APIs that must be used in pairs is repeatedly called.
712. One of the listener APIs that must be used in pairs is independently called.
72
73**Solution**
74
751. 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.
762. For the APIs that must be used in pairs, for example, **on()** and **off()**, check whether **off()** is called before **on()**.
77
78
79## 12100005 Listener Overflows
80
81**Error Message**
82
83The number of listeners exceeds the limit.
84
85**Possible Causes**
86
87The number of listeners exceeds 200.
88
89**Solution**
90
91Release unused listeners in a timely manner.
92
93
94## 12100006 Permission Granting or Revocation Not Supported
95
96**Error Message**
97
98The specified application does not support the permissions granted or ungranted as specified.
99
100**Possible Causes**
101
1021. The specified **tokenId** is the identity of a remote device. Distributed permission granting and revocation are not yet supported.
1032. The specified **tokenId** belongs to a sandbox application, which is not allowed to request the specified permission.
104
105**Solution**
106
1071. Check whether the method of obtaining **tokenId** is correct.
1082. Check whether the sandbox application works in restrictive mode. Most permissions cannot be granted to a sandbox application in restrictive mode.
109
110
111## 12100007 System Service Not Working Properly
112
113**Error Message**
114
115The service is abnormal.
116
117**Possible Causes**
118
1191. The permission management service fails to start properly.
1202. The data read or write via IPC fails.
121
122**Solution**
123
124Try again later or restart the device.
125
126
127## 12100008 Out of Memory
128
129**Error Message**
130
131Out of memory.
132
133**Possible Causes**
134
135The system memory is insufficient.
136
137**Solution**
138
139Try again later or restart the device.
140
141
142## 12100009 Internal Service Error
143
144**Error Message**
145
146Common inner error.
147
148**Possible Causes**
149
150An internal error occurs in the system service.
151
152**Solution**
153
154Analyze the fault log to identify the error.
155
156## 12100010 Pending Request
157
158**Error Message**
159
160The request already exists.
161
162**Possible Causes**
163
164The last request has not been processed yet.
165
166**Solution**
167
168Wait until the last request is processed.
169
170
171## 12100011 All Requested Permissions Granted
172
173**Error Message**
174
175All permissions in the permission list have been granted.
176
177**Possible Causes**
178
179All requested permissions have been granted.
180
181**Solution**
182
183No action is required. If this error code is returned, the permission has been granted and the permission settings dialog box will not be displayed.
184
185
186## 12100012 Not All Permissions Are Rejected by the User
187
188**Error Message**
189
190The permission list contains the permission that has not been revoked by the user.
191
192**Possible Causes**
193
194The requested permissions include the permissions that are not rejected by the user.
195
196**Solution**
197
198Call **requestPermissionsFromUser** to request permissions from the user first.
199
200
201## 12100013 Global Switch Enabled
202
203**Error Message**
204
205The specific global switch is already open.
206
207**Possible Causes**
208
209The global switch is already turned on.
210
211**Solution**
212
213No 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.
214