You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Nithin (JIRA)" <ji...@apache.org> on 2016/03/21 08:13:25 UTC

[jira] [Comment Edited] (CB-10852) Android Webview loadUrl length?

    [ https://issues.apache.org/jira/browse/CB-10852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15203845#comment-15203845 ] 

Nithin edited comment on CB-10852 at 3/21/16 7:12 AM:
------------------------------------------------------

[~nikhilkh] [~bowserj] did more debug on this..

Special character/Control character issue:
1)Cordova 3.5.0 allows Special character/Control character(line feed) in webview loadUrl function..
 
2)Cordova 4.0.2+ does not allow Special character/Control character(line feed)  in webview loadUrl function.(Generally \n should not be part URL). 

Not sure on which exact cordova 3.5.0 +  to  4.0.2 version issues started..



Any thoughts why this behaviour in different cordova versions? where is the filtering done(Could not find any difference in loadUrl code at java) is JS level invloved? pls share your thoughts..


Length issue:
 
22972395  ~22mb string data giving one shot will have end up having OutOfMemoryError.
 
 
3-18 16:39:57.332 E/ACRA    (18797): java.lang.OutOfMemoryError: Failed to allocate a 68917332 byte allocation with 16777216 free bytes and 56MB until OOM
 
03-18 16:39:57.332 E/ACRA    (18797):    at java.lang.AbstractStringBuilder.enlargeBuffer(AbstractStringBuilder.java:95)
 
03-18 16:39:57.332 E/ACRA    (18797):    at java.lang.AbstractStringBuilder.append0(AbstractStringBuilder.java:146)
 
03-18 16:39:57.332 E/ACRA    (18797):    at java.lang.StringBuilder.append(StringBuilder.java:216)
 
Need a  design(JS level query or java level split) for this.. highly needed for client scalability in long usage..
 
http://stackoverflow.com/questions/19537550/android-out-of-memory-error-stringbuilder


Thanks
Nithin


was (Author: nitz_jira):
[~nikhilkh][~bowserj] did more debug on this..

Special character/Control character issue:
1)Cordova 3.5.0 allows Special character/Control character(line feed) in webview loadUrl function..
 
2)Cordova 4.0.2+ does not allow Special character/Control character(line feed)  in webview loadUrl function.(Generally \n should not be part URL). 

Not sure on which exact cordova 3.5.0 +  to  4.0.2 version issues started..



Any thoughts why this behaviour in different cordova versions? where is the filtering done(Could not find any difference in loadUrl code at java) is JS level invloved? pls share your thoughts..


Length issue:
 
22972395  ~22mb string data giving one shot will have end up having OutOfMemoryError.
 
 
3-18 16:39:57.332 E/ACRA    (18797): java.lang.OutOfMemoryError: Failed to allocate a 68917332 byte allocation with 16777216 free bytes and 56MB until OOM
 
03-18 16:39:57.332 E/ACRA    (18797):    at java.lang.AbstractStringBuilder.enlargeBuffer(AbstractStringBuilder.java:95)
 
03-18 16:39:57.332 E/ACRA    (18797):    at java.lang.AbstractStringBuilder.append0(AbstractStringBuilder.java:146)
 
03-18 16:39:57.332 E/ACRA    (18797):    at java.lang.StringBuilder.append(StringBuilder.java:216)
 
Need a  design(JS level query or java level split) for this.. highly needed for client scalability in long usage..
 
http://stackoverflow.com/questions/19537550/android-out-of-memory-error-stringbuilder


Thanks
Nithin

> Android Webview loadUrl length?
> -------------------------------
>
>                 Key: CB-10852
>                 URL: https://issues.apache.org/jira/browse/CB-10852
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>         Environment: Using Android Cordova with Sencha touch framework.
>            Reporter: Nithin
>              Labels: triaged
>
> Hi Folks,
>  If url length is 57751 the data is loaded, but if url length is 177263 the data is not loaded.
> Basically i am trying to pass the huge data from java to JS/HTML(JSON) level using loadUrl.
> http://developer.android.com/reference/android/webkit/WebView.html#loadUrl(java.lang.String)
> Is there any upper cap limit for URL?( Integer.MAX_VALUE, which is 2^31 - 1 (or approximately 2 billion.So you can have a String of 2,147,483,647 characters)?
> Do i need to spilt the data and send or any other way to send huge data to 
> JS/HTML?
> Thanks
> Nithin 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org