You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "anton kukushkin (JIRA)" <ji...@apache.org> on 2012/10/02 13:23:07 UTC

[jira] [Created] (CB-1571) FileTransfer escapes callback arguments on iOS

anton kukushkin created CB-1571:
-----------------------------------

             Summary: FileTransfer escapes callback arguments on iOS
                 Key: CB-1571
                 URL: https://issues.apache.org/jira/browse/CB-1571
             Project: Apache Cordova
          Issue Type: Bug
          Components: iOS
    Affects Versions: 2.1.0
         Environment: iPad and iPhone running iOS6
            Reporter: anton kukushkin
            Assignee: Shazron Abdullah
            Priority: Minor


I've hit an obscure error when using Cordova 2.1 FileTransfer to upload a file and parse the response as json text (on iOS6):

"Error in success callback: FileTransfer15=SyntaxError: Unable to parse JSON string".

The code i was using for success callback looks like this:

var result = $.parseJSON(resultString);
console.log("Code = " + r.responseCode);
console.log("Response = " + result);
console.log("Sent = " + r.bytesSent);

Digging up on the error, i found that, somewhy, the argument string returned by FileTransfer native part to callback is escaped (and as such can't be parsed to JSON).

This is inconsistent with FileTransfer's behaviour on android as well as with the other plugins and normal handling of ajax calls, so i'm filing this as bug.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CB-1571) FileTransfer escapes callback arguments on iOS

Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Grieve reassigned CB-1571:
---------------------------------

    Assignee: Andrew Grieve  (was: Shazron Abdullah)
    
> FileTransfer escapes callback arguments on iOS
> ----------------------------------------------
>
>                 Key: CB-1571
>                 URL: https://issues.apache.org/jira/browse/CB-1571
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: iPad and iPhone running iOS6
>            Reporter: anton kukushkin
>            Assignee: Andrew Grieve
>            Priority: Minor
>
> I've hit an obscure error when using Cordova 2.1 FileTransfer to upload a file and parse the response as json text (on iOS6):
> "Error in success callback: FileTransfer15=SyntaxError: Unable to parse JSON string".
> The code i was using for success callback looks like this:
> var win = function(r) {
>    var result = $.parseJSON(r);
>    // stuff being done with parsed result object
> }
> Digging up on the error, i found that, somewhy, the argument string returned by FileTransfer native part to this callback is escaped, and as such can't be parsed to JSON. This is inconsistent with FileTransfer's behaviour on android as well as with the other plugins and normal handling of ajax calls, so i'm filing this as bug.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CB-1571) FileTransfer escapes callback arguments on iOS

Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Grieve resolved CB-1571.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.0

fixed with commit: https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-ios.git;a=commit;h=e7b16f4b0b20d5a257cac140f115da0e194369b3

Added test: https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-mobile-spec.git;a=commit;h=b3578063f75d3261e242a482280619f6cd6f6b4b
                
> FileTransfer escapes callback arguments on iOS
> ----------------------------------------------
>
>                 Key: CB-1571
>                 URL: https://issues.apache.org/jira/browse/CB-1571
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: iPad and iPhone running iOS6
>            Reporter: anton kukushkin
>            Assignee: Andrew Grieve
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> I've hit an obscure error when using Cordova 2.1 FileTransfer to upload a file and parse the response as json text (on iOS6):
> "Error in success callback: FileTransfer15=SyntaxError: Unable to parse JSON string".
> The code i was using for success callback looks like this:
> var win = function(r) {
>    var result = $.parseJSON(r);
>    // stuff being done with parsed result object
> }
> Digging up on the error, i found that, somewhy, the argument string returned by FileTransfer native part to this callback is escaped, and as such can't be parsed to JSON. This is inconsistent with FileTransfer's behaviour on android as well as with the other plugins and normal handling of ajax calls, so i'm filing this as bug.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1571) FileTransfer escapes callback arguments on iOS

