Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ItsasoAguirre opened this issue Jan 27, 2023 · 1 comment
Open

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

ItsasoAguirre opened this issue Jan 27, 2023 · 1 comment

Comments

@ItsasoAguirre
Copy link

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

  • affected HTTP plugin version: [e.g. 3.3.1]
  • affected platform(s) and version(s): [e.g. iOS 12.2]
  • affected device(s): [e.g. iPhone 8]
  • cordova version: [e.g. 6.5.0]
  • cordova platform version(s): [e.g. android 7.0.0, browser 5.0.3]

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants