RForcecom icon indicating copy to clipboard operation
RForcecom copied to clipboard

Intermittant error with connecting to server

Open seharnoorshah opened this issue 8 years ago • 1 comments

I have been using RForcecom for a couple months now and I love it. I log in everyday and download some information-- its seamless. However, every other day, I seem to get an issue with creating my connection, and then the error goes away by itself. This is the error I get:

session <- rforcecom.login(sfn, sfp, instanceURL, apiVersion) Error in curl::curl_fetch_memory(url, handle = handle) : Couldn't connect to server

I know the login/website information I'm putting in is correct because it does log in most of the time. The packages are all up to date (including RCurl) and I am running this without any other packages (just in case). Has anyone else experienced this?

seharnoorshah avatar Dec 30 '16 14:12 seharnoorshah

@seharnoorshah I've sometimes got funny things like this and I assume it's something with the HTTP messaging between your computer and the salesforce server. You can do 2 things:

  1. Wrap your function or code inside try block and have it re-run if it errors. Sometimes the intermittent nature of the call means it will not work one minute, then it will when you retry.

  2. You can mess around with the http package options and see if it helps. For example,

set_config( config( ssl_verifypeer = 0L ) )

You can explore all possible options using httr_options()

I hope that helps and feel free to report back anything you find. Anything helps!

StevenMMortimer avatar Jun 08 '17 00:06 StevenMMortimer