Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.
HarmonyOS
This topic describes only module-specific error codes. For details about universal error codes, see Universal Error Codes.
Error Message
The location service is unavailable.
Description
This error code is reported if the location service is unavailable and relevant APIs cannot be called.
Possible Cause
The location service fails to be started, leading to a communication failure between the application and the location service.
The GNSS chip fails to be initialized, leading to a GNSS positioning failure.
The network positioning service is abnormal, leading to a network positioning failure.
Procedure
Add a retry mechanism.
Error Message
The location switch is off.
Description
This error code is reported if positioning fails because the location switch is turned off.
Possible Cause
The location switch is turned off, which makes basic functions such as continuous positioning and immediate positioning unavailable.
Procedure
Display a prompt asking for enabling the location service.
Error Message
The network locating is failed because the network cannot be accessed.
Description
This error code is reported if network positioning fails because network access is denied.
Possible Cause
The device cannot access the network.
Procedure
Check the device for Internet or Wi-Fi connectivity and an installed SIM card.
Error Message
The positioning result does not meet the precision requirement (maxAccuracy) in the positioning request parameters.
Description
This error code is reported if positioning times out because the positioning result does not meet the requirement of maxAccuracy.
Possible Cause
The value of maxAccuracy in the positioning request parameters LocationRequest and CurrentLocationRequest is too small.
Procedure
Increase the value of maxAccuracy for LocationRequest and CurrentLocationRequest as follows:
If scenario is set to NAVIGATION, TRAJECTORY_TRACKING or CAR_HAILING, or priority is set to ACCURACY, you are advised to set maxAccuracy to a value greater than 10.
If scenario is set to DAILY_LIFE_SERVICE or NO_POWER, or priority is set to LOW_POWER or FIRST_FIX, you are advised to set maxAccuracy to a value greater than 100.
Error Message
The system does not have a cache location.
Description
This error code is reported if the application fails to obtain the previous location because the system has not cached the location information.
Possible Cause
If the system has not cached the location information, the application attempts to obtain the cached location information.
Procedure
If the system has not cached the location information, call getCurrentLocation to obtain the real-time location information.
Error Message
Failed to obtain the geographical location.
Description
This error code is reported if the location service fails, leading to a failure to obtain the positioning result.
Possible Cause
Positioning times out because of weak GNSS signals.
The system time is incorrectly set.
Procedure
Move to an open area and initiate positioning again.
Enable automatic setting on the Time & Date page.
Error Message
Reverse geocoding query failed.
Description
This error code is reported if the query during reverse geocoding has failed.
Possible Cause
Network connection is poor, which makes the request fail to be sent from the device or the result fail to be returned from the cloud to the device.
The x86 emulator does not support the reverse geocoding function. A reverse geocoding query fails if the x86 emulator is used for debugging.
Procedure
For the network problem, try the reverse geocoding query again after the network is resumed.
For the x86 emulator problem, try the reverse geocoding query again on a real device.
Error Message
Geocoding query failed.
Description
This error code is reported if the query during geocoding has failed.
Possible Cause
A certain request parameter is incorrect, or no result can be found based on the parameter.
Network connection is poor, which makes the request fail to be sent from the device or the result fail to be returned from the cloud to the device.
Procedure
Check the request parameters or network status and try again.
Error Message
Failed to query the area information.
Description
This error code is reported if the query of the area information (including the country code) has failed.
Possible Cause
The correct area information is not found.
Procedure
Add a retry mechanism.
Error Message
Failed to operate the geofence.
Description
This error code is reported if a geofence operation, for example, adding, deleting, pausing, or resuming a geofence, has failed.
Possible Cause
The GNSS chip does not support the geofence function.
The bottom-layer service logic is abnormal.
Procedure
Add the SysCap verification mechanism.
Add a retry mechanism.
Error Message
The number of geofences exceeds the maximum.
Description
This error code is reported if the attempt to add a geofence fails because the number of geofences has reached the maximum.
Possible Cause
The number of geofences has reached the maximum (that is, 1,000).
Procedure
Delete unnecessary geofences before adding new ones.
Error Message
Failed to delete a geofence due to an incorrect ID.
Description
This error code is reported if the ID of the geofence to be deleted is incorrect.
Possible Cause
The geofence ID passed to the geofence deletion API is incorrect.
Procedure
Pass a correct geofence ID to the geofence deletion API.
Error Message
No response to the request.
Description
This error code is reported if no response is received for an asynchronous request that requires a user to click a button for confirmation or requires a response from the GNSS chip or network server.
Possible Cause
The user does not click a button as required for confirmation.
The GNSS chip does not respond.
The network server does not respond.
Procedure
Add a retry mechanism.
Error Message
Failed to start Wi-Fi or Bluetooth scanning.
Description
This error code is reported if Wi-Fi or Bluetooth scanning fails to start.
Possible Cause
The Wi-Fi or Bluetooth service incurs an internal error.
Power consumption control is activated because of low battery level.
Wi-Fi or Bluetooth is disabled.
Procedure
Disable and then enable Wi-Fi or Bluetooth.
Error Message
Failed to obtain the hotspot MAC address because the Wi-Fi is not connected.
Description
This error code is reported if the attempt to obtain the MAC address of the Wi-Fi hotspot or router fails because the device is not connected to the Wi-Fi hotspot or router.
Possible Cause
Wi-Fi is disabled.
Wi-Fi is enabled, but the device is not connected to a Wi-Fi hotspot or router.
Procedure
Enable Wi-Fi.
Connect to a router or Wi-Fi hotspot.
Error Message
Failed to add a beacon fence because the location switch is off.
Description
This error code is reported if the attempt to add a beacon fence fails because the location switch is turned off.
Possible Cause
The location switch is turned off.
Procedure
Display a prompt asking the user to enable the location service.
Error Message
Failed to add a beacon fence because the bluetooth switch is off.
Description
This error code is reported if the attempt to add a beacon fence fails because the Bluetooth is disabled.
Possible Cause
Bluetooth is disabled.
Procedure
Display a prompt asking the user to enable Bluetooth.
Error Message
The number of beacon fence exceeds the maximum.
Description
This error code is reported if the attempt to add a beacon fence fails because the number of beacon fences has reached the maximum.
Possible Cause
The number of beacon fences has reached the maximum (that is, 16).
Procedure
Delete unnecessary geofences before adding new ones.
Error Message
Failed to delete the fence due to incorrect beacon fence information.
Description
This error code is reported if the attempt to delete a beacon fence fails because the beacon fence information is incorrect.
Possible Cause
The information about the beacon fence to be deleted is incorrect.
Procedure
Pass the correct beacon fence information to the beacon fence deletion API.
Error Message
Duplicate beacon fence information.
Description
This error code is reported if the attempt to add a beacon fence fails because the beacon fence already exists.
Possible Cause
The beacon fence already exists in the system.
Procedure
Delete unnecessary beacon fences before adding new ones.
Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
Quick start
Helps you find desired resources with ease.