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
15This error code is reported when the parameter verification fails. The possible causes are as follows:
16- The value of **tokenId** is **0**.
17- The permission name is empty or exceeds 256 characters.
18- The **flag** value in the permission authorization or revocation request is invalid.
19- The parameters specified for registering a listener are incorrect.
20- The specified context does not belong to the current application.
21- The requested permissions do not belong to the same permission group.
22- The requested permissions include permissions that are not declared by the application.
23- The type of the requested global switch is invalid.
24
25**Solution**
26
27Correct invalid parameter values.
28
29
30## 12100002 TokenId Not Exist
31
32**Error Message**
33
34TokenId does not exist.
35
36**Possible Causes**
37
38- The specified **tokenId** does not exist.
39- The process of the specified **tokenId** is not an application process.
40
41**Solution**
42
43Set **tokenId** correctly.
44
45
46## 12100003 Permission Not Exist
47
48**Error Message**
49
50Permission does not exist.
51
52**Possible Causes**
53
54- The specified **permissionName** does not exist.
55- The specified **permissionName** does not match the **tokenId** in the permission authorization or revocation scenario.
56- The specified **permissionName** is not a sensitive permission that requires user authorization.
57
58**Solution**
59
60Set **permissionName** correctly. For details, see [Permissions for All Applications](../../security/AccessToken/permissions-for-all.md).
61
62
63## 12100004 Listener APIs Not Used in Pairs
64
65**Error Message**
66
67The API is not used in pair with others.
68
69**Possible Causes**
70
711. One of the APIs that need to be used in pairs is repeatedly called.
722. One of the APIs that need to be used in pairs is independently called.
73
74**Solution**
75
761. For the APIs that need to be used in pairs, for example, **on()** and **off()**, check whether **on()** with the same parameters is called again before **off()** is called.
772. For the APIs that need to be used in pairs, for example, **on()** and **off()**, check whether **off()** is called before **on()**.
78
79
80## 12100005 Listener Overflows
81
82**Error Message**
83
84The number of listeners exceeds the limit.
85
86**Possible Causes**
87
88The number of listeners exceeds 200.
89
90**Solution**
91
92Release unused listeners in a timely manner.
93
94
95## 12100006 Permission Granting or Revocation Not Supported
96
97**Error Message**
98
99The specified application does not support the permissions granted or ungranted as specified.
100
101**Possible Causes**
102
1031. The specified **tokenId** is the identity of a remote device. Distributed permission granting and revocation are not yet supported.
1042. The specified **tokenId** belongs to a sandbox application, which is not allowed to request the specified permission.
105
106**Solution**
107
1081. Check whether the method of obtaining **tokenId** is correct.
1092. Check whether the sandbox application works in restrictive mode. Most permissions cannot be granted to a sandbox application in restrictive mode.
110
111
112## 12100007 System Service Not Working Properly
113
114**Error Message**
115
116The service is abnormal.
117
118**Possible Causes**
119
1201. The permission management service fails to start properly.
1212. The data read or write via IPC fails.
122
123**Solution**
124
125Try again later or restart the device.
126
127
128## 12100008 Out of Memory
129
130**Error Message**
131
132Out of memory.
133
134**Possible Causes**
135
136The system memory is insufficient.
137
138**Solution**
139
140Try again later or restart the device.
141
142
143## 12100009 Internal Service Error
144
145**Error Message**
146
147Common inner error.
148
149**Possible Causes**
150
151An internal error occurs in the system service.
152
153**Solution**
154
155Analyze the fault log to identify the error.
156
157## 12100010 Pending Request
158
159**Error Message**
160
161The request already exists.
162
163**Possible Causes**
164
165The last request has not been processed yet.
166
167**Solution**
168
169Wait until the last request is processed.
170
171
172## 12100011 All Requested Permissions Granted
173
174**Error Message**
175
176All permissions in the permission list have been granted.
177
178**Possible Causes**
179
180All requested permissions have been granted.
181
182**Solution**
183
184No action is required. If this error code is returned, the permission has been granted and the permission settings dialog box will not be displayed.
185
186
187## 12100012 Not All Permissions Are Rejected by the User
188
189**Error Message**
190
191The permission list contains the permission that has not been revoked by the user.
192
193**Possible Causes**
194
195The requested permissions include the permissions that are not rejected by the user.
196
197**Solution**
198
199Call **requestPermissionsFromUser** to request permissions from the user first.
200
201
202## 12100013 Global Switch Enabled
203
204**Error Message**
205
206The specific global switch is already open.
207
208**Possible Causes**
209
210The global switch is already turned on.
211
212**Solution**
213
214No 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.
215