The possible causes are as follows:
Unsuccessful configuration of DevEco Studio
Self-check solution: Run the blank template built in HBuilderX. If the template runs properly, the environment configuration is correct and the white screen may be caused by other reasons.
Use of APIs not yet supported by the atomic service or Plus APIs causing page startup errors
Check the console for any error messages. You can also comment out the page logic to narrow down the issue scope and identify the problematic page, component, or logic.
Check the error message based on the run logs, rectify the fault, and run the project again. For details about how to view logs, see How do I view and analyze atomic service logs?
If the page has been loaded successfully, you can locate the issue through debugging. Specifically, start the debugger by running ascf debugger start and use breakpoint debugging to address the issue.
In DevEco Studio, open the bottom log panel, select the atomic service under development, filter for the Warn level, and check whether any warning or error is displayed in red.
Alternatively, you can run the hdc shell hilog --domain 0x006F,0x8BF2 command to view logs.
For logs printed on the user side, you are advised to filter them at the Info level by adding a fixed prefix, or use console.warn to print data temporarily.
If the error message contains "xxx is not defined", the corresponding API, for example, APIs for obtaining the capsule (menubar) position or rewarded videos, may not be implemented in the atomic service. In this case, you should use conditional compilation.
If an error message is reported, indicating that an error occurs in vendor.js, the third-party component library may be incompatible with the atomic service. For details about how to locate the error, see Common Troubleshooting.
To locate a specific fault, create an empty file named .HX_LAUNCHER_DEBUG in the root directory of HBuilderX and restart your project. Choose Help > View Running Logs from the HBuilderX menu to view the error message.
If the fault fails to be located, you can copy the contents from the HBuilderX compilation output path unpackage/dist/dev/.mp-harmony into the ascf_src directory of your ASCF project in DevEco Studio, and launch the project directly using ASCF Toolkit to view the error message. For further troubleshooting, set logging to debug in hvigor/hvigor-config.json5 to generate detailed logs.
Error message: hvigor ERROR: Invalid storeFile value. Make sure it is not null or empty. The file must be included.
If the error occurs during atomic service running or release, the certificate may be missing or incorrectly configured during build. You can request a certificate by referring to Releasing an Atomic Service.
Error message: hvigor ERROR: Unable to find the product 'release'
If the error occurs during atomic service release, the release certificate may be incomplete. In this case, you need to adjust the build-profile.json5 file.
Error message: failed to install bundle. code:9568296 error: install failed due to error bundle type.
If the app with the current bundle name has been installed on the Emulator or a real device, this error may be caused by certificate reuse. Ensure that the current certificate is an atomic service certificate instead of a HarmonyOS app certificate.
Error message: hvigor ERROR: SDK component missing. Please verify the integrity of your SDK.
This error may occur when you declare incompatible fields. Remove the app.products.*.compileSdkVersion property from harmony-mp-configs/build-profile.json5.
Error message: Failed to install the HAP or HSP because the dependent module does not exist.
This error message, usually displayed on first run, indicates that the current environment lacks the basic dependencies required for atomic service running.
You can search for helloUniapp on AppGallery and run it. The ASCF engine will be automatically installed.
You need to configure the network access trustlist:
On the device, go to Settings > System > Developer options (if disabled, choose About phone and tap Build number repeatedly to enable it) and toggle Waive restrictions for services under development.
Sort out the domain names required by web-view, and access AppGallery Connect, choose My projects > Development management > Domain names > Server domain names > Valid httpRequest domain name. Input the required information as prompted. On the device, go to Settings > Apps & services, delete the atomic service that is being developed, and restart the app.
This may be caused by a network request error. For details, see What should I do if an error is reported when sending a network request.
If the map component cannot display a map and an error is reported when location-related APIs are used, perform the following steps:
Request permissions in AppGallery Connect for the map component and related location services. For details, see Preparations. Go to Project settings > Manage APIs and enable Location Kit, Site Kit, and Map Kit.
Add ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION to the requestPermissions field in the harmony-mp-configs/entry/src/main/module.json5 file.
Obtain user authorization before requesting the location. The pseudocode is as follows:
uni.authorize({
scope: 'scope.userLocation',
success: () => {
uni.getLocation({});
},
fail: () => {
uni.showToast({
title: 'Location permission not granted',
});
},
}); Check that the device permissions section in the privacy policy in the AppGallery Connect backend is fully configured. Specifically, ensure that the requestPermissions field in the module.json5 file exactly matches the list of device permissions declared in the privacy policy in the AppGallery Connect backend.
NOTE
The ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION permissions must be used together.
When a user needs to select a media file or save a file to the user device, you are advised to use the uni.chooseMedia and uni.saveFile APIs. The ohos.permission.WRITE_IMAGEVIDEO and ohos.permission.READ_IMAGEVIDEO permissions are not required for reading and writing files.
Currently, the clipboard content cannot be read, and you should not select the ohos.permission.READ_PASTEBOARD permission. Instead, call uni.setClipboardData to set the clipboard content.
Error message: submit version for review failed, additional msg is xxx:
If the additional message is "[[5]]", the device type in the code is inconsistent with that selected in the uni-app backend. You are advised to set the device type to phone for both.
If the additional message is "AppGalleryConnectAppMetaInfoService version's privacyAgreementId is empty", it is likely that some agreements are not selected during the release. Make sure that all the required agreements are selected and resubmit your atomic service for review.
If the additional message is "appAdapters devices can not own entry main packages", perform the following steps:
The target devices declared in your code do not match the devices selected in the AppGallery Connect backend. Check whether the device list in the code matches the configuration in the backend. For details, see the uni-app adaptation reference.
In the code project, search for deviceTypes in harmony-mp-configs/entry/src/main/module.json5. Typically, this field should be set exclusively to phone, indicating that the atomic service is compatible with phones.
In the AppGallery Connect backend or the uni-app submission backend, you will also find a device adaptation option. Ensure that this setting is consistent with your code by selecting the Phone option.
You have used an icon (shown in the recent task list) that is not generated by the atomic service icon generation tool.
Solution: Refer to How Do I Change the Default Title, Icon, and Splash Screen of an Atomic Service.
You have used a system icon (shown after installation/in the recent task list).
Suggestion: Avoid using system icons for your atomic service.
Solution: Refer to How Do I Change the Default Title, Icon, and Splash Screen of an Atomic Service.
You have used a custom sign-in page for your atomic service.
Solution: Refer to What Should I Do If an Error Is Reported When I Call uni.login to Obtain a Code and How Do I Bind an Existing User System.
You have used inconsistent names or icons in the atomic service and the recent task list.
Solution: Refer to How Do I Change the Default Title, Icon, and Splash Screen of an Atomic Service.
You have submitted an atomic service name that does not match the atomic service name displayed in the privacy policy within the atomic service or at the privacy policy URL provided to AppGallery Connect.
Solution: The privacy policy is generated via a form in the AppGallery Connect backend. Verify that the name at the top of this form matches the name associated with your app ID.
You have used an atomic service name in the user agreement inconsistent with that submitted to AppGallery Connect.
Solution: The user agreement URL is usually added in the AppGallery Connect backend. Check that the content at this URL reflects the current atomic service name, which must match the name associated with your app ID in the Huawei backend.
The privacy policy or user agreement does not mention the HarmonyOS platform.
Solution: Ensure that HarmonyOS is explicitly mentioned alongside descriptions for other operating systems. When the privacy policy copied directly from other platforms without adding HarmonyOS-specific references is used, the release is rejected due to a lack of platform adaptation.
You have used a custom sign-in page.
For details about the sign-in requirements of atomic services, see Sign-in with HUAWEI ID - Silent Sign-in and Can I design the login page for an atomic service?
If account sign-in is required, you must use uni.login and cannot skip this step to implement custom account-password sign-in. It is recommended that you request the permission to access users' mobile numbers and link them to your account system. Call the sign-in API at an appropriate time to exchange for a UnionID, identifying the user as a Huawei user. For critical operations, link this identity to your existing account system (for example, by obtaining the mobile number and associating it with an existing account). You must also provide an entry for account deletion; otherwise, your project may be rejected.
Atomic services in certain categories may be ineligible for one-tap mobile number retrieval, and such permission requests will be rejected. In this case, it is recommended that you implement silent sign-in and associate user accounts to those from other platforms using their mobile number and verification code during the sign-in process.