目录

Package Parsing Error Codes

Error Code

Description

4

Failed to parse the package due to an unknown error.

5

The package is invalid because the default widget does not meet the requirements.

6

The package is invalid because the preload module is missing.

7

The package is invalid because the size of a single module exceeds 2 MB.

8

The size of the package exceeds 10 MB.

9

The package is invalid because the package it depends on is missing.

10

This atomic service uses the FA model. For each device type under this model, non-entry modules are not allowed.

11

This atomic service has multiple entry packages for a device type, but only one entry package is allowed.

12

The device types default and phone coexist.

13

The widgets and snapshots in the package do not meet the requirements.

991

Invalid package.

992

The value of bundleName parsed from the package is different from that set when the app was created, or the names of involved HAPs are not the same.

993

Invalid profile.

994

The package does not exist.

995

The package you uploaded is not a HarmonyOS package with the file name extension .app.

996

Failed to parse the package due to an unknown error.

997

The value of bundleName does not match the app.

998

The uploaded package does not support the selected devices.

999

The profile type used by the uploaded HarmonyOS app package is incorrect.

1000

The profile used by the uploaded HarmonyOS app package has expired.

1001

The profile used by the uploaded HarmonyOS app package does not match the certificate.

1002

The certificate used by the uploaded HarmonyOS app package has expired.

1003

The certificate used by the uploaded HarmonyOS app package has not taken effect.

1004

An app with the same value of bundleName has been created.

1005

The certificate is invalid.

1006

The HAP is too large.

1007

The version number of the submitted HarmonyOS app is earlier than the version number of shell.apk in the package.

1008

The associated Android app is incorrect.

1009

Either appId or packageName of the Android app bound to the atomic service is missing.

1010

The package is not an atomic service package.

1011

The package is not a HarmonyOS app package.

1012

The HAPs in the package are of different types.

1014

The HAP has not been signed.

1015

The compressed package format failed the security check.

1021

The API version of the uploaded test package is earlier than 10.

1023

Custom encryption is not supported.

1026

The package type does not match the app type.

7011

The shell.apk file is missing.

7012

Failed to read shell.apk.

7013

The permission list in shell.apk exceeds the upper limit.

7014

The permissions configured in the package are inconsistent with those requested by the profile.

7015

The package cannot be released.

7017

The version of the profile in the package does not meet requirements.

7021

System error.

7022

The package cannot be released on AppGallery.

7023

The package cannot be released on AppGallery.

7024

The package cannot be released on AppGallery.

9999

API call validation failed for your atomic service.

205389875

The uploaded CSR file is invalid.

Error code 4: Failed to parse the package due to an unknown error

This problem is caused by an unknown error during package parsing. Try again later. If the problem persists, submit a ticket to Huawei technical support.

Error code 5: The package is invalid because the default widget does not meet the requirements

Each atomic service must have only one default widget per device type, and this default widget can only be placed in the entry package.

Check whether the isDefault field set for each device type in your package meets the following specifications. If not, modify the setting as required and re-package the atomic service.

Error code 6: The package is invalid because the preload module is missing

This error occurs because the package lacks the preload module. Add the preload module and upload the package again. For details, please refer to Preloading.

Error code 7: The package is invalid because the size of a single module exceeds 2 MB

For an atomic service that adopts the stage model, its package must meet the following requirements:

Check whether your atomic service package meets the preceding requirements. If not, delete invalid resources, re-package the atomic service, and upload the new package.

Error code 8: The size of the package exceeds 10 MB

Check whether your package meets either of the following requirements:

If your package fails to meet the requirement, delete invalid resources, re-package the atomic service, and upload the new package.

Error code 9: The package is invalid because the package it depends on is missing

This error occurs because a dependency is configured for the atomic service, but AppGallery Connect cannot find the package that your package depends on. Add the missing package and upload your package again.

Error code 10: This atomic service uses the FA model. For a device type under this model, non-entry modules are not allowed

For an atomic service adopting the FA model, there can be only one entry package for a device type of the atomic service. Therefore, delete non-entry modules and upload the package again.

Error code 11: This atomic service has multiple entry packages for a device type, but only one entry package is allowed

Only one entry package is allowed for a device type of an atomic service. Delete unnecessary entry packages and try again.

Error code 12: The device types default and phone coexist

This error occurs because the deviceTypes field is set to default and phone at the same time in the module.json5 file for a module in the package. Delete default and upload the package again.

Error code 13: The widgets and snapshots in the package do not meet the requirements

For an atomic service with API version 11 or later, if its package contains widgets, the package must also contain snapshots of the same dimensions as the widgets, and the numbers of widgets and snapshots must be the same. For example, if the package contains three widgets whose dimensions are 1 x 2, 2 x 2, and 2 x 4, three snapshots whose dimensions are 1 x 2, 2 x 2, and 2 x 4 must be also provided.

This error will occur if the preceding requirements are not met. In this case, go to the EntryCard directory where the snapshots are stored, make modifications, and upload the package again. For details about how to create an atomic service widget, please refer to Creating an Atomic Service Widget.

