2 Replies Latest reply on Jun 10, 2014 1:47 AM by Andreas Marchart

    Problem uploading file with https over 3G on android tablet

    Andreas Marchart

      Hi,

       

      we have developed a RhoMobile application, which is used on a CASIO VT-500 Android Enterprise Tablet. In the application it is possible to capture a signature, which is saved as a .png file and uploaded to a server. In generall, this is working fine, but there is one combination, the file upload is not working.

       

      The problem occurs only in the combination of the CASIO VT-500 Enterprise tablet and a HTTPS connection over a SIM-card (3G).

      We are using the uploadFile method from Rho:

       

      var images = [];

      images[0] = new Object();

      images[0]['filename'] = Rho.RhoFile.join(Rho.Application.databaseBlogFolder, "image.png");

      images[0]['filename_base'] = '';

      images[0]['name'] = 'userfile';

      images[0]['content_type'] = 'application/octet-stream';

      url = conf.server;

      obj = { "url" : url, "multipart" : images, "headers" : {"Content-Type" : "multipart/form-data", "Authorization" : "Basic "+$.base64.encode(Session.GetUser()+":"+Session.GetPW())}};

       

      r = Rho.Network.uploadFile(obj);

       

      This is working fine with HTTP, and it is also working fine with HTTPS over a WIFI connection. But with the combination CASIO VT-500 Enterprise Tablet and a HTTPS connection over a sim-card we have the following situation:

       

      The POST request is received on the server (IIS):

           Request started: POST https://....

      But then, nothing happens, neither on the android tablet, nor on the server side.

      Then there are two possibilities:

      1) Android tablet runs into a timeout: Then I got a connection error on the tablet and some seconds later the server is processing the request and sends back HTTP Status 200, but then the android tablet cannot receive it any more.

      2) Server runs into a timeout: Then the server sends back HTTP Status 400.

       

      The strange thing is, that this happens only in the mentioned combination. If I put the sim card in onother device and make a WIFI hotspot and connect to this WIFI hotspot the transfer is successful. I have tested it also on another device (Samsung Galaxy SII) and there it is also working fine. Our other webservice calls are made with ajax and there GET/POST is also working fine, it happens only when we try to upload the file (the file has about 10kb).

      Is there a difference between an enterprice device and a normal device? Or is there a difference from the rhomobile application, if I use a WIFI or a 3G connection?

       

      I discovered the following in our log-file, but I am not sure, if this is related to the problem:

      If the transfer is working, I have only the following log-entry:

           Net| POST request (Push): https://....

      If the transfer is not working, I have two log-entries, and it seems that the second one is created after the timeout of the tablet:

           Net| POST requst (Push): https://...

           CURLNetRequest: METHOD = [POST] URL = [https://...] BODY = []


      Has somebody an idea, what the problem could be? Or where I should continue searching for the problem, because at the moment I am clueless who causes this problem....

       

      Thank you in advance!

       

      Best Regards,

      Andreas