目录

What should I do if exceptions occur during the conversion from uni-app to ASCF?

How do I debug when a white screen occurs during atomic service running?

The possible causes are as follows:

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.

How do I view and analyze atomic service logs?

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.

Compilation and Build

[h2]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.

[h2]What should I do if the error "Invalid storeFile value" occurs during release?

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.

[h2]What should I do if the error "Unable to find the product 'release'" occurs during release?

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.

[h2]What should I do if the error "failed to install bundle" occurs during running?

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.

[h2]What should I do if the error "SDK component missing" occurs during running?

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.

[h2]What should I do if the error "the dependent module does not exist" occurs during running?

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.

Debugging and Running

[h2]What should I do if an error is reported when sending a network request?

You need to configure the network access trustlist:

[h2]What should I do if the web-view component renders blank and fails to display the web page?

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.

[h2]What should I do if the map component cannot display the map?

If the map component cannot display a map and an error is reported when location-related APIs are used, perform the following steps:

  1. 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.

  2. Add ohos.permission.LOCATION and ohos.permission.APPROXIMATELY_LOCATION to the requestPermissions field in the harmony-mp-configs/entry/src/main/module.json5 file.

  3. 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',
        });
      },
    });

Review Submission

[h2]What should I do if the error of incomplete required permission configuration occurs?

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

[h2]What should I do if the error "submit version for review failed" occurs?

Error message: submit version for review failed, additional msg is xxx:

Release Rejected