OmniauthCallbacksController#google_oauth2: Error 500 logging in when user is unconfirmed
Sentry error: https://sentry.gitlab.net/gitlab/staginggitlabcom/issues/1721618/
NoMethodError: undefined method `captcha_enabled?' for #<#<Class:0x00007f0589f9de50>:0x00007f0589f96150>
from grape-path-helpers/named_route_matcher.rb:7:in `method_missing'
from /opt/gitlab/embedded/service/gitlab-rails/app/views/devise/sessions/_new_base.html.haml:19:in `block in _app_views_devise_sessions__new_base_html_haml___652680614806857841_69831155075940'
from action_view/helpers/capture_helper.rb:45:in `block in capture'
from action_view/helpers/capture_helper.rb:209:in `with_output_buffer'
from action_view/helpers/capture_helper.rb:45:in `capture'
from action_view/helpers/form_helper.rb:452:in `form_for'
from /opt/gitlab/embedded/service/gitlab-rails/app/views/devise/sessions/_new_base.html.haml:1:in `_app_views_devise_sessions__new_base_html_haml___652680614806857841_69831155075940'
from action_view/base.rb:274:in `_run'
from action_view/template.rb:185:in `block in render'
from active_support/notifications.rb:182:in `instrument'
from action_view/template.rb:385:in `instrument_render_template'
from action_view/template.rb:183:in `render'
from action_view/renderer/partial_renderer.rb:357:in `block in render_partial'
from action_view/renderer/abstract_renderer.rb:88:in `block in instrument'
from active_support/notifications.rb:182:in `instrument'
from action_view/renderer/abstract_renderer.rb:87:in `instrument'
from action_view/renderer/partial_renderer.rb:346:in `render_partial'
from action_view/renderer/partial_renderer.rb:317:in `render'
from action_view/renderer/renderer.rb:65:in `render_partial_to_object'
from action_view/renderer/renderer.rb:53:in `render_partial'
from action_view/helpers/rendering_helper.rb:38:in `render'
from /opt/gitlab/embedded/service/gitlab-rails/app/views/devise/shared/_signin_box.html.haml:24:in `_app_views_devise_shared__signin_box_html_haml__3799720912565460890_69831142807680'
from action_view/base.rb:274:in `_run'
from action_view/template.rb:185:in `block in render'
from active_support/notifications.rb:182:in `instrument'
from action_view/template.rb:385:in `instrument_render_template'
from action_view/template.rb:183:in `render'
from action_view/renderer/partial_renderer.rb:357:in `block in render_partial'
from action_view/renderer/abstract_renderer.rb:88:in `block in instrument'
from active_support/notifications.rb:182:in `instrument'
from action_view/renderer/abstract_renderer.rb:87:in `instrument'
from action_view/renderer/partial_renderer.rb:346:in `render_partial'
from action_view/renderer/partial_renderer.rb:317:in `render'
from action_view/renderer/renderer.rb:65:in `render_partial_to_object'
from action_view/renderer/renderer.rb:53:in `render_partial'
from action_view/helpers/rendering_helper.rb:38:in `render'
from /opt/gitlab/embedded/service/gitlab-rails/app/views/devise/sessions/new.html.haml:11:in `_app_views_devise_sessions_new_html_haml___2276276476714533280_69831147705660'
from action_view/base.rb:274:in `_run'
from action_view/template.rb:185:in `block in render'
from active_support/notifications.rb:182:in `instrument'
from action_view/template.rb:385:in `instrument_render_template'
from action_view/template.rb:183:in `render'
from action_view/renderer/template_renderer.rb:58:in `block (2 levels) in render_template'
from action_view/renderer/abstract_renderer.rb:88:in `block in instrument'
from active_support/notifications.rb:180:in `block in instrument'
from active_support/notifications/instrumenter.rb:24:in `instrument'
from active_support/notifications.rb:180:in `instrument'
from action_view/renderer/abstract_renderer.rb:87:in `instrument'
from action_view/renderer/template_renderer.rb:57:in `block in render_template'
from action_view/renderer/template_renderer.rb:65:in `render_with_layout'
from action_view/renderer/template_renderer.rb:56:in `render_template'
from action_view/renderer/template_renderer.rb:13:in `render'
from action_view/renderer/renderer.rb:61:in `render_template_to_object'
from action_view/renderer/renderer.rb:29:in `render_to_object'
from action_view/rendering.rb:117:in `block in _render_template'
from action_view/base.rb:304:in `in_rendering_context'
from action_view/rendering.rb:116:in `_render_template'
from action_controller/metal/streaming.rb:218:in `_render_template'
from action_view/rendering.rb:103:in `render_to_body'
from action_controller/metal/rendering.rb:52:in `render_to_body'
from action_controller/metal/renderers.rb:142:in `render_to_body'
from abstract_controller/rendering.rb:25:in `render'
from action_controller/metal/rendering.rb:36:in `render'
from action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
from active_support/core_ext/benchmark.rb:14:in `block in ms'
from benchmark.rb:308:in `realtime'
from active_support/core_ext/benchmark.rb:14:in `ms'
from action_controller/metal/instrumentation.rb:44:in `block in render'
from action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
from active_record/railties/controller_runtime.rb:34:in `cleanup_view_runtime'
from elasticsearch/rails/instrumentation/controller_runtime.rb:20:in `cleanup_view_runtime'
from action_controller/metal/instrumentation.rb:43:in `render'
from application_controller.rb:134:in `render'
from authenticates_with_two_factor.rb:38:in `locked_user_redirect'
from authenticates_with_two_factor.rb:32:in `handle_locked_user'
from authenticates_with_two_factor.rb:22:in `prompt_for_two_factor'
from omniauth_callbacks_controller.rb:166:in `sign_in_user_flow'
from omniauth_callbacks_controller.rb:126:in `omniauth_flow'
from omniauth_callbacks_controller.rb:16:in `handle_omniauth'
from action_controller/metal/basic_implicit_render.rb:6:in `send_action'
from abstract_controller/base.rb:195:in `process_action'
from action_controller/metal/rendering.rb:30:in `process_action'
from abstract_controller/callbacks.rb:42:in `block in process_action'
from active_support/callbacks.rb:112:in `block in run_callbacks'
from gitlab/ip_address_state.rb:10:in `with'
from ee/application_controller.rb:44:in `set_current_ip_address'
from active_support/callbacks.rb:121:in `block in run_callbacks'
from application_controller.rb:491:in `set_current_admin'
from active_support/callbacks.rb:121:in `block in run_callbacks'
from gitlab/session.rb:11:in `with_session'
from application_controller.rb:482:in `set_session_storage'
from active_support/callbacks.rb:121:in `block in run_callbacks'
from gitlab/i18n.rb:55:in `with_locale'
from gitlab/i18n.rb:61:in `with_user_locale'
from application_controller.rb:476:in `set_locale'
from active_support/callbacks.rb:121:in `block in run_callbacks'
from gitlab/error_tracking.rb:50:in `with_context'
from application_controller.rb:541:in `sentry_context'
from active_support/callbacks.rb:121:in `block in run_callbacks'
from raven/integrations/rails/controller_transaction.rb:7:in `block in included'
from active_support/callbacks.rb:121:in `instance_exec'
from active_support/callbacks.rb:121:in `block in run_callbacks'
from marginalia.rb:111:in `record_query_comment'
from active_support/callbacks.rb:121:in `block in run_callbacks'
from application_controller.rb:469:in `block in set_current_context'
from gitlab/application_context.rb:52:in `block in use'
from labkit/context.rb:32:in `with_context'
from gitlab/application_context.rb:52:in `use'
from gitlab/application_context.rb:20:in `with_context'
from application_controller.rb:462:in `set_current_context'
from active_support/callbacks.rb:121:in `block in run_callbacks'
from active_support/callbacks.rb:139:in `run_callbacks'
from abstract_controller/callbacks.rb:41:in `process_action'
from action_controller/metal/rescue.rb:22:in `process_action'
from action_controller/metal/instrumentation.rb:33:in `block in process_action'
from active_support/notifications.rb:180:in `block in instrument'
from active_support/notifications/instrumenter.rb:24:in `instrument'
from active_support/notifications.rb:180:in `instrument'
from action_controller/metal/instrumentation.rb:32:in `process_action'
from action_controller/metal/params_wrapper.rb:245:in `process_action'
from active_record/railties/controller_runtime.rb:27:in `process_action'
from abstract_controller/base.rb:136:in `process'
from action_view/rendering.rb:39:in `process'
from action_controller/metal.rb:190:in `dispatch'
from action_controller/metal.rb:254:in `dispatch'
from action_dispatch/routing/route_set.rb:50:in `dispatch'
from action_dispatch/routing/route_set.rb:33:in `serve'
from action_dispatch/routing/mapper.rb:18:in `block in <class:Constraints>'
from action_dispatch/routing/mapper.rb:48:in `serve'
from action_dispatch/journey/router.rb:49:in `block in serve'
from action_dispatch/journey/router.rb:32:in `each'
from action_dispatch/journey/router.rb:32:in `serve'
from action_dispatch/routing/route_set.rb:834:in `call'
from omniauth/strategy.rb:192:in `call!'
from omniauth/strategy.rb:169:in `call'
from omniauth/strategy.rb:420:in `call_app!'
from omni_auth/strategies/group_saml.rb:41:in `other_phase'
from omniauth/strategy.rb:190:in `call!'
from omniauth/strategy.rb:169:in `call'
from omniauth/strategy.rb:192:in `call!'
from omniauth/strategy.rb:169:in `call'
from omniauth/strategy.rb:192:in `call!'
from omniauth/strategy.rb:169:in `call'
from omniauth/strategy.rb:192:in `call!'
from omniauth/strategy.rb:169:in `call'
from omniauth/strategy.rb:420:in `call_app!'
from omniauth/strategy.rb:373:in `callback_phase'
from omniauth/strategies/oauth2.rb:75:in `callback_phase'
from /opt/gitlab/embedded/service/gitlab-rails/config/initializers_before_autoloader/100_patch_omniauth_oauth2.rb:11:in `callback_phase'
Edited by Stan Hu