errorcode-bundle.md 12.8 KB
Newer Older
G
Gloria 已提交
1 2
#  Bundle Error Codes

3
## 17700001 Bundle Name Does Not Exist
G
Gloria 已提交
4 5

**Error Message**
G
Gloria 已提交
6

G
Gloria 已提交
7 8 9
The specified bundle name is not found.

**Description**
G
Gloria 已提交
10

11
When a query API is called, the bundle name passed in does not exist.
G
Gloria 已提交
12 13

**Possible Causes**
G
Gloria 已提交
14

G
Gloria 已提交
15
1. The bundle name is misspelled.
16
2. The corresponding bundle is not installed.
G
Gloria 已提交
17 18

**Solution**
G
Gloria 已提交
19

G
Gloria 已提交
20
1. Check whether the spelling of the bundle name is correct.
21
2. Check whether the corresponding bundle is installed.
G
Gloria 已提交
22

23
## 17700002 Module Name Does Not Exist
G
Gloria 已提交
24 25

**Error Message**
G
Gloria 已提交
26

G
Gloria 已提交
27 28 29
The specified module name is not found.

**Description**
G
Gloria 已提交
30

31
When a query API or an installation-free API is called, the module name passed in does not exist.
G
Gloria 已提交
32 33 34

**Possible Causes**
1. The module name is misspelled.
35
2. The module is not installed.
G
Gloria 已提交
36 37 38

**Solution**
1. Check whether the spelling of the module name is correct.
39
2. Check whether the module is installed.
G
Gloria 已提交
40

41
## 17700003 Ability Name Does Not Exist
G
Gloria 已提交
42 43

**Error Message**
G
Gloria 已提交
44

G
Gloria 已提交
45 46 47
The specified ability name is not found.

**Description**
G
Gloria 已提交
48

49
When a query API is called, the ability name passed in does not exist.
G
Gloria 已提交
50 51 52

**Possible Causes**
1. The ability name is misspelled.
G
Gloria 已提交
53
2. The application does not have the ability specified by **abilityName**.
G
Gloria 已提交
54 55 56

**Solution**
1. Check whether the spelling of the ability name is correct.
G
Gloria 已提交
57
2. Check whether the application has the ability specified by **abilityName**.
G
Gloria 已提交
58

59
## 17700004 User ID Does Not Exist
G
Gloria 已提交
60 61

**Error Message**
G
Gloria 已提交
62

63
The specified user ID is not found.
G
Gloria 已提交
64 65

**Description**
G
Gloria 已提交
66

67
When a user-related API is called, the user ID passed in does not exist.
G
Gloria 已提交
68 69

**Possible Causes**
G
Gloria 已提交
70 71
1. Incorrect username.
2. The user does not exist in the system.
G
Gloria 已提交
72 73 74 75 76

**Solution**
1. Check whether the user ID is correct.
2. Check whether the user exists.

G
Gloria 已提交
77
## 17700005 appId Is an Empty String
G
Gloria 已提交
78 79

**Error Message**
G
Gloria 已提交
80

G
Gloria 已提交
81
The specified app ID is empty string.
G
Gloria 已提交
82 83

**Description**
G
Gloria 已提交
84

85
When an API of the **appControl** module is called, the application ID passed in does not exist.
G
Gloria 已提交
86 87

**Possible Causes**
G
Gloria 已提交
88

G
Gloria 已提交
89 90 91
**appId** is an empty string.

**Solution**
G
Gloria 已提交
92

G
Gloria 已提交
93 94
Check whether **appId** is an empty string.

95
## 17700006 Permission Does Not Exist
G
Gloria 已提交
96 97

**Error Message**
G
Gloria 已提交
98

G
Gloria 已提交
99 100 101
The specified permission is not found.

**Description**
G
Gloria 已提交
102

103
When the **getPermissionDef** API of the **bundleManager** module is called, the permission passed in does not exist.
G
Gloria 已提交
104 105 106 107 108 109 110 111 112 113 114 115

**Possible Causes**
1. The permission name is misspelled.
2. The permission does not exist.

**Solution**
1. Check whether the spelling of the permission name is correct.
2. Check whether the permission exists.

## 17700007 Incorrect Device ID

**Error Message**
G
Gloria 已提交
116

117
The specified device ID is not found.
G
Gloria 已提交
118 119

**Description**
G
Gloria 已提交
120

121
When an API of the **distributedBundle** module is called, the device ID passed in does not exist.
G
Gloria 已提交
122 123 124 125 126 127

**Possible Causes**
1. The device ID is incorrect.
2. The device ID does not exist.

