This topic describes only module-specific error codes. For details about universal error codes, see Universal Error Codes.
Error Message
Init error. The WebviewController must be associated with a Web component.
Description
This error code is reported when the WebviewController object is not associated with any Web component.
Possible Causes
The WebViewController object is not associated with any Web component.
Solution
Use onControllerAttached() to check whether the WebViewController object is attached with the Web component.
Error Message
URL error. Possible causes: 1. No valid cookie found for the specified URL. 2. The webpage corresponding to the URL is invalid, or the URL length exceeds 2*1024*1024.
Description
The URL is incorrect. Possible causes are as follows:
No valid cookie is found for the specified URL.
The web page corresponding to the URL is invalid, or the URL length exceeds 2 × 1024 × 1024 characters.
Possible Causes
No valid cookie is found for the specified URL.
The web page corresponding to the URL is invalid, or the URL length exceeds 2 × 1024 × 1024 characters.
Solution
Check whether the URL is correct and contains a maximum of 2 × 1024 × 1024 characters.
Error Message
Description
Possible Causes
Solution
Error Message
Function not enabled.
Description
This error code is reported when the related function is not enabled.
Possible Causes
The related function is not set or enabled, or the function is incorrectly invoked.
Solution
Check whether the related function is enabled, for example, whether XXXAccess is set to true, or whether the current API supports concurrency.
Error Message
The provided cookie value is invalid. It must follow the format specified in RFC 6265.
Description
This error code is reported when the cookie value type is invalid.
Possible Causes
The cookie value type is not supported.
Solution
Verify the cookie value type.
Error Message
Failed to register a message event for the port.
Description
This error code is reported when a callback fails to be registered for the message port.
Possible Causes
The port is closed.
Solution
Make sure the port is open.
Error Message
Failed to delete JavaScriptProxy because it does not exist.
Description
A JavaScriptProxy that does not exist is deleted.
Possible Causes
The passed JavaScriptProxy has not been registered.
Solution
Check whether the passed JavaScriptProxy is successfully registered.
Error Message
Failed to post messages through the port.
Description
This error code is reported when the current port cannot be used to send messages.
Possible Causes
The local or remote port is closed.
Solution
Make sure the local port is open.
Make sure an onMessageEvent callback is registered for the remote port.
Error Message
Invalid origin.The origin format must follow defined in RFC 6454.
Description
This error code is reported when the input parameter origin is invalid. The origin value must in the format defined in RFC 6454.
Possible Causes
The origin parameter is empty.
The origin value is invalid.
Solution
Make sure the origin value is valid.
Error Message
Invalid web storage origin.
Description
This error code is reported when no web storage origin is available.
Possible Causes
The related JS database API is not used.
Solution
Check whether the JS database API is used.
If the JS database API is used, find out the failure cause, for example, check whether databaseAccess is enabled.
Error Message
The number of sockets to be preconnected is invalid.
Description
This error code is reported when the number of sockets to be preconnected is invalid.
Possible Causes
The number of sockets is less than or equal to 0 or greater than 6.
Solution
Make sure the specified number of sockets is greater than 0 and less than or equal to 6.
Error Message
The type and value of the message do not match.
Description
This error code is reported when the type and value of the message do not match.
Possible Causes
The value of the obtained message does not match the type of the message.
Solution
Call 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.
Error Message
The download task is not paused.
Description
This error code is reported when an attempt is made to resume a download task that is not paused.
Possible Causes
WebDownloadItem.resume is called when the download task is not paused.
Solution
N/A
Error Message
No WebDownloadDelegate has been set yet.
Description
This error code is reported when no WebDownloadDelegate is available to receive the download state.
Possible Causes
WebDownloadManager.resumeDownload is called when WebDownloadDelegate has not been set.
Solution
Use WebDownloadManager.setDownloadDelegate to set a WebDownloadDelegate class.
Error Message
The download task is not started yet.
Description
This error code is reported when an attempt is made to pause or resume a download task that has not been started.
Possible Causes
pause or resume is called when the download task that has not been started.
Solution
Call start('xxx') in WebDownloadDelegate.onBeforeDownload and specify the download path.
Error Message
Failed to register custom schemes.
Description
This error code is reported when a custom scheme failed to be registered.
Possible Causes
The custom scheme is set after the ArkWeb engine is initialized.
Solution
Register the custom scheme before initializing the ArkWeb engine.
Error Message
The resource handler is invalid.
Description
This error code is reported when the WebResourceHandler object is invalid.
Possible Causes
The corresponding request is not intercepted in WebSchemeHandler.
The request is intercepted before the response body is constructed, and the request is ended due to some reasons.
The WebResourceHandler object has called didFinish and didFail.
Solution
Do not call the WebResourceHandler API in the preceding situations.
Error Message
Failed to initialize the HTTP body stream.
Description
This error code is reported when data initialization of WebHttpBodyStream fails.
Possible Causes
The 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.
Solution
Verify that the data carried in the POST request is valid.
Error Message
The port number is not within the allowed range.
Description
The port number is not within the allowed range.
Possible Causes
Some port numbers (for example, port numbers less than 1024) are well-known or system ports. These ports can be enabled on the operating system only when the privilege is granted. Therefore, applications are not allowed to use these port numbers.
Solution
Check whether the port number is within the allowed range.
Error Message
The errorCode is either ARKWEB_NET_OK or outside the range of error codes in WebNetErrorList.
Description
The network error code is ARKWEB_NET_OK or out of the range in WebNetErrorList.
Possible Causes
The error code is not within the range of WebNetErrorList, or NET_OK is used when the didFail API is called.
Solution
Check whether the error code is within the range of WebNetErrorList or whether NET_OK is used when the didFail API is called.