Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-12400

[iOS] file transfer lose connection after several download on iOS 10

    XMLWordPrintableJSON

Details

    Description

      Symptom:
      =========

      On downloading files from Amazon S3, after several download (not, always the same number or time) the plugin return errors when downloading existing files. the plugin return error code 3, with void http_status and body and the native code return: "network connection was lost". Once this error happens once, it always happens then on every file transfer download (I didn't try with the upload, but i suspect the issue is the same) until we quit the app and reopen it. We check the network connection, it was fine on every failed attempt, we were even able to call an API before and after the download with $http and it worked just fine.

      So after digging into this issue and not finding any clue, we thought it might be something directly on the http or tcp protocol. So we setup an https proxy (with burp suite), to see the connection and what was happening. It appears that the issue never appears when using the https proxy. So we switch back to normal wifi connection, and then the error happened again. At this point we change back the connection to the proxy and we were able to download our files without restarting the app.

      Conclusion
      ========
      It's seems that something on HTTPS is not working correctly (ciphers, TLS, version, keep alive ?) . We reimplement those downloads with cordova-plugin-background-download (https://github.com/dualinventive/cordova-plugin-background-download) and we have no issue with this one. The problem might come for the deprecated NSURLConnection that does not support something new on the https protocol that is supported by NSURLSession.

      As my mother tongue is not english, I hope everything is understandable, if it's not i can try to explain it better

      Attachments

        Activity

          People

            Unassigned Unassigned
            ndubuis NĂ©ville Dubuis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: