1# Webview Error Codes 2 3> **NOTE** 4> 5> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](../errorcode-universal.md). 6 7## 17100001 WebviewController Not Associated with a Web Component 8 9**Error Message** 10 11Init error. The WebviewController must be associated with a Web component. 12 13**Description** 14 15This error code is reported when the **WebviewController** object is not associated with any **Web** component. 16 17**Solution** 18 19Use [onControllerAttached()](ts-basic-components-web.md#oncontrollerattached10) to check whether the **WebViewController** object is associated with the **Web** component. 20 21 22## 17100002 Invalid URL 23 24**Error Message** 25 26Invalid url. 27 28**Description** 29 30This error code is reported when the URL format is incorrect. 31 32**Solution** 33 34Verify the URL format. 35 36 37## 17100003 Incorrect Resource Path 38 39**Error Message** 40 41Invalid resource path or file type. 42 43**Description** 44 45This error code is reported when the path to the resource file is incorrect. 46 47**Possible Causes** 48 49The resource file does not exist or cannot be accessed. 50 51**Solution** 52 53Make sure the path to the resource file is correct. 54 55 56## 17100004 Function Not Enabled 57 58**Error Message** 59 60Function not enabled. 61 62**Description** 63 64This error code is reported when the related function is not enabled. 65 66**Solution** 67 68Make sure the related function is enabled. 69 70 71## 17100005 Invalid Cookie Value 72 73**Error Message** 74 75Invalid cookie value. 76 77**Description** 78 79This error code is reported when the cookie value type is invalid. 80 81**Possible Causes** 82 83The cookie value type is not supported. 84 85**Solution** 86 87Verify the cookie value type. 88 89 90## 17100006 Message Port Callback Cannot Be Registered 91 92**Error Message** 93 94Failed to register a message event for the port. 95 96**Description** 97 98This error code is reported when a callback fails to be registered for the message port. 99 100**Possible Causes** 101 102The port is closed. 103 104**Solution** 105 106Make sure the port is open. 107 108 109## 17100007 Invalid Forward or Backward Operation 110 111**Error Message** 112 113Invalid backward or forward operation. 114 115**Description** 116 117This error code is reported when the specified forward or backward cannot be performed. 118 119**Possible Causes** 120 1211. The browsing history is cleared. 122 1232. There is no browsing operation corresponding to the forward or backward operation. 124 125**Solution** 126 1271. Check whether **clearHistory** has been performed. 128 1292. Check whether the number of pages specified by the forward or backward operation is available. 130 131 132## 17100008 javaScriptProxy Does Not Exist 133 134**Error Message** 135 136Failed to delete JavaScriptProxy because it does not exist. 137 138**Description** 139 140This error code is reported when the **javaScriptProxy** object to delete does not exist. 141 142**Possible Causes** 143 144The target **javaScriptProxy** object is not yet registered. 145 146**Solution** 147 148Make sure the **javaScriptProxy** object is registered. 149 150 151## 17100009 Zoom Operation Failure 152 153**Error Message** 154 155The zoom operation failed. 156 157**Description** 158 159This error code is reported when the page cannot be zoomed in or out. 160 161**Possible Causes** 162 163The zoom ratio has reached its maximum or minimum. 164 165**Solution** 166 167Check whether the zoom ratio has reached its maximum or minimum. 168 169 170## 17100010 Failure to Send Messages Through a Port 171 172**Error Message** 173 174Failed to post messages through the port. 175 176**Description** 177 178This error code is reported when the current port cannot be used to send messages. 179 180**Possible Causes** 181 182The local or remote port is closed. 183 184**Solution** 185 1861. Make sure the local port is open. 187 1882. Make sure an **onMessageEvent** callback is registered for the remote port. 189 190 191## 17100011 Invalid Origin 192 193**Error Message** 194 195Invalid origin. 196 197**Description** 198 199This error code is reported when the input parameter **origin** is invalid. 200 201**Possible Causes** 202 2031. The **origin** parameter is empty. 204 2052. The **origin** value is invalid. 206 207**Solution** 208 209Make sure the **origin** value is valid. 210 211 212## 17100012 No Web Storage Origin 213 214**Error Message** 215 216Invalid web storage origin. 217 218**Description** 219 220This error code is reported when no web storage origin is available. 221 222**Possible Causes** 223 224The related JS database API is not used. 225 226**Solution** 227 2281. Check whether the JS database API is used. 229 2302. If the JS database API is used, find out the failure cause, for example, check whether **databaseAccess** is enabled. 231 232 233## 17100013 Invalid Number of Sockets During Preconnection 234 235**Error Message** 236 237The number of sockets to be preconnected is invalid. 238 239**Description** 240 241This error code is reported when the number of sockets to be preconnected is invalid. 242 243**Possible Causes** 244 245The number of sockets is less than or equal to 0 or greater than 6. 246 247**Solution** 248 249Make sure the specified number of sockets is greater than 0 and less than or equal to 6. 250 251 252## 17100014 Type and Value Mismatch 253 254**Error Message** 255 256The type and value of the message do not match. 257 258**Description** 259 260This error code is reported when the type and value of the message do not match. 261 262**Possible Causes** 263 264The value of the obtained message does not match the type of the message. 265 266**Solution** 267 268Call the API based on the message type to obtain the message value. For example, if the type is **BOOLEAN**, call the **GetBoolean** API to obtain the Boolean value. 269 270 271## 17100015 Memory Allocation Failure 272 273**Error Message** 274 275Memory allocation failed. 276 277**Description** 278 279This error code is reported when memory allocation failed due to insufficient memory. 280 281**Possible Causes** 282 283The data to send is too large. 284 285**Solution** 286 287Check the length of the data to be sent. 288 289## 17100016 Download Task Not Paused 290 291**Error Message** 292 293The download task is not paused. 294 295**Description** 296 297This error code is reported when an attempt is made to resume a download task that is not paused. 298 299**Possible Causes** 300 301**WebDownloadItem.resume** is called when the download task is not paused. 302 303**Solution** 304 305N/A 306 307## 17100017 Invalid WebviewController 308 309**Error Message** 310 311No valid WebviewController is associated. 312 313**Description** 314 315This error code is reported when the current **WebviewController** object is invalid. 316 317**Possible Causes** 318 319The **WebviewController** object is not associated with a valid **Web** component. 320 321**Solution** 322 323Use a **WebviewController** object that is associated with a valid **Web** component. 324 325## 17100018 No WebDownloadDelegate Available 326 327**Error Message** 328 329No WebDownloadDelegate has been set yet. 330 331**Description** 332 333This error code is reported when no **WebDownloadDelegate** is available to receive the download state. 334 335**Possible Causes** 336 337**WebDownloadManager.resumeDownload** is called when **WebDownloadDelegate** has not been set. 338 339**Solution** 340 341Use **WebDownloadManager.setDownloadDelegate** to set a **WebDownloadDelegate** class. 342 343## 17100019 Download Not Started Yet 344 345**Error Message** 346 347The download task is not started yet. 348 349**Description** 350 351This error code is reported when an attempt is made to pause or resume a download task that has not been started. 352 353**Possible Causes** 354 355**pause** or **resume** is called when the download task that has not been started. 356 357**Solution** 358 359Call **start('xxx')** in **WebDownloadDelegate.onBeforeDownload** and specify the download path. 360 361## 17100020 Failed to Register Custom Schemes 362 363**Error Message** 364 365Failed to register custom schemes. 366 367**Description** 368 369This error code is reported when a custom scheme failed to be registered. 370 371**Possible Causes** 372 373The custom scheme is set after the ArkWeb engine is initialized. 374 375**Solution** 376 377Register the custom scheme before initializing the ArkWeb engine. 378 379## 17100021 WebResourceHandler Is Invalid 380 381**Error Message** 382 383The resource handler is invalid. 384 385**Description** 386 387This error code is reported when the **WebResourceHandler** object is invalid. 388 389**Possible Causes** 390 3911. The corresponding request is not intercepted in **WebSchemeHandler**. 392 3932. The request is intercepted before the response body is constructed, and the request is ended due to some reasons. 394 3953. The **WebResourceHandler** object has called **didFinish** and **didFail**. 396 397 398**Solution** 399 400Do not call the **WebResourceHandler** API in the preceding situations. 401 402## 17100022 Failed to Initialize WebHttpBodyStream 403 404**Error Message** 405 406Failed to initialize the HTTP body stream. 407 408**Description** 409 410This error code is reported when data initialization of **WebHttpBodyStream** fails. 411 412**Possible Causes** 413 414The data carried in the POST request is invalid, for example, the data flow contains data in a file but the specified file path does not exist. 415 416**Solution** 417 418Verify that the data carried in the POST request is valid. 419