DEV Community

HarmonyOS
HarmonyOS

Posted on

[Smart Watch] [API 6] When installing a watch app, it prompts with 'code:9568257 error: fail to verify pkcs7 file.'

Read the original article:[Smart Watch] [API 6] When installing a watch app, it prompts with 'code:9568257 error: fail to verify pkcs7 file.'

Problem Description:

An error occurred during the installation of the HAP, with the error message "error: fail to verify pkcs7 file."

Background Knowledge:

The issue occurs because the signature used by the application does not comply with HarmonyOS application signing requirements. If an OpenHarmony signature is used, it needs to be replaced with a HarmonyOS-specific signature.

Troubleshooting Process:

Verified the signature used for the HAP. Confirmed that it was intended for OpenHarmony, not HarmonyOS.

Analysis Conclusion:

The error is caused by using an incorrect application signature format.

Solution:

When signing an application/service, ensure the "Support HarmonyOS" option is checked. After completing the HarmonyOS application signing, restart debugging or run the application again.

Verification Result:

Issue resolved and verified after re-signing the application with the correct signature.

Related Documents or Links:

HarmonyOS Application Signing

Written by Bilal Basboz

Top comments (0)