Error code 991: Invalid package

The possible cause is that the package has not been signed. Ensure that a signature file is used in compiling your app package, and you have signed it correctly. Also, avoid unpacking the package and then manually re-packing it, as this may result in an invalid signature.

Error code 992: The value of bundleName parsed from the package is different from that set when the app was created, or the names of involved HAPs are not the same

Locate and rectify the fault, and then try again. The possible causes are as follows:

Error code 993: Invalid profile

The possible causes are as follows:
  • Cause 1: The profile used by the package has been deleted. That is, no profile of the app is displayed on the Certificates, app IDs, and profiles > Profiles page. You need to request a release profile again, modify the package, and re-upload it.

  • Cause 2: The release profile in the package does not belong to the app to be released. This is usually because the profile of another app is downloaded or used.

    For example, if the profile for HarmonyA is downloaded and added to the package of HarmonyB, an error will occur when you upload the package of HarmonyB for release.

Error code 994: The package does not exist

This problem is caused by a package download error. Try again later. If the problem persists, submit a ticket to Huawei technical support.

Error code 995: The package you uploaded is not a HarmonyOS package with the file name extension .app

This error indicates that an incorrect type of package has been uploaded. The file name extension must be .app for a HarmonyOS app or atomic service package. Re-upload the package after making modifications.

Error code 996: Failed to parse the package due to an unknown error

This problem is caused by an unknown error during package parsing. Try again later. If the problem persists, submit a ticket to Huawei technical support.

Error code 997: The value of bundleName does not match the app

This error indicates that the value of bundleName declared in your package is inconsistent with that in AppGallery Connect. Locate and rectify the fault, and try again.
  • For the stage model: Ensure that the value of bundleName in the AppScope/app.json5 file of the project is the same as the package name displayed on the App information page of AppGallery Connect.

  • For the FA model: Ensure that the value of bundleName in the src/main/config.json file of each HAP in the project is the same as the package name displayed on the App information page of AppGallery Connect.

Error code 998: The uploaded package does not support the selected devices

This error indicates that the package you uploaded does not support the devices selected in AppGallery Connect for the app. Change the device types declared in the package, or change the supported device types on the App information page of AppGallery Connect.

Error code 999: The profile type used by the uploaded HarmonyOS app package is incorrect

The possible cause is that your package is using a debug certificate and a debug profile. To formally release your app on AppGallery, use a release certificate and a release profile. Replace the certificate and profile with correct ones and upload the package again.

Error code 1000: The profile used by the uploaded HarmonyOS app package has expired

This error indicates that the release profile you have requested in AppGallery Connect has expired. Request a new profile and use it to recompile the package.
  1. Sign in to AppGallery Connect and choose Certificates, app IDs, and profiles.
  2. In the navigation tree on the left, choose Profiles.
  3. Find the release profile that has expired and click Delete.

  4. Request a new release profile.
  5. In DevEco Studio, configure new signing information to compile a new package.
  6. Upload the new package to AppGallery Connect.

Error code 1001: The profile used by the uploaded HarmonyOS app package does not match the certificate

This error occurs when the release certificate contained in the HarmonyOS app package is different from that in the release profile. Ensure that the release certificate that you use to package your app in DevEco Studio is the same as that used for requesting a release profile.

Error code 1002: The certificate used by the uploaded HarmonyOS app package has expired

This error indicates that the release certificate you requested in AppGallery Connect has expired. Request a new certificate and profile and use them to recompile the package.

  1. Sign in to AppGallery Connect and choose Certificates, app IDs, and profiles.
  2. In the navigation tree on the left, choose Certificates, select the expired certificate, and click Revoke.

  3. Request a new release certificate and a new release profile.
  4. In DevEco Studio, configure new signing information to compile a new package.
  5. Upload the new package to AppGallery Connect.

Error code 1003: The certificate used by the uploaded HarmonyOS app package has not taken effect

This error indicates that the certificate used by the package has not taken effect. Check whether the certificate is effective.

  1. Sign in to AppGallery Connect and choose Certificates, app IDs, and profiles.
  2. In the navigation tree on the left, choose Certificates and download the certificate you are using.

  3. Open the certificate and check its validity period.

Error code 1004: An app with the same value of bundleName has been created

This error indicates that the value of bundleName declared in your uploaded package has been used by another app. Change the value of bundleName. If you find any infringement or piracy, file a complaint by submitting a ticket.

Error code 1005: The certificate is invalid

The possible causes are as follows:

Error code 1006: The HAP is too large

This error indicates that the size of an HAP in the package does not meet requirements. Re-upload the package after making modifications. The requirements are as follows:

Error code 1007: The version number of the submitted HarmonyOS app is earlier than the version number of shell.apk in the package

The HarmonyOS package version of the HarmonyOS app (hybrid) cannot be earlier than the version number of shell.apk in the package. Otherwise, the package upload will fail. Re-upload the package after making modifications.

