oracle / cordova-plugin-wkwebview-file-xhr

Cordova Plugin for WebView File XHR
Universal Permissive License v1.0
138 stars 120 forks source link

Timeout is not being respected in xhr-pollyfill.js file #83

Closed ravikumarevry closed 3 years ago

ravikumarevry commented 3 years ago

Hi I am trying to set a timeout for my api call which take quite longer to return results as below, $.ajax({ url:url, type: "post", timeout: 12000, data:data, Success" .. }

but it is not being retained or coming as undefined inside xhr-pollyfill.js file and timeout is not being set for the ajax api call.

please if anyone has solution let me know, thanks in advance.

manish2788 commented 3 years ago

@ravikumarevry Do you have a sample app to showcase this issue?

ravikumarevry commented 3 years ago

@manish27 No, Its happenning in my main application, I do not have a sample

bjanaszek commented 3 years ago

@ravikumarevry I am seeing similar behavior on iOS 14.5+ devices. After debugging, I've found that the plugin itself is handling the timeout correctly (and, if I'm reading the docs correctly, the underlying iOS networking API has a default timeout of 30 seconds, which is not overridden by the plugin), but the timeout event never seems to bubble up beyond the polyfilled XmlHttpRequest functions (the last bit of code that I can debug before a very long timeout interval is the window.nativeXHRResponse polyfilled function that is attached to the window object).

manish2788 commented 3 years ago

@manish27 No, Its happenning in my main application, I do not have a sample

@ravikumarevry Can you create a sample cordova ios app to showcase this issue and share it with us. Please mention version details of the platform too.

Reference for creating cordova ios app : https://cordova.apache.org/docs/en/latest/guide/cli/index.html

manish2788 commented 3 years ago

Closing the issue due to lack of response.