Is there a problem with the Ruby 'databasedotcom' gem against the Summer 2012 release?

79 views
Skip to first unread message

oldfartdeveloper

unread,
Jun 13, 2012, 2:41:55 PM6/13/12
to activesa...@googlegroups.com
I've been using databasedotcom to configure static data on my test sandboxes, and it's been working fine until recently.

What I've discovered is that if I refresh a sandbox now, the refreshed sandbox will reject databasedotcom with an "invalid client id" error.

But the gem and program continue to work fine against sandboxes refreshed before Summer 2012.

Anyone else notice this?

Here's a separate ruby class that verifies the problem isn't the databasedotcom gem:

require 'httparty'

class Salesforce

  include HTTParty
  base_uri 'https://test.salesforce.com'

  def post
    options = { :query => {:grant_type => 'password', :client_id => '<your client ID>',
                           :client_secret => '<your secret>', :username => "<your user name>",
    :password => '<your password><your security token>'}}
    response = self.class.post('//services/oauth2/token', options)
    puts response.inspect
  end
end

Salesforce.new.post
Thanks in advance,

Scott

Raymond Gao

unread,
Jun 13, 2012, 4:56:38 PM6/13/12
to activesa...@googlegroups.com
Scott,

Put a breakpoint, and see if the refresh token has changed due to the refresh?

-Ray


--
You received this message because you are subscribed to the Google Groups "ActiveSalesforce" group.
To view this discussion on the web visit https://groups.google.com/d/msg/activesalesforce/-/z-TwHAeTyNoJ.
To post to this group, send email to activesa...@googlegroups.com.
To unsubscribe from this group, send email to activesalesfor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/activesalesforce?hl=en.

Scott Smith

unread,
Jun 13, 2012, 8:05:17 PM6/13/12
to activesa...@googlegroups.com
On Wed, Jun 13, 2012 at 1:56 PM, Raymond Gao <rayg...@gmail.com> wrote:
Scott,

Put a breakpoint, and see if the refresh token has changed due to the refresh?

-Ray

Hi Ray,

Thanks for your suggestion.

Unfortunately, I don't get to that point in that my initial :grant_type => 'password' access fails before I have a chance to see the refresh token.

Or perhaps I didn't explain what I meant clearly by "refresh the sandbox".  By this, I mean deleting and recreating the sandbox from production.  In this case, I doubt the refresh token would stay the same before refreshing and after.

But, if I understand this feature correctly, if I ask to authenticate using :grant_type => 'password' access, then the refresh token shouldn't be used for validation.

Or do I not understand OAuth2 correctly here?

Scott



--
Scott Smith

http://twitter.com/_ofd (OldFartDeveloper)

Raymond Gao

unread,
Jun 14, 2012, 3:51:42 AM6/14/12
to activesa...@googlegroups.com
consumer key and secret is probably also different. 

oldfartdeveloper

unread,
Jun 19, 2012, 12:17:46 PM6/19/12
to activesa...@googlegroups.com
Hi Ray,

The problem turned out to be a configuration issue combined with a propensity for Salesforce to lock the sandbox frequently without immediately revealing that it had.  It took me quite a few tries to figure out what was going on.

I could not find a problem w/ the databasedotcom gem; it's fine.

(sigh)

Thanks for your ideas.

Scott
To post to this group, send email to activesalesforce@googlegroups.com.
To unsubscribe from this group, send email to activesalesforce+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/activesalesforce?hl=en.

--
You received this message because you are subscribed to the Google Groups "ActiveSalesforce" group.
To post to this group, send email to activesalesforce@googlegroups.com.
To unsubscribe from this group, send email to activesalesforce+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/activesalesforce?hl=en.



--
Scott Smith

http://twitter.com/_ofd (OldFartDeveloper)

--
You received this message because you are subscribed to the Google Groups "ActiveSalesforce" group.
To post to this group, send email to activesalesforce@googlegroups.com.
To unsubscribe from this group, send email to activesalesforce+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages