Troubleshoot the "Poor network connection. Please try again later." error that appears when opening an mPaaS mini program on Android.
Problem description
After integration, Android developers may see the "Poor network connection. Please try again later." error on the container page when they open a mini program.
Common causes
Before opening a mini program, the client retrieves the offline package information through the mPaaS RPC interface alipay.client.getUnionResource. If this RPC call fails, the mini program container displays the "Poor network connection. Please try again later." error.
Troubleshooting steps
-
Filter the logs. In the Android Studio console, filter the logs by the RPC Exception field.
-
Check the error code. As described in Common causes, a failed RPC request prevents the mini program from loading. Search for
alipay.client.getUnionResourcein the Android Studio console and check whether the request returns a successful response. Error codes are typically in the 7XXX series. The following table lists common examples.Error code
Description
Example
7000
Public key not set
The key for the appId is missing in the mobile app's Security Guard.
7001
Insufficient parameters for signature verification
Signature verification failed on the gateway server-side.
7002
Signature verification failed
Signature verification failed on the gateway server-side.
7003
Signature verification failed due to timestamp validity
The ts timestamp in the API request parameter exceeds the time validity limit set by the system.
7007
Signature verification failed due to missing ts parameter
The API request is missing the ts parameter for signature verification.
7014
Signature verification failed due to missing sign parameter
The API request is missing the sign parameter for signature verification.
-
Resolve RPC exceptions based on their type.
-
Error codes 7000 to 7002 indicate a problem with security image generation. Regenerate the image by following the Android integration steps. If you use an Apsara Stack environment, contact service personnel for further investigation.
-
Error codes 7003 and 7007 indicate a signature verification validity issue. This issue can occur if the time on the mobile phone differs from the gateway service time by more than 30 minutes. Check the time settings on the phone.
-
Error code 7014 indicates that the APK signature uploaded to the mPaaS console does not match the application packaging signature. To troubleshoot this issue, perform the following steps:
-
Check whether the APK package signature that you uploaded to the mPaaS console is configured for the debug environment. Add the debug and release information to the app's Gradle packaging configuration. A mobile phone typically runs a debug package, so the debug information must be configured.
signingConfigs{ debug{ keyAlias 'key0' keyPassword '123456' storeFile file('D:/project/signFile/xx.jks') storePassword '123456' } release{ keyAlias 'key0' keyPassword '123456' storeFile file('D:project/signFile/xxx.jks') storePassword '123456' } } -
In the mPaaS console, check that the Package Name in the Android configuration and the uploaded APK file match the app project.
-
-
Ticket assistance
If the problem persists, prepare a demo project that reproduces the issue and join the DingTalk support group (group ID: 145930007362) for assistance.