Error code 1008: The associated Android app is incorrect

This error occurs because the ID of the Android app bound to the package is different from that of the Android app bound when the profile was requested in AppGallery Connect. Re-upload the package after making modifications.

Error code 1009: Either appId or packageName of the Android app bound to the atomic service is missing

When an atomic service is bound to an Android app, the appId and packageName fields of the Android app must exist at the same time. Re-upload the package after making modifications.

Error code 1010: The package is not an atomic service package

This error indicates that an incorrect type of package has been uploaded. You need to upload an atomic service package, instead of a HarmonyOS app package.

Perform the following operation for troubleshooting:

Error code 1011: The package is not a HarmonyOS app package

This error indicates that an incorrect type of package has been uploaded. You need to upload a HarmonyOS app package, instead of an atomic service package.

Perform the following operation for troubleshooting:

Error code 1012: The HAPs in the package are of different types

This error implies that the types of HAPs in your uploaded package are inconsistent.

The types of HAPs in a package must be consistent, either all installation-free (for an atomic service) or all non-installation-free (for a HarmonyOS app).

Perform the following operation for troubleshooting:

Error code 1014: The HAP has not been signed

This error occurs because the HAP has not been signed. Ensure that a signature file is used during the compilation.

Error code 1015: The compressed package format failed the security check

This error occurs because the format of the compressed package does not pass the security check. Verify your package and upload it again. If the problem persists, submit a ticket to Huawei technical support.

Error code 1021: The API version of the uploaded test package is earlier than 10

This error occurs because the API version of the uploaded test package is earlier than 10, while only the test package whose API version is 10 or later is supported. Re-upload the package after making modifications.

To release a test version of your HarmonyOS app whose API version is earlier than 10, go to Release app > Version information > Open testing and configure and release a version for open testing.

Error code 1023: Custom encryption is not supported

This error occurs because the custom encryption capability that is not available yet is used. Check whether the encrypt.json file exists in the root directory of your project. If so, delete the file and upload your package again. If the problem persists, submit a ticket to Huawei technical support.

Error code 1026: The package type does not match the app type

This error occurs because the type of the uploaded package does not match the app type you have set.

For mini games, is_hmos_minigame in metadata under module in the module.json5 file must be set to true.

Error code 7011: The shell.apk file is missing

This error occurs because shell.apk is missing in the HarmonyOS app (hybrid) package. Re-upload the package after making modifications.

Error code 7012: Failed to read shell.apk

This error occurs because shell.apk in the HarmonyOS app (hybrid) package fails to be read due to an unknown error. Verify your package and upload it again. If the problem persists, submit a ticket to Huawei technical support.

Error code 7013: The permission list in shell.apk exceeds the upper limit

The error occurs because the permission list in shell.apk of the HarmonyOS app (hybrid) package exceeds the upper limit of 20,000 lines. Re-upload the package after making modifications.

Error code 7014: The permissions configured in the package are inconsistent with those requested by the profile

This error occurs because the permissions configured in the package are inconsistent with those requested by the profile.

Check the permissions requested by the profile and those declared in your package's configuration file. Ensure that the permissions requested by the profile include all the permissions configured in your package. That is, the permissions in your package are a subset of those requested by the profile.

Error code 7015: The package cannot be released

This error occurs because you have submitted a trusted application (TA) package that contains a .sec file. However, TAs cannot be released through AppGallery Connect currently.

Error code 7017: The version of the profile in the package does not meet requirements

For apps or atomic services that use API version 9 or later, AppGallery Connect will issue a profile of a new version, and the profile you have requested will also be automatically updated to the new version. Apps or atomic services that use profiles of earlier versions cannot be released.

This error occurs if the version of the profile in the package does not meet the requirements. In this case, go to Certificates, app IDs, and profiles > Profiles to download the new profile, and upload the package again.

Error code 7021: System error

System error. Try again later. If the problem persists, submit a ticket to Huawei technical support.

Error code 7022: The package cannot be released on AppGallery

In-house apps cannot be released on AppGallery. Please check your package type. For other questions, submit a ticket to Huawei technical support.

Error code 7023: The package cannot be released on AppGallery

Enterprise MDM apps cannot be released on AppGallery. Please check your package type. For other questions, submit a ticket to Huawei technical support.

Error code 7024: The package cannot be released on AppGallery

Enterprise apps cannot be released on AppGallery. Please check your package type. For other questions, submit a ticket to Huawei technical support.

Error code 9999: API call validation failed for your atomic service

This error occurs when your atomic service calls APIs that are not part of the allowed atomic service APIs. If your atomic service is developed using API version 11 or later, it can only call atomic service APIs. Check whether your atomic service package calls non-atomic service APIs. If so, modify your package and upload it again.

Error code 205389875: The uploaded CSR file is invalid

Check whether the -keyalg parameter is set to EC when generating a certificate signing request (CSR). If not, generate another CSR file and upload it again. If the problem persists, submit a ticket to Huawei technical support.