SSO login suddenly broke

sso

(Himanshu Chhangani) #1

When I try to login into my discourse setup using SSO, i get the following error : -
Error updating information, contact site admin discourse

This is what I am getting in error logs,

Job exception: undefined method `length' for nil:NilClass

What could have possibly caused this ?
am on v1.3.0.beta6 +223


(Daniel Hollands) #2

Which provider did you use?

One of my users reported issues with GitHub earlier today (which I was able to replicate) but within minutes it appears to have fixed itself.


(Himanshu Chhangani) #3

@limeblast
I’ve setup discourse on my local machine, using ubuntu 14.04.

SSO integration is done with one other site.

It was working fine for 2 months, this issue has come up very recently, i got to know about it today.


(Jeff Atwood) #4

Can you provide a deeper stack trace from the logs?


(Himanshu Chhangani) #5

Here is the stack trace.

/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/treetop-1.4.15/lib/treetop/runtime/compiled_parser.rb:64:in `prepare_to_parse'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/treetop-1.4.15/lib/treetop/runtime/compiled_parser.rb:16:in `parse'
/var/www/discourse/lib/email.rb:12:in `is_valid?'
/var/www/discourse/lib/email.rb:20:in `downcase'
/var/www/discourse/app/models/user.rb:182:in `find_by_email'
/var/www/discourse/app/models/discourse_single_sign_on.rb:84:in `match_email_or_create_user'
/var/www/discourse/app/models/discourse_single_sign_on.rb:51:in `lookup_or_create_user'
/var/www/discourse/app/controllers/session_controller.rb:71:in `sso_login'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/abstract_controller/base.rb:189:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/rendering.rb:10:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:113:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:113:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:552:in `block (2 levels) in compile'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:502:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:502:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/callbacks.rb:86:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/abstract_controller/callbacks.rb:19:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/rescue.rb:29:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/notifications.rb:159:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.10/lib/active_support/notifications.rb:159:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.10/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.10/lib/abstract_controller/base.rb:136:in `process'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionview-4.1.10/lib/action_view/rendering.rb:30:in `process

'
@codinghorror :- I hope this helps.


(Himanshu Chhangani) #7

@codinghorror : - this should definitely help


(Kane York) #8

Looks like the SSO parser is getting a nil email?


(Uwe Keim) #9

Today github was down for several minutes. Maybe this is a cause?


(Himanshu Chhangani) #10

Thanx a ton @riking .


(Sam Saffron) #11

Improved internal handling for this condition.


(Sam Saffron) #12