rforce icon indicating copy to clipboard operation
rforce copied to clipboard

rforce: Destination URL not reset error

Open karthickbabuos opened this issue 12 years ago • 6 comments

I used rforce gem to connect with salesforce. When i am trying to call 'login_with_oauth' method i am getting the following error

RuntimeError: Unexpected error: {:Fault=>{:faultcode=>"UNKNOWN_EXCEPTION", :faultstring=>"UNKNOWN_EXCEPTION: Destination URL not reset. The URL returned from login must be set in the SforceService", :detail=>{:UnexpectedErrorFault=>{:exceptionCode=>"UNKNOWN_EXCEPTION", :exceptionMessage=>"Destination URL not reset. The URL returned from login must be set in the SforceService"}}}}

karthickbabuos avatar Jun 04 '14 12:06 karthickbabuos

Hello. I'm sorry to hear of the trouble. Could you post a snippet of source code (with passwords/tokens removed) that recreates the problem?

undees avatar Jun 04 '14 18:06 undees

Hello,

I am using the same snippet which you gave in doc. Below is the snippet

oauth_keys = { :consumer_key => ['consumer_key'], :consumer_secret => ['consumer_secret'], :access_token => ['access_token'], :access_secret => ['access_secret'], :login_url => 'https://login.salesforce.com/services/OAuth/u/20.0' }

binding = RForce::Binding.new('https://www.salesforce.com/services/Soap/u/20.0',nil,oauth_keys) binding.login_with_oauth

When i am calling login_with_oauth i got the above error.

karthickbabuos avatar Jun 05 '14 06:06 karthickbabuos

Do you try to add your security token to your password ?

hulous avatar Jun 05 '14 10:06 hulous

Hello fbenariac! ya i already tried those methods. Included..

karthickbabuos avatar Jun 05 '14 12:06 karthickbabuos

Hi, folks. Thanks for reporting this. The issue was that the OAuth workflow was creating an extra connection to the server. Sorry about that! It should be working in the latest code now.

undees avatar Jul 27 '14 22:07 undees

Thanks undess,

It is working fine.

karthickbabuos avatar Sep 02 '14 07:09 karthickbabuos