silkimen / cordova-plugin-advanced-http

Cordova / Phonegap plugin for communicating with HTTP servers. Allows for SSL pinning!
MIT License
391 stars 313 forks source link

[Bug] [All] Response is never obtained #493

Open ItsasoAguirre opened 1 year ago

ItsasoAguirre commented 1 year ago

Describe the bug I'm using the cordova-plugin-advanced-http and so far I haven't had any problems, but if the response has a large size, specifically 237.34 MB, the plugin doesn't even get the response in order to process it.

I have tried to upload the timout globally and the specific option of Sendrequest,

System info

Minimum viable code to reproduce If applicable, add formatted sample coding to help explain your problem.

e.g.:

const deferred = $q.defer();

httpHeadersService.setApiCallHeaders(callConfig.headers)
   .then(function () {
      window.cordova.plugin.http.setRequestTimeout(500.0);
      window.cordova.plugin.http.sendRequest(callConfig.url,callConfig,
            response => handleSuccess(response, callConfig, deferred),
            error => handleError(error, callConfig, deferred));
});

return deferred.promise;

Screenshots In postman with the same request I get a response of 237.34 MB image But with the plugin nothing ever arrives. Although if the size is smaller it works without problem. image

silkimen commented 11 months ago

Did you try to debug the native code to get more details? Or maybe you can find some information in the logs of the server? And would you please provide a minimal version of your code without additional services like httpHeadersService? Is your backend publicly available? Usually, the size shouldn't be a problem here as I was using the plugin also for requests which were returning huge responses.