**Solution**
G
Gloria 已提交
128

G
Gloria 已提交
129 130 131
1. Check whether the device ID is correct.
2. Check whether the device ID exists.

132
## 17700010 Bundle Installation Failure Due to File Parsing Failure
G
Gloria 已提交
133 134

**Error Message**
G
Gloria 已提交
135

136
Failed to install the HAP because the HAP fails to be parsed.
G
Gloria 已提交
137 138

**Description**
G
Gloria 已提交
139

140
When the **install** API of the **installer** module is called, the HAP passed in fails to be parsed.
G
Gloria 已提交
141 142

**Possible Causes**
G
Gloria 已提交
143

G
Gloria 已提交
144 145 146 147 148
1. The HAP is not in ZIP format.
2. The configuration file in the HAP is not in JSON format.
3. Necessary fields are missing in the configuration file.

**Solution**
G
Gloria 已提交
149

G
Gloria 已提交
150
1. Check whether the HAP is in ZIP format.
G
Gloria 已提交
151
2. Check whether the configuration file is in [JSON format](../../quick-start/application-configuration-file-overview-stage.md).
G
Gloria 已提交
152 153
3. Check whether an error message is displayed when DevEco Studio compiles the HAP. If necessary fields are missing, an error message will be displayed.

154
## 17700011 Bundle Installation Failure Due to Signature Verification Failure
G
Gloria 已提交
155 156

**Error Message**
G
Gloria 已提交
157

158
Failed to install the HAP because the HAP signature fails to be verified.
G
Gloria 已提交
159 160

**Description**
G
Gloria 已提交
161

162
Calling the **install** API of the **installer** module to install the bundle fails due to signature verification failure.
G
Gloria 已提交
163 164 165 166 167 168 169 170 171 172

**Possible Causes**

1. The HAP is not signed.
2. The source of the HAP signature information is unreliable.
3. The signature information of the HAP used for an upgrade is different from that of the installed HAP.
4. The signature information of multiple HAPs is inconsistent.

**Solution**
1. Check whether the HAP is signed.
G
Gloria 已提交
173 174 175
2. Ensure that the signature certificate of the HAP is applied for from the application market.
3. Check whether the same certificate is used for signing multiple HAPs.
4. Check whether the certificate used for signing the upgrade HAP is the same as the certificate used for signing the installed HAP.
G
Gloria 已提交
176

177
## 17700012 Bundle Installation Failure Due to Invalid File Path or Too Large File
G
Gloria 已提交
178 179

**Error Message**
G
Gloria 已提交
180

181
Failed to install the HAP because the HAP path is invalid or the HAP is too large.
G
Gloria 已提交
182 183

**Description**
G
Gloria 已提交
184

185
Calling the **install** API of the **installer** module to install the bundle fails because the HAP path is invalid or the HAP is too large.
G
Gloria 已提交
186 187 188 189 190 191 192 193 194 195 196

**Possible Causes**
1. The path of the HAP does not exist.
2. The path of the HAP is inaccessible.
3. The size of the HAP exceeds the upper limit 4 GB.

**Solution**
1. Check whether the HAP path exists.
2. Check whether the HAP is read only or executable.
3. Check whether the size of the HAP exceeds 4 GB.

G
Gloria 已提交
197
## 17700015 Bundle Installation Failure Due to Different Configuration Information of Multiple HAPs
G
Gloria 已提交
198 199

**Error Message**
G
Gloria 已提交
200

201
Failed to install the HAPs because they have different configuration information.
G
Gloria 已提交
202 203

**Description**
G
Gloria 已提交
204

205
Calling the **install** API of the **installer** module to install the bundle fails because the HAPs have different configuration information.
G
Gloria 已提交
206 207

**Possible Causes**
G
Gloria 已提交
208

G
Gloria 已提交
209 210 211
The fields under **app** in the configuration files of these HAPs are inconsistent.

**Solution**
G
Gloria 已提交
212

G
Gloria 已提交
213 214
Check whether the fields under **app** are the same.

215
## 17700016 Bundle Installation Failure Due to Insufficient System Disk Space
G
Gloria 已提交
216 217

**Error Message**
G
Gloria 已提交
218

219
Failed to install the HAP because of insufficient system disk space.
G
Gloria 已提交
220 221

**Description**
G
Gloria 已提交
222

223
Calling the **install** API of the **installer** module to install the bundle fails due to insufficient system disk space.
G
Gloria 已提交
224 225

**Possible Causes**
G
Gloria 已提交
226

G
Gloria 已提交
227 228 229
The system disk space is insufficient.

