Overview:
A user receives the following error when syncing from CRM Offline:
Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost."
Root Cause:
This error occurs when CRM for iPad loses the connection to the network due to external reasons.
Possible causes for this error include:
- Unstable or weak WiFi signal
- Limited short connection session in areas with public WiFi
- Short inactivity time-out setting on local/home WiFi router
This setting is often labeled "Idle Connection Timeout" and, by default, is set to around 5 minutes.
When the inactivity timeout is hit, the router will deactivate WiFi communications.
iPad sync processes can sometimes have "silent" waiting periods before server response lasting several minutes, depending on the volume of customer data being synced. It is recommended to set inactivity timeouts on WiFi for longer times.
The error can occur when a large volume of customer data is being transferred to the CRM offline app and servers were busy, resulting in a delay in response mid-sync. If the Offline device has already lost connection by the time the CRM server is ready to return a response, this error can result.
Errors of this kind impact CRM for iPad Sync because the Sync connection is acknowledged as lost, requiring it to be repeated later. As result, customer sync requests may appear to become stuck on an offline device.
Solution:
If a sync error of this type is caused by a user uploading a large amount of local data to the CRM server, it is advised that the customer increase the connection timeout or find a stronger, more stable WiFi connection. Then, once the local data is successfully synced up, the issue should be resolved.
If the issue is caused by a large amount of customer data being synced down from CRM servers, customer Admins should review the user's VMOC settings and the amount of data the user has access to, to limit the amount of data and number of records being synced. If a user has access to an inordinately large amount of data, this can create large SOQL queries which take a long time on the server side to prepare data to sync.
Related Documentation:
CRM Help Documentation: Sync Overview
Knowledge Base: Error: Error Domain=NSURLErrorDomain Code=-1001 when Syncing CRM Offline