Posted by "anton kukushkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

anton kukushkin updated CB-1571:
--------------------------------

    Description: 
I've hit an obscure error when using Cordova 2.1 FileTransfer to upload a file and parse the response as json text (on iOS6):

"Error in success callback: FileTransfer15=SyntaxError: Unable to parse JSON string".

The code i was using for success callback looks like this:

var win = function(r) {
   var result = $.parseJSON(r);
   console.log("Code = " + r.responseCode);
   console.log("Response = " + result);
   console.log("Sent = " + r.bytesSent);
}

Digging up on the error, i found that, somewhy, the argument string returned by FileTransfer native part to callback is escaped (and as such can't be parsed to JSON).

This is inconsistent with FileTransfer's behaviour on android as well as with the other plugins and normal handling of ajax calls, so i'm filing this as bug.

  was:
I've hit an obscure error when using Cordova 2.1 FileTransfer to upload a file and parse the response as json text (on iOS6):

"Error in success callback: FileTransfer15=SyntaxError: Unable to parse JSON string".

The code i was using for success callback looks like this:

var result = $.parseJSON(resultString);
console.log("Code = " + r.responseCode);
console.log("Response = " + result);
console.log("Sent = " + r.bytesSent);

Digging up on the error, i found that, somewhy, the argument string returned by FileTransfer native part to callback is escaped (and as such can't be parsed to JSON).

This is inconsistent with FileTransfer's behaviour on android as well as with the other plugins and normal handling of ajax calls, so i'm filing this as bug.

    
> FileTransfer escapes callback arguments on iOS
> ----------------------------------------------
>
>                 Key: CB-1571
>                 URL: https://issues.apache.org/jira/browse/CB-1571
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: iPad and iPhone running iOS6
>            Reporter: anton kukushkin
>            Assignee: Shazron Abdullah
>            Priority: Minor
>
> I've hit an obscure error when using Cordova 2.1 FileTransfer to upload a file and parse the response as json text (on iOS6):
> "Error in success callback: FileTransfer15=SyntaxError: Unable to parse JSON string".
> The code i was using for success callback looks like this:
> var win = function(r) {
>    var result = $.parseJSON(r);
>    console.log("Code = " + r.responseCode);
>    console.log("Response = " + result);
>    console.log("Sent = " + r.bytesSent);
> }
> Digging up on the error, i found that, somewhy, the argument string returned by FileTransfer native part to callback is escaped (and as such can't be parsed to JSON).
> This is inconsistent with FileTransfer's behaviour on android as well as with the other plugins and normal handling of ajax calls, so i'm filing this as bug.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1571) FileTransfer escapes callback arguments on iOS

Posted by "anton kukushkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

anton kukushkin updated CB-1571:
--------------------------------

    Description: 
I've hit an obscure error when using Cordova 2.1 FileTransfer to upload a file and parse the response as json text (on iOS6):

"Error in success callback: FileTransfer15=SyntaxError: Unable to parse JSON string".

The code i was using for success callback looks like this:

var win = function(r) {

   var result = $.parseJSON(r);

   console.log("Code = " + r.responseCode);

   console.log("Response = " + result);

   console.log("Sent = " + r.bytesSent);
}

Digging up on the error, i found that, somewhy, the argument string returned by FileTransfer native part to callback is escaped (and as such can't be parsed to JSON).

This is inconsistent with FileTransfer's behaviour on android as well as with the other plugins and normal handling of ajax calls, so i'm filing this as bug.

  was:
I've hit an obscure error when using Cordova 2.1 FileTransfer to upload a file and parse the response as json text (on iOS6):

"Error in success callback: FileTransfer15=SyntaxError: Unable to parse JSON string".

The code i was using for success callback looks like this:

var win = function(r) {
   var result = $.parseJSON(r);
   console.log("Code = " + r.responseCode);
   console.log("Response = " + result);
   console.log("Sent = " + r.bytesSent);
}

Digging up on the error, i found that, somewhy, the argument string returned by FileTransfer native part to callback is escaped (and as such can't be parsed to JSON).

This is inconsistent with FileTransfer's behaviour on android as well as with the other plugins and normal handling of ajax calls, so i'm filing this as bug.

    
> FileTransfer escapes callback arguments on iOS
> ----------------------------------------------
>
>                 Key: CB-1571
>                 URL: https://issues.apache.org/jira/browse/CB-1571
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: iPad and iPhone running iOS6
>            Reporter: anton kukushkin
>            Assignee: Shazron Abdullah
>            Priority: Minor
>
> I've hit an obscure error when using Cordova 2.1 FileTransfer to upload a file and parse the response as json text (on iOS6):
> "Error in success callback: FileTransfer15=SyntaxError: Unable to parse JSON string".
> The code i was using for success callback looks like this:
> var win = function(r) {
>    var result = $.parseJSON(r);
>    console.log("Code = " + r.responseCode);
>    console.log("Response = " + result);
>    console.log("Sent = " + r.bytesSent);
> }
> Digging up on the error, i found that, somewhy, the argument string returned by FileTransfer native part to callback is escaped (and as such can't be parsed to JSON).
> This is inconsistent with FileTransfer's behaviour on android as well as with the other plugins and normal handling of ajax calls, so i'm filing this as bug.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1571) FileTransfer escapes callback arguments on iOS

Posted by "anton kukushkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

anton kukushkin updated CB-1571:
--------------------------------

    Description: 
I've hit an obscure error when using Cordova 2.1 FileTransfer to upload a file and parse the response as json text (on iOS6):

"Error in success callback: FileTransfer15=SyntaxError: Unable to parse JSON string".

The code i was using for success callback looks like this:

var win = function(r) {
   var result = $.parseJSON(r);
   // stuff being done with parsed result object
}

Digging up on the error, i found that, somewhy, the argument string returned by FileTransfer native part to this callback is escaped, and as such can't be parsed to JSON. This is inconsistent with FileTransfer's behaviour on android as well as with the other plugins and normal handling of ajax calls, so i'm filing this as bug.

  was:
I've hit an obscure error when using Cordova 2.1 FileTransfer to upload a file and parse the response as json text (on iOS6):

"Error in success callback: FileTransfer15=SyntaxError: Unable to parse JSON string".

The code i was using for success callback looks like this:

var win = function(r) {

   var result = $.parseJSON(r);

   console.log("Code = " + r.responseCode);

   console.log("Response = " + result);

   console.log("Sent = " + r.bytesSent);
}

Digging up on the error, i found that, somewhy, the argument string returned by FileTransfer native part to callback is escaped (and as such can't be parsed to JSON).

This is inconsistent with FileTransfer's behaviour on android as well as with the other plugins and normal handling of ajax calls, so i'm filing this as bug.

    
> FileTransfer escapes callback arguments on iOS
> ----------------------------------------------
>
>                 Key: CB-1571
>                 URL: https://issues.apache.org/jira/browse/CB-1571
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: iPad and iPhone running iOS6
>            Reporter: anton kukushkin
>            Assignee: Shazron Abdullah
>            Priority: Minor
>
> I've hit an obscure error when using Cordova 2.1 FileTransfer to upload a file and parse the response as json text (on iOS6):
> "Error in success callback: FileTransfer15=SyntaxError: Unable to parse JSON string".
> The code i was using for success callback looks like this:
> var win = function(r) {
>    var result = $.parseJSON(r);
>    // stuff being done with parsed result object
> }
> Digging up on the error, i found that, somewhy, the argument string returned by FileTransfer native part to this callback is escaped, and as such can't be parsed to JSON. This is inconsistent with FileTransfer's behaviour on android as well as with the other plugins and normal handling of ajax calls, so i'm filing this as bug.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira