undefined method `type_casted_binds`
Closed this issue · 5 comments
This exception always appears...
NoMethodError (undefined method `type_casted_binds' for Debugbar::ActiveRecordEventSubscriber:Class):
/Users/joelmoss/dev/debugbar/lib/debugbar/subscribers/active_record.rb:26:in `sql'
/Users/joelmoss/dev/debugbar/lib/debugbar/engine.rb:87:in `block (3 levels) in subscribe'
activesupport (7.1.3) lib/active_support/notifications/fanout.rb:181:in `block in finish'
activesupport (7.1.3) lib/active_support/notifications/fanout.rb:26:in `block in iterate_guarding_exceptions'
activesupport (7.1.3) lib/active_support/notifications/fanout.rb:25:in `each'
activesupport (7.1.3) lib/active_support/notifications/fanout.rb:25:in `iterate_guarding_exceptions'
activesupport (7.1.3) lib/active_support/notifications/fanout.rb:125:in `each'
activesupport (7.1.3) lib/active_support/notifications/fanout.rb:180:in `finish'
activesupport (7.1.3) lib/active_support/notifications/fanout.rb:262:in `block in finish_with_values'
activesupport (7.1.3) lib/active_support/notifications/fanout.rb:26:in `block in iterate_guarding_exceptions'
activesupport (7.1.3) lib/active_support/notifications/fanout.rb:25:in `each'
activesupport (7.1.3) lib/active_support/notifications/fanout.rb:25:in `iterate_guarding_exceptions'
activesupport (7.1.3) lib/active_support/notifications/fanout.rb:261:in `finish_with_values'
activesupport (7.1.3) lib/active_support/notifications/fanout.rb:254:in `finish'
activesupport (7.1.3) lib/active_support/notifications/instrumenter.rb:64:in `instrument'
activerecord (7.1.3) lib/active_record/connection_adapters/abstract_adapter.rb:1143:in `log'
activerecord (7.1.3) lib/active_record/connection_adapters/postgresql_adapter.rb:892:in `exec_no_cache'
activerecord (7.1.3) lib/active_record/connection_adapters/postgresql_adapter.rb:872:in `execute_and_clear'
activerecord (7.1.3) lib/active_record/connection_adapters/postgresql/database_statements.rb:64:in `internal_exec_query'
activerecord (7.1.3) lib/active_record/connection_adapters/abstract/database_statements.rb:630:in `select'
activerecord (7.1.3) lib/active_record/connection_adapters/abstract/database_statements.rb:71:in `select_all'
activerecord (7.1.3) lib/active_record/connection_adapters/abstract/query_cache.rb:112:in `block in select_all'
activerecord (7.1.3) lib/active_record/connection_adapters/abstract/query_cache.rb:152:in `block in cache_sql'
activesupport (7.1.3) lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
activerecord (7.1.3) lib/active_record/connection_adapters/abstract/query_cache.rb:147:in `cache_sql'
activerecord (7.1.3) lib/active_record/connection_adapters/abstract/query_cache.rb:112:in `select_all'
activerecord (7.1.3) lib/active_record/querying.rb:62:in `_query_by_sql'
activerecord (7.1.3) lib/active_record/relation.rb:998:in `block in exec_main_query'
activerecord (7.1.3) lib/active_record/relation.rb:1018:in `skip_query_cache_if_necessary'
activerecord (7.1.3) lib/active_record/relation.rb:984:in `exec_main_query'
activerecord (7.1.3) lib/active_record/relation.rb:962:in `block in exec_queries'
activerecord (7.1.3) lib/active_record/relation.rb:1018:in `skip_query_cache_if_necessary'
activerecord (7.1.3) lib/active_record/relation.rb:956:in `exec_queries'
goldiloader (5.2.0) lib/goldiloader/active_record_patches.rb:40:in `exec_queries'
activerecord (7.1.3) lib/active_record/relation.rb:742:in `load'
activerecord (7.1.3) lib/active_record/relation.rb:264:in `records'
activerecord (7.1.3) lib/active_record/relation/finder_methods.rb:572:in `find_take'
activerecord (7.1.3) lib/active_record/relation/finder_methods.rb:121:in `take'
activerecord (7.1.3) lib/active_record/relation/finder_methods.rb:520:in `find_one'
activerecord (7.1.3) lib/active_record/relation/finder_methods.rb:499:in `find_with_ids'
activerecord (7.1.3) lib/active_record/relation/finder_methods.rb:92:in `find'
/Users/joelmoss/dev/clients/harleytherapy/hue/app/controllers/concerns/admin/auth.rb:14:in `current_administrator'
/Users/joelmoss/dev/clients/harleytherapy/hue/app/controllers/concerns/admin/auth.rb:25:in `authenticate_administrator!'
activesupport (7.1.3) lib/active_support/callbacks.rb:403:in `block in make_lambda'
activesupport (7.1.3) lib/active_support/callbacks.rb:183:in `block (2 levels) in halting_and_conditional'
actionpack (7.1.3) lib/abstract_controller/callbacks.rb:34:in `block (2 levels) in <module:Callbacks>'
activesupport (7.1.3) lib/active_support/callbacks.rb:184:in `block in halting_and_conditional'
activesupport (7.1.3) lib/active_support/callbacks.rb:598:in `block in invoke_before'
activesupport (7.1.3) lib/active_support/callbacks.rb:598:in `each'
activesupport (7.1.3) lib/active_support/callbacks.rb:598:in `invoke_before'
activesupport (7.1.3) lib/active_support/callbacks.rb:119:in `block in run_callbacks'
activesupport (7.1.3) lib/active_support/callbacks.rb:141:in `run_callbacks'
actionpack (7.1.3) lib/abstract_controller/callbacks.rb:258:in `process_action'
actionpack (7.1.3) lib/action_controller/metal/rescue.rb:25:in `process_action'
actionpack (7.1.3) lib/action_controller/metal/instrumentation.rb:74:in `block in process_action'
activesupport (7.1.3) lib/active_support/notifications.rb:206:in `block in instrument'
activesupport (7.1.3) lib/active_support/notifications/instrumenter.rb:58:in `instrument'
activesupport (7.1.3) lib/active_support/notifications.rb:206:in `instrument'
actionpack (7.1.3) lib/action_controller/metal/instrumentation.rb:73:in `process_action'
actionpack (7.1.3) lib/action_controller/metal/params_wrapper.rb:261:in `process_action'
activerecord (7.1.3) lib/active_record/railties/controller_runtime.rb:32:in `process_action'
actionpack (7.1.3) lib/abstract_controller/base.rb:160:in `process'
actionview (7.1.3) lib/action_view/rendering.rb:40:in `process'
actionpack (7.1.3) lib/action_controller/metal.rb:227:in `dispatch'
actionpack (7.1.3) lib/action_controller/metal.rb:309:in `dispatch'
actionpack (7.1.3) lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
actionpack (7.1.3) lib/action_dispatch/routing/route_set.rb:32:in `serve'
actionpack (7.1.3) lib/action_dispatch/routing/mapper.rb:21:in `block in <class:Constraints>'
actionpack (7.1.3) lib/action_dispatch/routing/mapper.rb:51:in `serve'
actionpack (7.1.3) lib/action_dispatch/journey/router.rb:51:in `block in serve'
actionpack (7.1.3) lib/action_dispatch/journey/router.rb:131:in `block in find_routes'
actionpack (7.1.3) lib/action_dispatch/journey/router.rb:124:in `each'
actionpack (7.1.3) lib/action_dispatch/journey/router.rb:124:in `find_routes'
actionpack (7.1.3) lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack (7.1.3) lib/action_dispatch/routing/route_set.rb:882:in `call'
omniauth (2.1.2) lib/omniauth/strategy.rb:202:in `call!'
omniauth (2.1.2) lib/omniauth/strategy.rb:169:in `call'
omniauth (2.1.2) lib/omniauth/builder.rb:44:in `call'
prosopite (1.4.2) lib/prosopite/middleware/rack.rb:10:in `call'
rack (3.0.9) lib/rack/tempfile_reaper.rb:20:in `call'
rack (3.0.9) lib/rack/etag.rb:29:in `call'
rack (3.0.9) lib/rack/conditional_get.rb:31:in `call'
rack (3.0.9) lib/rack/head.rb:15:in `call'
actionpack (7.1.3) lib/action_dispatch/http/permissions_policy.rb:36:in `call'
actionpack (7.1.3) lib/action_dispatch/http/content_security_policy.rb:33:in `call'
rack-session (2.0.0) lib/rack/session/abstract/id.rb:272:in `context'
rack-session (2.0.0) lib/rack/session/abstract/id.rb:266:in `call'
actionpack (7.1.3) lib/action_dispatch/middleware/cookies.rb:689:in `call'
activerecord (7.1.3) lib/active_record/migration.rb:655:in `call'
actionpack (7.1.3) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (7.1.3) lib/active_support/callbacks.rb:101:in `run_callbacks'
actionpack (7.1.3) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
actionpack (7.1.3) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (7.1.3) lib/action_dispatch/middleware/actionable_exceptions.rb:16:in `call'
sentry-rails (5.16.1) lib/sentry/rails/rescued_exception_interceptor.rb:9:in `call'
actionpack (7.1.3) lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
web-console (4.2.1) lib/web_console/middleware.rb:132:in `call_app'
web-console (4.2.1) lib/web_console/middleware.rb:28:in `block in call'
web-console (4.2.1) lib/web_console/middleware.rb:17:in `catch'
web-console (4.2.1) lib/web_console/middleware.rb:17:in `call'
sentry-ruby (5.16.1) lib/sentry/rack/capture_exceptions.rb:13:in `call'
actionpack (7.1.3) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (7.1.3) lib/rails/rack/logger.rb:37:in `call_app'
railties (7.1.3) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (7.1.3) lib/active_support/tagged_logging.rb:135:in `block in tagged'
activesupport (7.1.3) lib/active_support/tagged_logging.rb:39:in `tagged'
activesupport (7.1.3) lib/active_support/tagged_logging.rb:135:in `tagged'
activesupport (7.1.3) lib/active_support/broadcast_logger.rb:240:in `method_missing'
railties (7.1.3) lib/rails/rack/logger.rb:24:in `call'
actionpack (7.1.3) lib/action_dispatch/middleware/remote_ip.rb:92:in `call'
request_store (1.6.0) lib/request_store/middleware.rb:19:in `call'
/Users/joelmoss/dev/debugbar/lib/debugbar/middlewares/track_current_request.rb:14:in `call'
actionpack (7.1.3) lib/action_dispatch/middleware/request_id.rb:28:in `call'
rack (3.0.9) lib/rack/method_override.rb:28:in `call'
rack (3.0.9) lib/rack/runtime.rb:24:in `call'
activesupport (7.1.3) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (7.1.3) lib/action_dispatch/middleware/server_timing.rb:59:in `block in call'
actionpack (7.1.3) lib/action_dispatch/middleware/server_timing.rb:24:in `collect_events'
actionpack (7.1.3) lib/action_dispatch/middleware/server_timing.rb:58:in `call'
rails_performance (1.2.1) lib/rails_performance/rails/middleware.rb:42:in `call!'
rails_performance (1.2.1) lib/rails_performance/rails/middleware.rb:38:in `call'
rails_performance (1.2.1) lib/rails_performance/rails/middleware.rb:17:in `call!'
rails_performance (1.2.1) lib/rails_performance/rails/middleware.rb:9:in `call'
actionpack (7.1.3) lib/action_dispatch/middleware/executor.rb:14:in `call'
proscenium-0.15.0.beta.1-arm64 (darwin) lib/proscenium/middleware.rb:30:in `call'
rack (3.0.9) lib/rack/etag.rb:29:in `call'
rack (3.0.9) lib/rack/conditional_get.rb:31:in `call'
actionpack (7.1.3) lib/action_dispatch/middleware/static.rb:25:in `call'
actionpack (7.1.3) lib/action_dispatch/middleware/static.rb:25:in `call'
rack (3.0.9) lib/rack/sendfile.rb:114:in `call'
actionpack (7.1.3) lib/action_dispatch/middleware/ssl.rb:79:in `call'
actionpack (7.1.3) lib/action_dispatch/middleware/host_authorization.rb:141:in `call'
railties (7.1.3) lib/rails/engine.rb:536:in `call'
puma (6.4.2) lib/puma/configuration.rb:272:in `call'
puma (6.4.2) lib/puma/request.rb:100:in `block in handle_request'
puma (6.4.2) lib/puma/thread_pool.rb:378:in `with_force_shutdown'
puma (6.4.2) lib/puma/request.rb:99:in `handle_request'
puma (6.4.2) lib/puma/server.rb:464:in `process_client'
puma (6.4.2) lib/puma/server.rb:245:in `block in run'
puma (6.4.2) lib/puma/thread_pool.rb:155:in `block in spawn_thread'
I've had the same issue.
That method, type_casted_binds
is part of https://apidock.com/rails/v6.1.3.1/ActiveRecord/ConnectionAdapters/Quoting/type_casted_binds
When I extend
that module in the ActiveRecordEventSubscriber
, I get another error about a missing method: filter
.
NoMethodError: undefined method `filter' for Debugbar::ActiveRecordEventSubscriber:Class (NoMethodError)
filtered_params = filter(attribute_name, casted_params[i])
Referenced here: https://github.com/julienbourdeau/debugbar/blob/master/lib/debugbar/subscribers/active_record.rb#L38
Sorry about that! I have copied this directly from the log_subscriber in Rails I forgot2 methods.
I have never got :binds
in my events so I never noticed. By any chance, do you know how I could reproduce?
Can anyone please try v0.1.3? 🙏
The issue should be resolved.
I just tried 0.1.3 and got that filter
error.
Yes I'm sorry. Latest version fixed it 🙈