**Solution**
G
Gloria 已提交
230

G
Gloria 已提交
231 232
Check whether the system has sufficient disk space.

233
## 17700017 Bundle Installation Failure Because the Version to Install is Too Earlier
G
Gloria 已提交
234 235

**Error Message**
G
Gloria 已提交
236

237
Failed to install the HAP since the version of the HAP to install is too early.
G
Gloria 已提交
238 239

**Description**
G
Gloria 已提交
240

241
Calling the **install** API of the **installer** module to install the bundle fails because the version to install is earlier than the version in use.
G
Gloria 已提交
242 243

**Possible Causes**
G
Gloria 已提交
244

G
Gloria 已提交
245 246 247
The version number is earlier than the version in use.

**Solution**
G
Gloria 已提交
248

G
Gloria 已提交
249
Ensure that the version of the bundle to install is not earlier than the version in use.
G
Gloria 已提交
250 251 252 253

## 17700020 Failure to Uninstall Preinstalled Applications

**Error Message**
G
Gloria 已提交
254

G
Gloria 已提交
255 256 257
The preinstalled app cannot be uninstalled.

**Description**
G
Gloria 已提交
258

259
Calling the **uninstall** API of the **installer** module to uninstall a preinstalled application fails.
G
Gloria 已提交
260 261 262 263 264 265 266 267 268 269 270 271

**Possible Causes**
1. You might want to uninstall a non-preinstalled application but passed the bundle name of a preinstalled app.
2. The preinstalled application cannot be uninstalled.

**Solution**
1. Check whether the bundle name is correct.
1. Check whether the preinstalled application can be uninstalled.

## 17700021 Invalid UID

**Error Message**
G
Gloria 已提交
272

G
Gloria 已提交
273 274 275
The specified uid is invalid.

**Description**
G
Gloria 已提交
276

277
When the **getBundleNameByUid** API of the **bundleManager** module is called, the UID passed in is invalid.
G
Gloria 已提交
278 279 280 281 282 283 284 285 286 287 288 289

**Possible Causes**
1. The UID is misspelled.
2. The UID does not exist.

**Solution**
1. Check whether the UID is correct.
2. Check whether the UID exists.

## 17700022 Invalid Source File

**Error Message**
G
Gloria 已提交
290

G
Gloria 已提交
291 292 293
The input source file is invalid.

**Description**
G
Gloria 已提交
294

295
When the **getBundleArchiveInfo** API of the **bundleManager** module is called, the HAP path passed in is invalid.
G
Gloria 已提交
296 297 298 299 300 301 302 303 304

**Possible Causes**
1. The source file to be parsed does not exist.
2. The source file to be parsed is not in ZIP format.

**Solution**
1. Check whether the source file to be parsed exists.
2. Check whether the source file to be parsed is in ZIP format.

305
## 17700023 Default Application Does Not Exist
G
Gloria 已提交
306 307

**Error Message**
G
Gloria 已提交
308

G
Gloria 已提交
309 310 311
The specified default app does not exist.

**Description**
G
Gloria 已提交
312

313
When the **getDefaultApplication** API of the **defaultAppManager** module is called, the specified default application does not exist.
G
Gloria 已提交
314 315

**Possible Causes**
G
Gloria 已提交
316

G
Gloria 已提交
317 318 319
No default application is set for the device.

**Solution**
G
Gloria 已提交
320

G
Gloria 已提交
321 322
Check whether the default application is set on the device.

323
## 17700024 Configuration File Does Not Exist
G
Gloria 已提交
324 325

**Error Message**
G
Gloria 已提交
326

327
Failed to get the profile because there is no profile in the HAP.
G
Gloria 已提交
328 329

**Description**
G
Gloria 已提交
330

331
When an API for querying the profile is called, the configuration file does not exist 
G
Gloria 已提交
332 333 334 335 336 337 338 339 340 341 342 343

**Possible Causes**
1. The metadata name passed in the API does not exist in the configuration file.
2. The content of the configuration file is not in JSON format.

**Solution**
1. Check whether the metadata name in the **ability** or **extensionAbility** to be queried exists.
2. Check whether the content of the profile to be queried is in JSON format.

## 17700025 Invalid Type

**Error Message**
G
Gloria 已提交
344

G
Gloria 已提交
345 346 347
The specified type is invalid.

**Description**
G
Gloria 已提交
348

349
When an API of the **defaultAppManager** module is called, the type passed in is invalid.
G
Gloria 已提交
350 351 352 353 354 355

**Possible Causes**
1. The type passed in the API is misspelled.
2. The type passed in the API does not exist.

