Search code examples
ruby-on-railsdeviserails-admin

Ruby on Rails Sign in Issues ( Used Rails admin Devise)


Recently we are planning to upgrade the Ruby on Rails app (Ruby 2.7.2 to 3. , Rails 5.2 to 7.)** . After upgrading the versions we tested in local it is working as we expecting, then we deployed the project to Heroku staging environment. When we try to login the application it throws an error like below. enter image description here

We are capturing the log , but couldn't under stand what it is saying.

2023-08-01T19:06:41.277239+00:00 heroku[router]: at=info method=GET path="/users/sign_in" host=rbtest-backendv5-staging-0c772eac5283.herokuapp.com request_id=4d638847-cfc9-4480-b8e6-beb943f55d72 fwd="49.206.41.146" dyno=web.1 connect=0ms service=8ms status=200 bytes=3113 protocol=https
2023-08-01T19:06:41.623330+00:00 heroku[router]: at=info method=GET path="/assets/application-91fe79ba016355ea4feedb4cd979dbdc1850af06c4d85e050fd713602dfef12b.css" host=rbtest-backendv5-staging-0c772eac5283.herokuapp.com request_id=af0de2be-214c-45f6-8f3c-ec85b6bcdaa0 fwd="49.206.41.146" dyno=web.1 connect=0ms service=2ms status=304 bytes=112 protocol=https
2023-08-01T19:06:41.638424+00:00 heroku[router]: at=info method=GET path="/assets/application-817edcc6fa758f17e2e286c67711f3aab5d5b28a0f12e819c3c6c27df9867310.js" host=rbtest-backendv5-staging-0c772eac5283.herokuapp.com request_id=7265b9d1-a53f-4503-88a1-2ec0264d9489 fwd="49.206.41.146" dyno=web.1 connect=0ms service=1ms status=304 bytes=112 protocol=https
2023-08-01T19:06:57.796948+00:00 app[web.1]: I, [2023-08-01T19:06:57.796888 #2]  INFO -- : [e8e8e771-1045-469a-8e4f-6343035c9fe0] Started POST "/users/sign_in" for 49.206.41.146 at 2023-08-01 19:06:57 +0000
2023-08-01T19:06:57.797808+00:00 app[web.1]: I, [2023-08-01T19:06:57.797768 #2]  INFO -- : [e8e8e771-1045-469a-8e4f-6343035c9fe0] Processing by Devise::SessionsController#create as HTML
2023-08-01T19:06:57.797845+00:00 app[web.1]: I, [2023-08-01T19:06:57.797825 #2]  INFO -- : [e8e8e771-1045-469a-8e4f-6343035c9fe0]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"DmqkcI42fLTL1M7Z/fNx3IvIa1RpxBOplMi6r1xpIK8j4Rq3/NduVBmXxYEN7NQXEe9Sy1cEBfAMr6QfFvAHQg==", "user"=>{"email"=>"[email protected]", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
2023-08-01T19:06:57.811504+00:00 app[web.1]: D, [2023-08-01T19:06:57.811430 #2] DEBUG -- : [e8e8e771-1045-469a-8e4f-6343035c9fe0]   User Load (3.7ms)  SELECT "users".* FROM "users" WHERE "users"."email" = $1 ORDER BY "users"."id" ASC LIMIT $2  [["email", "[email protected]"], ["LIMIT", 1]]
2023-08-01T19:06:57.926415+00:00 app[web.1]: I, [2023-08-01T19:06:57.926342 #2]  INFO -- : [e8e8e771-1045-469a-8e4f-6343035c9fe0] Completed 500 Internal Server Error in 128ms (ActiveRecord: 3.7ms | Allocations: 1047)
2023-08-01T19:06:57.927623+00:00 app[web.1]: F, [2023-08-01T19:06:57.927555 #2] FATAL -- : [e8e8e771-1045-469a-8e4f-6343035c9fe0]
2023-08-01T19:06:57.927624+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] ArgumentError (wrong number of arguments (given 1, expected 0)):
2023-08-01T19:06:57.927625+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0]
2023-08-01T19:06:57.927625+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] activerecord (6.1.7.4) lib/active_record/suppressor.rb:43:in `save'
2023-08-01T19:06:57.927625+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] scout_apm (2.6.10) lib/scout_apm/instruments/active_record.rb:421:in `save'
2023-08-01T19:06:57.927625+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] devise (4.9.2) lib/devise/models/trackable.rb:40:in `update_tracked_fields!'
2023-08-01T19:06:57.927626+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] devise (4.9.2) lib/devise/hooks/trackable.rb:9:in `block in <top (required)>'
2023-08-01T19:06:57.927626+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] warden (1.2.9) lib/warden/hooks.rb:15:in `block in _run_callbacks'
2023-08-01T19:06:57.927626+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] warden (1.2.9) lib/warden/hooks.rb:10:in `each'
2023-08-01T19:06:57.927626+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] warden (1.2.9) lib/warden/hooks.rb:10:in `_run_callbacks'
2023-08-01T19:06:57.927627+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] warden (1.2.9) lib/warden/manager.rb:52:in `_run_callbacks'
2023-08-01T19:06:57.927627+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] warden (1.2.9) lib/warden/proxy.rb:191:in `set_user'
2023-08-01T19:06:57.927627+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] warden (1.2.9) lib/warden/proxy.rb:339:in `_perform_authentication'
2023-08-01T19:06:57.927627+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] warden (1.2.9) lib/warden/proxy.rb:133:in `authenticate!'
2023-08-01T19:06:57.927627+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] devise (4.9.2) app/controllers/devise/sessions_controller.rb:19:in `create'
2023-08-01T19:06:57.927628+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
2023-08-01T19:06:57.927628+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/abstract_controller/base.rb:228:in `process_action'
2023-08-01T19:06:57.927628+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] scout_apm (2.6.10) lib/scout_apm/instruments/action_controller_rails_3_rails4.rb:100:in `process_action'
2023-08-01T19:06:57.927628+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_controller/metal/rendering.rb:30:in `process_action'
2023-08-01T19:06:57.927628+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
2023-08-01T19:06:57.927628+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] activesupport (6.1.7.4) lib/active_support/callbacks.rb:106:in `run_callbacks'
2023-08-01T19:06:57.927629+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/abstract_controller/callbacks.rb:41:in `process_action'
2023-08-01T19:06:57.927634+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_controller/metal/rescue.rb:22:in `process_action'
2023-08-01T19:06:57.927634+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
2023-08-01T19:06:57.927634+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] activesupport (6.1.7.4) lib/active_support/notifications.rb:203:in `block in instrument'
2023-08-01T19:06:57.927634+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] activesupport (6.1.7.4) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
2023-08-01T19:06:57.927635+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] activesupport (6.1.7.4) lib/active_support/notifications.rb:203:in `instrument'
2023-08-01T19:06:57.927635+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_controller/metal/instrumentation.rb:33:in `process_action'
2023-08-01T19:06:57.927635+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
2023-08-01T19:06:57.927635+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] activerecord (6.1.7.4) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
2023-08-01T19:06:57.927635+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] scout_apm (2.6.10) lib/scout_apm/instruments/action_controller_rails_3_rails4.rb:117:in `process_action'
2023-08-01T19:06:57.927635+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/abstract_controller/base.rb:165:in `process'
2023-08-01T19:06:57.927635+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionview (6.1.7.4) lib/action_view/rendering.rb:39:in `process'
2023-08-01T19:06:57.927635+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_controller/metal.rb:190:in `dispatch'
2023-08-01T19:06:57.927635+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_controller/metal.rb:254:in `dispatch'
2023-08-01T19:06:57.927638+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
2023-08-01T19:06:57.927638+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/routing/route_set.rb:33:in `serve'
2023-08-01T19:06:57.927639+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
2023-08-01T19:06:57.927639+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/routing/mapper.rb:49:in `serve'
2023-08-01T19:06:57.927639+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/journey/router.rb:50:in `block in serve'
2023-08-01T19:06:57.927639+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/journey/router.rb:32:in `each'
2023-08-01T19:06:57.927639+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/journey/router.rb:32:in `serve'
2023-08-01T19:06:57.927639+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/routing/route_set.rb:842:in `call'
2023-08-01T19:06:57.927639+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] scout_apm (2.6.10) lib/scout_apm/instruments/rails_router.rb:29:in `call_with_scout_instruments'
2023-08-01T19:06:57.927639+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] rack-pjax (1.1.0) lib/rack/pjax.rb:12:in `call'
2023-08-01T19:06:57.927640+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] scout_apm (2.6.10) lib/scout_apm/middleware.rb:17:in `call'
2023-08-01T19:06:57.927640+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] rack (2.2.8) lib/rack/session/abstract/id.rb:266:in `context'
2023-08-01T19:06:57.927640+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] rack (2.2.8) lib/rack/session/abstract/id.rb:260:in `call'
2023-08-01T19:06:57.927640+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] rack (2.2.8) lib/rack/method_override.rb:24:in `call'
2023-08-01T19:06:57.927640+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/middleware/cookies.rb:697:in `call'
2023-08-01T19:06:57.927640+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] remotipart (1.4.4) lib/remotipart/middleware.rb:32:in `call'
2023-08-01T19:06:57.927640+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] warden (1.2.9) lib/warden/manager.rb:36:in `block in call'
2023-08-01T19:06:57.927640+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] warden (1.2.9) lib/warden/manager.rb:34:in `catch'
2023-08-01T19:06:57.927641+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] warden (1.2.9) lib/warden/manager.rb:34:in `call'
2023-08-01T19:06:57.927641+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] rack (2.2.8) lib/rack/etag.rb:27:in `call'
2023-08-01T19:06:57.927641+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] rack (2.2.8) lib/rack/conditional_get.rb:40:in `call'
2023-08-01T19:06:57.927641+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] rack (2.2.8) lib/rack/head.rb:12:in `call'
2023-08-01T19:06:57.927641+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
2023-08-01T19:06:57.927641+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] activesupport (6.1.7.4) lib/active_support/callbacks.rb:98:in `run_callbacks'
2023-08-01T19:06:57.927641+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
2023-08-01T19:06:57.927641+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
2023-08-01T19:06:57.927642+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
2023-08-01T19:06:57.927642+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
2023-08-01T19:06:57.927642+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] railties (6.1.7.4) lib/rails/rack/logger.rb:37:in `call_app'
2023-08-01T19:06:57.927642+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] railties (6.1.7.4) lib/rails/rack/logger.rb:26:in `block in call'
2023-08-01T19:06:57.927642+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] activesupport (6.1.7.4) lib/active_support/tagged_logging.rb:99:in `block in tagged'
2023-08-01T19:06:57.927642+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] activesupport (6.1.7.4) lib/active_support/tagged_logging.rb:37:in `tagged'
2023-08-01T19:06:57.927642+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] activesupport (6.1.7.4) lib/active_support/tagged_logging.rb:99:in `tagged'
2023-08-01T19:06:57.927643+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] railties (6.1.7.4) lib/rails/rack/logger.rb:26:in `call'
2023-08-01T19:06:57.927643+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
2023-08-01T19:06:57.927643+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/middleware/request_id.rb:26:in `call'
2023-08-01T19:06:57.927643+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] rack (2.2.8) lib/rack/runtime.rb:22:in `call'
2023-08-01T19:06:57.927645+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] activesupport (6.1.7.4) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
2023-08-01T19:06:57.927646+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/middleware/executor.rb:14:in `call'
2023-08-01T19:06:57.927646+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/middleware/static.rb:24:in `call'
2023-08-01T19:06:57.927646+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] rack (2.2.8) lib/rack/sendfile.rb:110:in `call'
2023-08-01T19:06:57.927646+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/middleware/ssl.rb:77:in `call'
2023-08-01T19:06:57.927646+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] actionpack (6.1.7.4) lib/action_dispatch/middleware/host_authorization.rb:142:in `call'
2023-08-01T19:06:57.927646+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] rack-cors (1.1.1) lib/rack/cors.rb:100:in `call'
2023-08-01T19:06:57.927646+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] scout_apm (2.6.10) lib/scout_apm/instruments/middleware_summary.rb:58:in `call'
2023-08-01T19:06:57.927646+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] railties (6.1.7.4) lib/rails/engine.rb:539:in `call'
2023-08-01T19:06:57.927647+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] puma (3.12.6) lib/puma/configuration.rb:227:in `call'
2023-08-01T19:06:57.927647+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] puma (3.12.6) lib/puma/server.rb:706:in `handle_request'
2023-08-01T19:06:57.927647+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] puma (3.12.6) lib/puma/server.rb:476:in `process_client'
2023-08-01T19:06:57.927647+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] puma (3.12.6) lib/puma/server.rb:334:in `block in run'
2023-08-01T19:06:57.927647+00:00 app[web.1]: [e8e8e771-1045-469a-8e4f-6343035c9fe0] puma (3.12.6) lib/puma/thread_pool.rb:135:in `block in spawn_thread'
2023-08-01T19:06:57.930990+00:00 heroku[router]: at=info method=POST path="/users/sign_in" host=rbtest-backendv5-staging-0c772eac5283.herokuapp.com request_id=e8e8e771-1045-469a-8e4f-6343035c9fe0 fwd="49.206.41.146" dyno=web.1 connect=0ms service=133ms status=500 bytes=1891 protocol=https

Solution

  • Your version of scout is very old and not passing through the validate: false as kwargs. Update Scout gem.