• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# HUKS 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## 12000001 Feature Not Supported
8
9**Error Message**
10
11The `${messageInfo}` is not supported.
12
13**Possible Causes**
14The API is supported, but certain features in the API, such as the algorithm, are not supported.
15
16**Solution**
17
18Use the supported features as parameters.
19
20## 12000002 Missing Key Algorithm Parameter
21**Error Message**
22
23Failed to obtain the `${messageInfo}`. It is not set in ParamSet.
24
25**Possible Causes**
26
27The key parameter is not set.
28
29**Solution**
30
311. Determine the missing parameter from the error message.
322. Set the parameter.
33
34## 12000003 Invalid Key Algorithm Parameter
35
36**Error Message**
37
38Invalid `${messageInfo}`.
39
40**Possible Causes**
41
42An invalid parameter is found.
43
44**Solution**
45
461. Determine the invalid parameter from the error message.
472. Correct the invalid parameter.
48
49## 12000004 File Error
50
51**Error Message**
52
53A file error can be any of the following:
54
55- Insufficient storage space.
56- Invalid file size.
57- Failed to `${messageInfo}`.
58
59
60**Possible Causes**
61
62The file operation failed.
63
64**Solution**
65
661. Check whether sufficient disk space is available and whether the file system is normal.
672. Clear the disk space.
68
69## 12000005 IPC Error
70
71**Error Message**
72
73An IPC error can be any of the following:
74
75- Failed to get messages from IPC.
76- IPC `${messageInfo}`.
77
78**Possible Causes**
79
80The Inter-Process Communication (IPC) failed.
81
82**Solution**
83
84Locate and rectify the IPC failure.
85
86## 12000006 Algorithm Library Operation Failed
87
88**Error Message**
89
90Crypto engine error.
91
92**Possible Causes**
93
94The algorithm library operation fails. The possible causes include the following:
95
961. The encryption and decryption on the algorithm library failed due to incorrect ciphertext data.
972. Incorrect key parameters exist.
98
99**Solution**
100
1011. Check and correct the ciphertext data.
1022. Check and correct the key parameters.
103
104## 12000007 Failed to Access the Key Due to Invalidated Credential
105
106**Error Message**
107
108This credential is invalidated permanently.
109
110**Possible Causes**
111
112The possible causes include the following:
113
1141. The key is configured with the user access control attribute and becomes invalid after the password is cleared.
1152. The key is configured with the user access control attribute and becomes invalid after a new biometric feature is enrolled.
116
117**Solution**
118
1191. Locate the cause of the authentication failure based on the log.
1202. If the authentication fails due to the configuration of the access control attribute, the key cannot be used any more.
121
122## 12000008 Failed to Access the Key Due to a Failure in Authentication Token Verification
123
124**Error Message**
125
126The authentication token verification failed.
127
128**Possible Causes**
129
130The challenge value is incorrect.
131
132**Solution**
133
1341. Check whether the challenge for user IAM authentication is correctly assembled.
1352. If the challenge value is incorrect, modify the assembly mode, use the bytes generated by HUKS to assembly the challenge value, and pass it to user IAM for authentication.
136
137## 12000009 Key Access Timed Out
138
139**Error Message**
140
141This authentication token timed out.
142
143**Possible Causes**
144
145The authentication failed because the authentication token timed out.
146
147**Solution**
148
149Initialize the key and perform the authentication again. Ensure that the difference between the current time and the authentication token generation time is less than the timeout interval.
150
151## 12000010 Key Operation Sessions Reaches the Limit
152
153**Error Message**
154
155The number of key operation sessions has reached the limit.
156
157**Possible Causes**
158
159The number of concurrent key operation sessions has reached the maximum (15).
160
161**Solution**
162
1631. Check whether there are multiple key session operations (**init** operations) for the same application. If yes, modify the code to avoid concurrent invoking.
1642. If the key operation sessions are set up for different applications, wait until the sessions are released.
165
166## 12000011 The Entity Does Not Exist
167
168**Error Message**
169
170The entity does not exist.
171
172**Possible Causes**
173
174The key corresponding to the key alias does not exist.
175
176**Solution**
177
1781. Check whether the key alias is correctly spelled.
1792. Check whether the key corresponding to the key alias is successfully generated.
180
181## 12000012 External Error
182
183**Error Message**
184
185System external error.
186
187**Possible Causes**
188
189An external error, such as a hardware fault or file error, occurs.
190
191**Solution**
192
193Provide the error code and log information to the related party.
194
195## 12000013 The Credential Does Not Exist
196
197**Error Message**
198
199The credential does not exist.
200
201**Possible Causes**
202
203The credential, such as the PIN, fingerprint, or face image, is not enrolled.
204
205**Solution**
206
207Enroll the credential or change the authentication type bound to the key.
208
209## 12000014 Insufficient Memory
210
211**Error Message**
212
213- Insufficient memory.
214- Malloc failed.
215
216
217**Possible Causes**
218
219The system memory is insufficient.
220
221**Solution**
222
223Release memory or restart the device.
224
225## 12000015 Failed to Invoke Other System Services
226
227**Error Message**
228
229Failed to obtain the `${messageInfo}` information via UserIAM.
230
231**Possible Causes**
232
233The called system service has not started.
234
235**Solution**
236
237Wait for the system service to start and call the API again.
238