This section describes only error codes related to Game Service Kit. For details about universal error codes, please refer to Universal Error Codes.
Error Message
System internal error.
Error Description
Internal system error.
Possible Causes
An internal error occurs in Game Service Kit.
Solution
Try again, or restart the device and try again. If the retry fails, submit a ticket online. Huawei will get back to you as soon as possible.
Error Message
Auth failed.
Error Description
Authentication failure.
Possible Causes
The network connection is abnormal, or a parameter passed is invalid.
Solution
For the first sign-in on a device, check whether the network is properly connected.
Ensure that the parameters passed to the init API are valid.
Error Message
Invalid request.
Error Description
Invalid request.
Possible Causes
Other APIs are called when the initialization is not performed or fails.
When the getDeviceInfoByScope API is called to query the temperature information, the device has just been started.
Solution
Call the init API first and ensure that the call is successful.
When calling the getDeviceInfoByScope API to query the temperature information, ensure that the device has been started for at least one minute.
Error Message
System internal error.
Error Description
Internal game error.
Possible Causes
The possible causes are as follows:
The total size of accountIcon passed to the unionLogin API exceeds 35 KB.
Input parameter context of the API does not meet the requirements.
A simulator is used to debug the Game Service Kit API.
The user has disabled network access for the game service system program.
Solution
Ensure the size of the official game account icon does not exceed 35 KB.
Ensure that input parameter context of each API meets the requirements.
You are advised to obtain the context in the UI component as follows:
let context = this.getUIContext()?.getHostContext() as common.UIAbilityContext;
The context cannot be directly obtained outside the UI component.
You are advised to obtain the context from EntryAbility and save it to AppStorage, and then use AppStorage to obtain the context. For details, please refer to AppStorage: Storing Application-wide UI State.
Check whether a simulator is used to debug the API. The Game Service Kit API cannot be debugged using a simulator.
Go to Settings > Mobile network > Manage data usage > Network access > WLAN, tap Show system programs in the upper right corner, and check whether the switch for game service system program is enabled.
Submit a ticket online. Huawei will get back to you as soon as possible.
Error Message
Network connection error.
Error Description
A network error occurs.
Possible Causes
The possible causes are as follows:
The debug certificate signature is not configured.
The fingerprint for the debug certificate is not added.
The client_id and app_id in the module.json5 file of the entry module are inconsistent with those in AppGallery Connect.
The system time on the device is inconsistent with the actual time.
Network connection error.
Solution
Ensure that configuration items are correctly set. For details, please refer to Preparations.
Adjust the system time on the device to the correct time.
Ensure that the network connection is working properly.
Error Message
The HUAWEI ID is not signed in or not authorized.
Error Description
No HUAWEI ID information is found.
Possible Causes
The user has signed out of their HUAWEI ID on the device.
Solution
Ensure that the user has signed in using a HUAWEI ID and granted authorization.
Error Message
User cancels real name authentication or not real name.
Error Description
Identity verification is required but the player cancels it or identity verification has not been performed.
Possible Causes
Identity verification is required but the player cancels it or identity verification has not been performed.
Solution
Call the unionLogin API to instruct the player to perform identity verification again.
Error Message
The country or region of the signed-in Huawei ID does not support.
Error Description
Only HUAWEI IDs with both the service area and registration location within the Chinese mainland are supported.
Possible Causes
The service area or registration location of the HUAWEI ID may not be within the Chinese mainland.
Solution
When a user attempts to sign in to the game, prompt them to use or register a HUAWEI ID whose service area and registration location are both within the Chinese mainland.
Error Message
User is underage and has no playable time.
Error Description
The player is a minor and the current time is not within the permitted game duration.
Possible Causes
The player is a minor and the current time is not within the permitted game duration.
Solution
Check whether the current game time of the minor is between 20:00 to 21:00 on Friday, Saturday, Sunday, or legal holidays.
If not, the game exit logic has been configured in Game Service Kit. No extra processing is required.
If so, submit a ticket online. Huawei will get back to you as soon as possible.
Error Message
The application to which the product belongs is not listed in the specified country.
Error Description
The app to which the product belongs is not released to specified countries or regions.
Possible Causes
The app to which the product belongs is not released to specified countries or regions.
Solution
Sign in to AppGallery Connect. Click My apps, select an app, and go to Distribute > Version information > Draft. Then check the countries or regions to which the app will be released.
Error Message
The HUAWEI ID is in the blocklist.
Error Description
The HUAWEI ID is in the blocklist.
Possible Causes
Games are not allowed on the National Memorial Day.
The player of the current HUAWEI ID is prohibited from playing games due to risk control.
Solution
If there are pop-ups related to risk control or the National Memorial Day, no action is required.
In other cases, submit a ticket online. Huawei will get back to you as soon as possible.
Error Message
The game account is unavailable for the game.
Error Description
Third-party game accounts are not supported currently.
Possible Causes
The account used for sign-in is invalid.
Solution
Use another game account.
Error Message
The playerId is not current player.
Error Description
teamPlayerId does not match the current player.
Possible Causes
An incorrect value of teamPlayerId is passed when the bindPlayer or unbindPlayer API is called.
Solution
Check whether the value of teamPlayerId is correct, and call the bindPlayer or unbindPlayer API again to pass the correct value.
Error Message
Agreement not agreed.
Error Description
The player does not agree to the privacy statement.
Possible Causes
The player cancels the privacy agreement, or another API is called before the init API is successfully called.
Solution
Call the init API again.
Error Message
The thirdOpenId or teamPlayerId has been bound.
Error Description
The official game account has been associated with teamPlayerId.
Possible Causes
When the bindPlayer API is called, the official game account has been associated with teamPlayerId.
Solution
No action is required.
Error Message
The thirdOpenId and teamPlayerId are not bound.
Error Description
The official game account is not associated with teamPlayerId.
Possible Causes
When the unbindPlayer API is called, the official game account is not associated with teamPlayerId.
Solution
No action is required.
Error Message
This interface is not available for this game.
Error Description
This API is not available for this game.
Possible Causes
This API cannot be called by the current game.
Solution
Check whether an error is reported when the game calls the unionLogin API.
If yes, try an API other than unionLogin.
If the error persists, submit a ticket online. Huawei will get back to you as soon as possible. If the error is not reported, the current game does not have permission to use the unionLogin API. In this case, use another API.
If your game does not have permission to use the unionLogin API but wants to use it again, submit a ticket online. Huawei will get back to you as soon as possible.
Error Message
The current player information is invalid. Execute the login process again to obtain the player information.
Error Description
The player information is invalid.
Possible Causes
The user switches to another HUAWEI ID after signing in to the game. As a result, the current player information in the game becomes invalid.
Solution
Call the unionLogin API again to obtain the player information.
Error Message
Union login canceled by user.
Error Description
The player cancels multi-provider sign-in.
Possible Causes
The player cancels multi-provider sign-in during the multi-provider sign-in process.
Solution
To continue the sign-in, call the unionLogin API again.
Error Message
Illegal application identity.
Error Description
Invalid app.
Possible Causes
The configuration such as the client ID, app ID, and signature is incorrect or missing.
Solution
Ensure that information such as the signing certificate fingerprint, app ID, and client ID is correctly configured. Add or modify the configurations as required.
Error Message
This API is only provided for HarmonyOS mini games.
Error Description
This API is available only for mini games.
Possible Causes
This API is used in a game that is not a mini game.
Solution
Use a supported API.
Error Message
Parameter error.
Error Description
Invalid parameter.
Possible Causes
A mandatory parameter is not passed.
Incorrect parameter type. (Type Error)
The number of parameters is incorrect. (Argument Count Error)
A null parameter is incorrect. (Null Argument Error)
Invalid parameter format. (Format Error)
The parameter value is out of the valid range. (Value Range Error)
Solution
Pass parameters according to the relevant requirements. Ensure that all mandatory parameters are specified and that all parameters are of the valid types.
Error Message
The operation was canceled by the user.
Error Description
The current operation is canceled by the user.
Possible Causes
The user canceled the current operation.
Solution
Display a message to the user, indicating that the operation is canceled.
Error Message
Too frequent API calls.
Error Description
Excessive API call frequency.
Possible Causes
The API is called too frequently.
Solution
Avoid excessive API calls. The current default access interval for the API is 5 seconds.
Error Message
Invalid product information.
Error Description
Invalid product information.
Possible Causes
The passed product ID or type is incorrect.
The product created in AppGallery Connect has not been submitted for review or has not been approved. For details about how to create a product and submit it for review, please refer to Adding a Single Product.
Solution
Sign in to AppGallery Connect. Click My apps, select an app, and go to Operate > Products > Product Management. In the product list, check whether the product exists, and if so, check whether all its mandatory information is provided and has been approved. If the product fails to be approved, use a sandbox account for testing. For details, please refer to Sandbox Testing.
Error Message
Failed to purchase a product because the user already owns the product.
Error Description
The purchase failed because the user already owns the product.
Possible Causes
The product has already been purchased.
Solution
Use the queryPurchases API to check whether the user has purchased the product.
If the product is a consumable or non-renewable subscription, check whether it has been delivered. If the product has been delivered, call the finishPurchase API to complete the purchase so that the product can be purchased again next time.
If the product is a non-consumable or auto-renewable subscription, it can only be purchased once.
Error Message
The purchase cannot be finished because the user has not paid for it.
Error Description
Failed to deliver the product because the user has not paid for it.
Possible Causes
The user has not purchased the product.
Solution
Use the queryPurchases API to check whether the user has purchased the product.
Error Message
The purchase has been finished and cannot be finished again.
Error Description
The product has been delivered. No more delivery is needed.
Possible Causes
The product has been delivered. No more delivery is needed.
Solution
Use the queryPurchases API to check whether there is a delivery confirmation record for the product.
Error Message
The country or region of the signed-in HUAWEI ID does not support IAP.
Error Description
The country or region to which the signed-in HUAWEI ID belongs is not supported by IAP Kit.
Possible Causes
The country or region to which the signed-in HUAWEI ID belongs is not supported by IAP Kit.
Solution
For signed-in HUAWEI IDs whose service area is not within the Chinese mainland, you are advised to hide the entry points for related payment functions in your app.
Error Message
The user is not allowed to make purchase.
Error Description
The user transaction is rejected.
Possible Causes
The transaction behavior triggers IAP Kit's risk control.
Solution
Try again later or change the payment method.
Error Message
System internal error.
Error Description
Internal game error.
Possible Causes
The input parameter cannot be parsed.
Solution
Error Message
Authentication failed.
Error Description
Authentication failure.
Possible Causes
The network connection is abnormal, or a parameter passed is invalid.
Solution
For the first sign-in on a device, check whether the network is properly connected.
Ensure that the parameters passed to the create API are valid.
Error Message
Invalid request.
Error Description
Invalid request.
Possible Causes
Other APIs are called when the nearby transfer service has not been created or fails to be created.
Solution
Call the create API first and ensure that the call is successful.
Error Message
The wireless network and Bluetooth should be enabled at the same time.
Error Description
WLAN and Bluetooth must be enabled at the same time.
Possible Causes
WLAN and Bluetooth are not enabled simultaneously on the device where the game is installed.
Solution
Enable WLAN and Bluetooth on the device simultaneously.
Error Message
Publishing failed.
Error Description
Publishing failed.
Possible Causes
Publishing failed.
Solution
Internal system error. Try publishing the nearby transfer service again.
Error Message
Discovery failed.
Error Description
Discovery failed.
Possible Causes
No device is found.
Solution
After confirming that the receiver has published the nearby transfer service, try discovering a device again.
Error Message
Invalid parameter.
Error Description
Invalid parameter.
Possible Causes
The mandatory parameter is empty.
The parameter type is incorrect.
Parameter verification failed.
Solution
Pass parameters according to the relevant requirements. Ensure that all mandatory parameters are specified and that all parameters are of the valid types.