omniauth-salesforce icon indicating copy to clipboard operation
omniauth-salesforce copied to clipboard

Fix for can't convert Bignum into String

Open mintotsai opened this issue 11 years ago • 6 comments

Honestly, I don't know what recently changed to start causing this error. Everything had been working fine for months. The fix is fairly simple.

mintotsai avatar Nov 13 '13 21:11 mintotsai

Do you have any info on when you started seeing the error? And what exactly triggers it?

realdoug avatar Nov 14 '13 20:11 realdoug

The problem showed up recently, around the time of Winter '14. I'm not saying it was caused by Winter '14.

The error happens during the callback phase.

(salesforce) Setup endpoint detected, running now. (salesforce) Callback phase initiated.

Started GET "/auth/salesforce/callback?display=page&code=aPrxMZkm7lCkgfTZyJ_qQPagdE8vHY68VzLz4b9OevWjWoeqw2W6fp4cXPHq3kML6pPZd1GGRw%3D%3D&state=2aff7682bf09b7431752ece34084ef18b194a8648b12e58d" for 99.127.50.179 at 2013-11-14 14:36:52 -0600

TypeError (can't convert Bignum into String): omniauth-salesforce (1.0.4) lib/omniauth/strategies/salesforce.rb:37:in digest' omniauth-salesforce (1.0.4) lib/omniauth/strategies/salesforce.rb:37:inauth_hash' omniauth (1.1.4) lib/omniauth/strategy.rb:362:in `callback_phase'

mintotsai avatar Nov 14 '13 20:11 mintotsai

@mintotsai Is this a rails or sinatra app? if so what version? I'm not seeing this error in my Rails 3 example app.

One thing to make sure you've tried is to test the app in a cookie free envorionment, ie Google Chrome incognito because it's always possible that you have some bad data cached into your browser.

realdoug avatar Nov 16 '13 20:11 realdoug

This is a rails app. I get the same error when running from incognito mode.

From my Gemfile: ruby "1.9.3" gem 'rails', '3.2.12'

mintotsai avatar Nov 16 '13 20:11 mintotsai

Are you able to reproduce this in a fresh rails app? I'm unable to do so with Rails 3.13 and ruby 1.9.3. If you can reproduce it and publish to github, I'll take a look.

realdoug avatar Nov 17 '13 05:11 realdoug

I am having the same issue with Ruby 1.9.3 and Rails 3.2.12. At this point I am having to use @mintotsai 's fork.

TyrelDenison avatar Apr 02 '14 16:04 TyrelDenison