forcedotcom / SalesforceMobileSDK-CordovaPlugin

Cordova plugin for the Salesforce Mobile SDK
Other
48 stars 114 forks source link

request time out error in synchronization time -SalesforceMobileSDK-CordovaPlugin Ionic App #637

Closed asif986 closed 2 months ago

asif986 commented 2 months ago

Hi We are using [SalesforceMobileSDK-CordovaPlugin] to develop hybrid ios app. We are making request through forcejs which uses network plugin .

sometime, when app sync is start we received Request Time out error in SalesforceMobileSDK-CordovaPlugin.

Can we increase the request time out in forcejs at the time of sync?

SalesforceMobileSDK-CordovaPlugin 6.2.0 cordova-ios - 6.0.0 Ionic - 4.0.0

wmathurin commented 2 months ago

You cannot doing from JavaScript but you should be able to change the timeout setting for the NSURLSession using the SFNetwork. You can even customize the creation of NSURLSessions if you were to implement the SFNetworkManaging protocol. However this change will apply for all requests.

asif986 commented 2 months ago

Thank you for your prompt response @wmathurin We are using SalesforceMobileSDK-CordovaPlugin 6.2.0, and the file you mention in (SFNetwork) does not exist.

NetworkSession

Cordova plugins image

wmathurin commented 2 months ago

MSDK 6.2.0 was released in June 2018 - almost 6 years ago. Have you considered upgrading the version of the Mobile SDK you app uses?

asif986 commented 2 months ago

@wmathurin Yes, We are aware the version we are using is quite old, but we have our ORG restrictions which is the reason we couldn't update the version.

It would be great if you could share any to add this SFNetwork file in SDK 6.2.0

I can see From version 7.1.0. The headers folder is no longer available in the folder structure.

As per I know, till version 6.2.0 we are adding the header files in headers folder under the iOS platform. So can we do the same for SFNetwork?

image

wmathurin commented 2 months ago

Unfortunately we do not patch old versions of the Mobile SDK (especially 5 year old versions). If you can change source files in your build why can't you upgrade the Mobile SDK?