1e41f4b71Sopenharmony_ci# Location Kit Error Codes
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci> **NOTE**
4e41f4b71Sopenharmony_ci>
5e41f4b71Sopenharmony_ci> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](../errorcode-universal.md).
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ci## 3301000 Location Service Unavailable
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci**Error Information**
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ciThe location service is unavailable.
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci**Description**
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ciThis error code is reported when the location service is unavailable and relevant APIs cannot be called.
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci**Possible Causes**
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci1. The location service fails to be started. As a result, the communication between the application and the location service fails, and the location service is unavailable.
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ci2. The GNSS chip fails to be initialized, and thus the GNSS positioning function becomes invalid.
22e41f4b71Sopenharmony_ci
23e41f4b71Sopenharmony_ci3. The network positioning service is abnormal, and thus the network positioning function becomes invalid.
24e41f4b71Sopenharmony_ci
25e41f4b71Sopenharmony_ci**Solution**
26e41f4b71Sopenharmony_ci
27e41f4b71Sopenharmony_ciStop calling the API.
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ci## 3301100 Location Service Unavailable Because of Switch Toggled Off
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ci**Error Information**
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ciThe location switch is off.
34e41f4b71Sopenharmony_ci
35e41f4b71Sopenharmony_ci**Description**
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ciThis error code is reported when the location service is unavailable because the service switch is toggled off.
38e41f4b71Sopenharmony_ci
39e41f4b71Sopenharmony_ci**Possible Causes**
40e41f4b71Sopenharmony_ci
41e41f4b71Sopenharmony_ciThe location service switch is toggled off, which makes basic functions such as continuous positioning and immediate positioning unavailable.
42e41f4b71Sopenharmony_ci
43e41f4b71Sopenharmony_ci**Solution**
44e41f4b71Sopenharmony_ci
45e41f4b71Sopenharmony_ciDisplay a prompt asking for enabling the location service.
46e41f4b71Sopenharmony_ci
47e41f4b71Sopenharmony_ci## 3301200 Failed to Obtain the Positioning Result
48e41f4b71Sopenharmony_ci
49e41f4b71Sopenharmony_ci**Error Information**
50e41f4b71Sopenharmony_ci
51e41f4b71Sopenharmony_ciFailed to obtain the geographical location.
52e41f4b71Sopenharmony_ci
53e41f4b71Sopenharmony_ci**Description**
54e41f4b71Sopenharmony_ci
55e41f4b71Sopenharmony_ciThis error code is reported if the location service has failed, leading to a failure to obtain the positioning result.
56e41f4b71Sopenharmony_ci
57e41f4b71Sopenharmony_ci**Possible Causes**
58e41f4b71Sopenharmony_ci
59e41f4b71Sopenharmony_ci1. Positioning timed out because of weak GNSS signals.
60e41f4b71Sopenharmony_ci
61e41f4b71Sopenharmony_ci2. Positioning times out because the network positioning service is abnormal.
62e41f4b71Sopenharmony_ci
63e41f4b71Sopenharmony_ci3. Positioning times out because the positioning result does not meet the requirement of **maxAccuracy**.
64e41f4b71Sopenharmony_ci
65e41f4b71Sopenharmony_ci4. The application fails to obtain the previous location because the system does not cache the location information.
66e41f4b71Sopenharmony_ci
67e41f4b71Sopenharmony_ci5. The system time is incorrectly set.
68e41f4b71Sopenharmony_ci
69e41f4b71Sopenharmony_ci**Solution**
70e41f4b71Sopenharmony_ci
71e41f4b71Sopenharmony_ci1. Move to an open area and try again.
72e41f4b71Sopenharmony_ci
73e41f4b71Sopenharmony_ci2. Check the device for Internet or Wi-Fi connectivity and an installed SIM card.
74e41f4b71Sopenharmony_ci
75e41f4b71Sopenharmony_ci3. Check whether the **maxAccuracy** field in the location request is properly set.
76e41f4b71Sopenharmony_ci
77e41f4b71Sopenharmony_ci4. Use **getCurrentLocation** to obtain the real-time location if no location information is cached in the system.
78e41f4b71Sopenharmony_ci
79e41f4b71Sopenharmony_ci5. Enable automatic setting on the **Time & Date** page.
80e41f4b71Sopenharmony_ci
81e41f4b71Sopenharmony_ci
82e41f4b71Sopenharmony_ci## 3301300 Query Failed During Reverse Geocoding
83e41f4b71Sopenharmony_ci
84e41f4b71Sopenharmony_ci**Error Information**
85e41f4b71Sopenharmony_ci
86e41f4b71Sopenharmony_ciReverse geocoding query failed.
87e41f4b71Sopenharmony_ci
88e41f4b71Sopenharmony_ci**Description**
89e41f4b71Sopenharmony_ci
90e41f4b71Sopenharmony_ciThis error code is reported if the query during reverse geocoding has failed.
91e41f4b71Sopenharmony_ci
92e41f4b71Sopenharmony_ci**Possible Causes**
93e41f4b71Sopenharmony_ci
94e41f4b71Sopenharmony_ci- 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.
95e41f4b71Sopenharmony_ci
96e41f4b71Sopenharmony_ci- The x86 emulator does not support the reverse geocoding function. A reverse geocoding query fails if the x86 emulator is used for debugging.
97e41f4b71Sopenharmony_ci
98e41f4b71Sopenharmony_ci**Solution**
99e41f4b71Sopenharmony_ci
100e41f4b71Sopenharmony_ci- For the network problem, try the reverse geocoding query again after the network is resumed.
101e41f4b71Sopenharmony_ci
102e41f4b71Sopenharmony_ci- For the x86 emulator problem, try the reverse geocoding query again on a real device.
103e41f4b71Sopenharmony_ci
104e41f4b71Sopenharmony_ci## 3301400 Query Failed During Geocoding
105e41f4b71Sopenharmony_ci
106e41f4b71Sopenharmony_ci**Error Information**
107e41f4b71Sopenharmony_ci
108e41f4b71Sopenharmony_ciGeocoding query failed.
109e41f4b71Sopenharmony_ci
110e41f4b71Sopenharmony_ci**Description**
111e41f4b71Sopenharmony_ci
112e41f4b71Sopenharmony_ciThis error code is reported if the query during geocoding has failed.
113e41f4b71Sopenharmony_ci
114e41f4b71Sopenharmony_ci**Possible Causes**
115e41f4b71Sopenharmony_ci
116e41f4b71Sopenharmony_ci1. A certain request parameter is incorrect, or no result can be found based on the parameter.<br>
117e41f4b71Sopenharmony_ci2. 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.
118e41f4b71Sopenharmony_ci
119e41f4b71Sopenharmony_ci**Solution**
120e41f4b71Sopenharmony_ci
121e41f4b71Sopenharmony_ciCheck the request parameters or network status and try again.
122e41f4b71Sopenharmony_ci
123e41f4b71Sopenharmony_ci## 3301500 Area Information Query Failed
124e41f4b71Sopenharmony_ci
125e41f4b71Sopenharmony_ci**Error Information**
126e41f4b71Sopenharmony_ci
127e41f4b71Sopenharmony_ciFailed to query the area information.
128e41f4b71Sopenharmony_ci
129e41f4b71Sopenharmony_ci**Description**
130e41f4b71Sopenharmony_ci
131e41f4b71Sopenharmony_ciThis error code is reported if the query of the area information (including the country code) has failed.
132e41f4b71Sopenharmony_ci
133e41f4b71Sopenharmony_ci**Possible Causes**
134e41f4b71Sopenharmony_ci
135e41f4b71Sopenharmony_ciThe correct area information is not found.
136e41f4b71Sopenharmony_ci
137e41f4b71Sopenharmony_ci**Solution**
138e41f4b71Sopenharmony_ci
139e41f4b71Sopenharmony_ciStop calling the API for querying the country code.
140e41f4b71Sopenharmony_ci
141e41f4b71Sopenharmony_ci## 3301600 Geofence Operation Failed
142e41f4b71Sopenharmony_ci
143e41f4b71Sopenharmony_ci**Error Information**
144e41f4b71Sopenharmony_ci
145e41f4b71Sopenharmony_ciFailed to operate the geofence.
146e41f4b71Sopenharmony_ci
147e41f4b71Sopenharmony_ci**Description**
148e41f4b71Sopenharmony_ci
149e41f4b71Sopenharmony_ciThis error code is reported if a geofence operation, for example, adding, deleting, pausing, or resuming a geofence, has failed.
150e41f4b71Sopenharmony_ci
151e41f4b71Sopenharmony_ci**Possible Causes**
152e41f4b71Sopenharmony_ci
153e41f4b71Sopenharmony_ci1. The GNSS chip does not support the geofence function.
154e41f4b71Sopenharmony_ci
155e41f4b71Sopenharmony_ci2. The bottom-layer service logic is abnormal.
156e41f4b71Sopenharmony_ci
157e41f4b71Sopenharmony_ci**Solution**
158e41f4b71Sopenharmony_ci
159e41f4b71Sopenharmony_ciStop calling the geofence operation API.
160e41f4b71Sopenharmony_ci
161e41f4b71Sopenharmony_ci## 3301601 Failed to Add a Geofence Due to a Limit on the Maximum Number
162e41f4b71Sopenharmony_ci
163e41f4b71Sopenharmony_ci**Error Information**
164e41f4b71Sopenharmony_ci
165e41f4b71Sopenharmony_ciThe number of geofences exceeds the maximum.
166e41f4b71Sopenharmony_ci
167e41f4b71Sopenharmony_ci**Description**
168e41f4b71Sopenharmony_ci
169e41f4b71Sopenharmony_ciThis error code is reported if the attempt to add a geofence fails because the number of geofences exceeds the maximum.
170e41f4b71Sopenharmony_ci
171e41f4b71Sopenharmony_ci**Possible Causes**
172e41f4b71Sopenharmony_ci
173e41f4b71Sopenharmony_ciThe number of geofences has reached the maximum.
174e41f4b71Sopenharmony_ci
175e41f4b71Sopenharmony_ci**Solution**
176e41f4b71Sopenharmony_ci
177e41f4b71Sopenharmony_ciDelete unnecessary geofences before adding new ones.
178e41f4b71Sopenharmony_ci
179e41f4b71Sopenharmony_ci## 3301602 Failed to Delete a Geofence Due to an Incorrect ID
180e41f4b71Sopenharmony_ci
181e41f4b71Sopenharmony_ci**Error Information**
182e41f4b71Sopenharmony_ci
183e41f4b71Sopenharmony_ciFailed to delete a geofence due to an incorrect ID.
184e41f4b71Sopenharmony_ci
185e41f4b71Sopenharmony_ci**Description**
186e41f4b71Sopenharmony_ci
187e41f4b71Sopenharmony_ciThe ID of the geofence to be deleted is incorrect.
188e41f4b71Sopenharmony_ci
189e41f4b71Sopenharmony_ci**Possible Causes**
190e41f4b71Sopenharmony_ci
191e41f4b71Sopenharmony_ciThe geofence ID passed to the geofence deletion API is incorrect.
192e41f4b71Sopenharmony_ci
193e41f4b71Sopenharmony_ci**Solution**
194e41f4b71Sopenharmony_ci
195e41f4b71Sopenharmony_ciPass a correct geofence ID to the geofence deletion API.
196e41f4b71Sopenharmony_ci
197e41f4b71Sopenharmony_ci## 3301700 No Response to the Request
198e41f4b71Sopenharmony_ci
199e41f4b71Sopenharmony_ci**Error Information**
200e41f4b71Sopenharmony_ci
201e41f4b71Sopenharmony_ciNo response to the request.
202e41f4b71Sopenharmony_ci
203e41f4b71Sopenharmony_ci**Description**
204e41f4b71Sopenharmony_ci
205e41f4b71Sopenharmony_ciThis 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.
206e41f4b71Sopenharmony_ci
207e41f4b71Sopenharmony_ci**Possible Causes**
208e41f4b71Sopenharmony_ci
209e41f4b71Sopenharmony_ci1. The user does not click a button as required for confirmation.
210e41f4b71Sopenharmony_ci
211e41f4b71Sopenharmony_ci2. The GNSS chip does not respond.
212e41f4b71Sopenharmony_ci
213e41f4b71Sopenharmony_ci3. The network server does not respond.
214e41f4b71Sopenharmony_ci
215e41f4b71Sopenharmony_ci**Solution**
216e41f4b71Sopenharmony_ci
217e41f4b71Sopenharmony_ciStop calling relevant APIs.
218e41f4b71Sopenharmony_ci
219e41f4b71Sopenharmony_ci## 3301800 Failed to Start Wi-Fi or Bluetooth Scanning
220e41f4b71Sopenharmony_ci
221e41f4b71Sopenharmony_ci**Error Information**
222e41f4b71Sopenharmony_ci
223e41f4b71Sopenharmony_ciFailed to start WiFi or Bluetooth scanning.
224e41f4b71Sopenharmony_ci
225e41f4b71Sopenharmony_ci**Description**
226e41f4b71Sopenharmony_ci
227e41f4b71Sopenharmony_ciThis error code is reported if Wi-Fi or Bluetooth scanning fails to start.
228e41f4b71Sopenharmony_ci
229e41f4b71Sopenharmony_ci**Possible Causes**
230e41f4b71Sopenharmony_ci
231e41f4b71Sopenharmony_ci1. The Wi-Fi or Bluetooth service incurs an internal error.
232e41f4b71Sopenharmony_ci
233e41f4b71Sopenharmony_ci2. Power consumption control is activated because of low battery level.
234e41f4b71Sopenharmony_ci
235e41f4b71Sopenharmony_ci3. Wi-Fi or Bluetooth is not enabled.
236e41f4b71Sopenharmony_ci
237e41f4b71Sopenharmony_ci**Solution**
238e41f4b71Sopenharmony_ci
239e41f4b71Sopenharmony_ciTurn off Wi-Fi or Bluetooth, and then turn it on again.
240