Problem description
After completing the basic integration, a developer tries to open an H5 application, but the container page displays an error: "System busy. Please try again later."
Common causes
Before the mPaaS framework can open an H5 application, it must first retrieve the basic information of the application's offline package. The client actively pulls this information through the alipay.client.getUnionResource Remote Procedure Call (RPC) interface. If the client fails to retrieve the offline package information or does not find the target application, the container displays the "System busy. Please try again later." error. To troubleshoot this issue, verify that the RPC request is successful and that the environment matches the offline package release.
Troubleshooting steps
Check if the RPC request is normal
As described in Common causes, the client must actively pull offline package information. This process depends on an RPC request. If there is a problem with the RPC link, the client cannot retrieve the offline package information, and the loading fails. To check for problems with the RPC request, search for alipay.client.getUnionResource in the Xcode console and check whether the RPC request returns a successful response. If an error occurs, the error code is typically in the 7XXX or 3XXX series. For example:
Example of a normal response (
result-statusis 1000):Demo[83767:2555863] [mPaaSLog] APMobileNetwork alipay.client.getUnionResource resp:{ "Content-Encoding" = gzip; "Content-Type" = "text/plain;charset=UTF-8"; Date = "Tue, 11 Aug 2020 05:01:37 GMT"; Vary = "Accept-Encoding"; "mgw-traceid" = 0a1cfd401597122097726853822435; "result-status" = 1000; "server-time" = 1597122097739; }Example of an error response (
result-statusis not 1000):Demo[83383:2546279] [mPaaSLog] APMobileNetwork alipay.client.getUnionResource resp:{ "Content-Length" = 0; "Content-Type" = "text/plain;charset=UTF-8"; Date = "Tue, 11 Aug 2020 04:50:08 GMT"; memo = "%E9%AA%8C%E7%AD%BERPC%E6%8E%A5%E5%8F%A3%20%E5%8A%A0%E7%AD%BE%E6%95%B0%E6%8D%AE%E4%B8%BA%E7%A9%BA"; "mgw-traceid" = 0a1d7667159712140890222728553; "result-status" = 7014; "server-time" = 1597121408902; tips = "%E9%AA%8C%E7%AD%BERPC%E6%8E%A5%E5%8F%A3%20%E5%8A%A0%E7%AD%BE%E6%95%B0%E6%8D%AE%E4%B8%BA%E7%A9%BA"; }
How to handle 7XXX series RPC errors
For more information, see Gateway result codes. 7XXX series errors are all related to the signature verification process of the RPC request. The common error codes and their causes are as follows:
Error code | Description | Explanation |
7000 | Public key not set | The security component in the mobile app does not have a key for the appId, or the gateway cannot get the signature key for the appId. |
7001 | Insufficient parameters for signature verification | The gateway server-side signature verification failed. |
7002 | Signature verification failed | The gateway server-side signature verification failed. |
7003 | Signature verification - timeliness failed | The ts timestamp in the API request parameter is outside the valid time range set by the system. Check if the client time is the system time. |
7007 | Signature verification - missing ts parameter | The API request is missing the ts parameter for signature verification. |
7014 | Signature verification - missing sign parameter | The API request is missing the sign parameter for signature verification. This usually happens when the client fails to sign the data, which results in a missing sign parameter. Check if the client's security image is correct. |
Perform the following basic checks:
Verify that the Bundle ID set in the mPaaS console is the same as the one in the iOS project:
The Bundle ID set in the mPaaS console (Console > Code Configuration > iOS).
The project's Bundle Identifier.
The Bundle Identifier in the project's
Info.plistfile.
Verify that the content of the
.configfile downloaded from the console is the same as themeta.configfile in the project:The
.configfile downloaded from the mPaaS console.The
meta.configfile in the project.
Verify that the client device's time is set to the current time. The time difference must be less than 8 hours.
Apsara Stack developers must manually generate the security image and add it to the project. Alibaba Cloud (aliyun.com) developers can ignore this step.
If any inconsistencies are found, the check fails. We recommend the following:
Modify the information in the project to match the information in the mPaaS console.
If the device time is incorrect, correct the time settings.
Download the latest
.configfile from the console and import it again using the mPaaS Extension plug-in:
After you confirm that all information is correct, uninstall the app. Then, repackage, compile, and debug the app. Check whether the 7XXX series RPC errors are resolved.
How to handle 3XXX series RPC errors
This section on handling 3XXX series RPC errors is only for Apsara Stack developers. Alibaba Cloud (aliyun.com) developers can ignore this section. If data encryption is enabled for the gateway (go to the mPaaS console > Backend Service > Mobile Gateway > Gateway Management > Data Encryption), and client-based encryption is not configured or is configured incorrectly, the alipay.client.getUnionResource RPC request may return a 3XXX series error. For example:
Error code | Description | Explanation |
3001 | Request data is empty | The |
3002 | Incorrect data format | The RPC request format is incorrect. Apsara Stack users can view details in the server-side log file |
3003 | Data decryption failed | Data decryption failed. |
Perform the following basic checks:
In the console, check whether the data encryption feature is enabled for the mobile gateway.
Follow the Data encryption configuration document to check whether the client-based encryption configuration is correct. This includes checking whether the key and format are correct.
After you confirm that the configuration is correct, uninstall the app. Then, repackage, compile, and debug the app. Check whether the 3XXX series RPC errors are resolved.
Check if the H5 app information and release status are correct
As described in Common causes, the client must actively pull offline package information. Even if the RPC request returns a successful response, the loading can still fail if the server-side does not return information for the target offline package. The cause of this error is that the offline package does not exist (AppNotExist).
Perform the following basic checks:
Follow the instructions in Check if the RPC request is normal to confirm that the
alipay.client.getUnionResourceRPC request returns a successful response.In the Xcode console, search for the error keyword
AppNotExistto confirm whether the root cause is that the target H5 app cannot be found.Cross-check the following information in the mPaaS console and the iOS project:
Metadata such as
worksapceId,appId, andmpaasapi: The configurations in the console and inmeta.configmust be identical. If they are not, download the.configfile again and import it.Target offline package ID: The offline package ID on the offline package management page must match the ID of the offline package to be opened in the project code.
Check the release status of the offline package to confirm that there is a released version.
Check the release status of the offline package to confirm its resource type. It must be a "Normal resource package". "Global resource packages" cannot be opened directly.
Check the release status of the offline package to confirm its version. The version must be greater than the version of the offline package installed on the client.
Check the release status of the offline package to confirm the range of client versions it covers. The range must include the current version number of the test app.
ImportantIn an iOS project, the client version number depends on the
Product Versionfield ininfo.plist, not the Xcode projectversion. The developer must sync these manually.After you confirm that the preceding information is correct, uninstall the app. Then, repackage, compile, and debug the app. Check whether the
AppNotExisterror is resolved.
If the issue persists, prepare a demo project that reproduces the issue and join the DingTalk group by searching for the group number 145930007362 for further assistance.