**Solution**
G
Gloria 已提交
356 357
1. Check whether the spelling of type is correct.
2. Enter a type that exists.
G
Gloria 已提交
358

359
## 17700026 Bundle Disabled
G
Gloria 已提交
360 361

**Error Message**
G
Gloria 已提交
362

G
Gloria 已提交
363 364 365
The specified bundle is disabled.

**Description**
G
Gloria 已提交
366

367
When an API for querying bundle information is called, the specified bundle is disabled.
G
Gloria 已提交
368 369

**Possible Causes**
G
Gloria 已提交
370

371
The bundle on the device has been disabled and cannot be queried.
G
Gloria 已提交
372 373

**Solution**
G
Gloria 已提交
374

375
Check whether the bundle on the device is disabled.
G
Gloria 已提交
376

377
## 17700027 Distributed Service Is Not Started
G
Gloria 已提交
378 379

**Error Message**
G
Gloria 已提交
380

G
Gloria 已提交
381 382 383
The distributed service is not running.

**Description**
G
Gloria 已提交
384

385
When an API of the **distributedBundle** module is called, the distributed service is not started.
G
Gloria 已提交
386 387

**Possible Causes**
G
Gloria 已提交
388

G
Gloria 已提交
389 390 391
The device is not networked.

**Solution**
G
Gloria 已提交
392

G
Gloria 已提交
393
Check whether the device is networked.
G
Gloria 已提交
394

G
Gloria 已提交
395 396 397
## 17700028 Mismatch Between Ability and Type

**Error Message**
G
Gloria 已提交
398

G
Gloria 已提交
399 400 401
The ability does not match the type.

**Description**
G
Gloria 已提交
402

403
When the **setDefaultApplication** API of the **defaultAppManager** module is called, the **ability** and **type** passed in do not match.
G
Gloria 已提交
404 405

**Possible Causes**
G
Gloria 已提交
406

G
Gloria 已提交
407 408 409
The ability and type are misspelled.

**Solution**
G
Gloria 已提交
410

G
Gloria 已提交
411 412 413 414 415
Check whether the spellings of ability and type are correct.

## 17700029 Disabled Ability

**Error Message**
G
Gloria 已提交
416

G
Gloria 已提交
417 418 419
The specified ability is disabled.

**Description**
G
Gloria 已提交
420

421
When an API for querying ability information is called, the specified ability is disabled.
G
Gloria 已提交
422 423

**Possible Causes**
G
Gloria 已提交
424

G
Gloria 已提交
425 426 427
The specified ability is disabled.

**Solution**
G
Gloria 已提交
428

429
Check whether the ability is disabled. You can run the [bm commands](../../../readme/bundle-management.md#bm-commands) to query the information.
G
Gloria 已提交
430 431 432 433

## 17700030 Failure in Clearing Cache Files

**Error Message**
G
Gloria 已提交
434

435
The specified bundle does not support clearing of cache files.
G
Gloria 已提交
436 437

**Description**
G
Gloria 已提交
438

439
When the **cleanBundleCacheFiles** API of the **bundleManager** module is called, the specified bundle does not support cache file clearing.
G
Gloria 已提交
440 441

**Possible Causes**
G
Gloria 已提交
442

G
Gloria 已提交
443 444 445 446
The application is a system application and the **AllowAppDataNotCleared** field is configured in the signing certificate.

**Solution**
1. Check whether the application is a system application. You can run the [bm commands](../../../readme/bundle-management.md#bm-commands) to query the application information and check whether the value of **isSystemApp** is **true**.
G
Gloria 已提交
447 448
2. Check whether the **AllowAppDataNotCleared field** is configured for the application. You can run the [bm commands](../../../readme/bundle-management.md#bm-commands) to query the application information and check whether the value of **userDataClearable** is **true**.

G
Gloria 已提交
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471
## 17700031 HAP Installation Fails Due to Overlay Feature Verification Failure

**Error Message**

Failed to install the HAP because the overlay check of the HAP is failed.

**Description**

The target application and the to-be-installed application with the overlay feature are not preset applications, or the target application or target module is one with the overlay feature.

**Possible Causes**
1. To use the overlay feature between applications, the following conditions must be met:<br>The application with the overlay feature must be a preset application.
2. The target application must be a preset application.
3. The target application cannot be an application with the overlay feature.
4. The target module cannot be a module with the overlay feature.

**Solution**
1. Ensure that the application with the overlay feature is a preset application.
2. Ensure that the target application is a preset application.
3. Ensure that the target application is not an application with the overlay feature.
4. Ensure that the target module is not a module with the overlay feature.