DEV Community

HarmonyOS
HarmonyOS

Posted on

How to solve 9568320 The signature file does not exist error with automatic signing method?

Read the original article:How to solve 9568320 The signature file does not exist error with automatic signing method?

Problem Description

If you are debugging on a real device, you must sign the HAP file first. If a user tries to install an unsigned HAP file, they will receive the error code 9568320: The signature file does not exist. This means the HAP file has not been signed.

11.PNG

Background Knowledge

Signing is mandatory to install a HAP on a real device; without a signature you’ll get 9568320 (signature file does not exist). Signing verifies package integrity and publisher identity. During development, the Automatically generate signature option in DevEco Studio (with Support HarmonyOS for HarmonyOS projects) can create or fetch a development certificate/profile and sign the HAP automatically once you sign in with your Huawei ID and the device is properly connected—this is for debug only. Manual signing is required for release builds and CI/CD pipelines. Common pitfalls include producing an unsigned HAP, not configuring signing for the Release variant, expired/mismatched profiles or package IDs, or using a different account/certificate. Always keep keystores and certificates secure.

Solution

To fix this, you can either use automatic signing after connecting the device or manually sign the HAP file. (For manual signing steps, refer to Signing Your App/Service Manually.)

With the automatic signing method, we can solve this error easily.

Note: Automatic signing is applicable only for debugging apps. Manual signing is also required for release scenarios.

Automatic Signing Steps:

1) Connect to a real device. Below you can see what the UI looks like when a device is connected successfully.

2.png

2) Go to File > Project Structure > Project > Signing Configs.

3.png

3) Select Automatically generate signature. If the project is a HarmonyOS project, also select Support HarmonyOS. Click Sign In to log in.

4.PNG

4) The system will direct you to the Huawei ID login page, enter your information and log in.

5.png

5) Click Allow for DevEco Studio to access your Huawei ID.

6.png

6) Return to DevEco Studio.

imgcke_17319.png

7) System will automatically sign your app. After signing is complete, the page shown below is displayed. Click Apply, then click Ok.

cke_22043.png

8) Click Run.

9.png

9) You will be able to test your application on a real device with your signed HAP file that will fix the error.

Related Documents or Links

IDE Signing

Written by Emine Inan

Top comments (0)