You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Jason Chase (JIRA)" <ji...@apache.org> on 2015/01/13 22:28:34 UTC

[jira] [Commented] (CB-8304) File transfer plugin - upload to invalid server can cause app to crash on iOS

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

Jason Chase commented on CB-8304:
---------------------------------

The crashing test seems to have been introduced in the refactoring of the tests in CB-8125 (commit fc8f4f0001b8f4620d58c8633b0b44cd8c4f7945).  However, this appears to be a latent bug, introduced in the past.  That is, there is logic to clean up target files for failed connections, which implicitly assumes the target contains a path.

> File transfer plugin - upload to invalid server can cause app to crash on iOS
> -----------------------------------------------------------------------------
>
>                 Key: CB-8304
>                 URL: https://issues.apache.org/jira/browse/CB-8304
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS, mobile-spec, Plugin File Transfer
>    Affects Versions: Master
>            Reporter: Jason Chase
>            Assignee: Jason Chase
>              Labels: file-transfer, ios, plugin
>
> This was discovered when investigating that the file transfer plugin automatic tests would consistently cause mobile spec to crash on iOS.  The specific offending test is "filetransfer.spec.25 should handle unknown host".
> Investigation reveals that when an invalid host is specified as the upload target, on iOS, the upload will fail in the background.  Part of the plugin's native iOS error handling is to delete the "target" file.  When the upload target does not include a path (e.g. the test uses "http://foobar.apache.org"), an error will occur trying to delete a nil path.



--
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