Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method show_exceptions?' for an instance of ActionDispatch::Request` from Rails 7.1 #80

Open
dnt294 opened this issue Oct 27, 2024 · 3 comments

Comments

@dnt294
Copy link

dnt294 commented Oct 27, 2024

Hi, there.

After upgrade to Rails 7.1, running Rspec with rambulance will failed because of this line.
https://github.com/yuki24/rambulance/blob/main/lib/rambulance/test_helper.rb#L28

This is because show_exceptions? method has been removed since Rails 7.1

https://github.com/rails/rails/blob/v7.1.0/actionpack/lib/action_dispatch/http/request.rb

@yuki24
Copy link
Owner

yuki24 commented Oct 28, 2024

@dnt294 Thanks for reporting. Would you mind adding a full backtrace? We don't call the show_exceptions? method anywhere in the gem so I'm not sure how this relates to the gem's codebase.

@tdvietdev
Copy link

tdvietdev commented Nov 21, 2024

@dnt294
i think you have the same problem as me, however it is not a bug from this gem, it is a issue in Sentry, you need to update Sentry after updating to Rails 7, i updated Sentry and rambulance and it worked fine

this is my version that works fine

rambulance (3.3.0)
sentry-rails (5.19.0)
sentry-ruby (5.19.0)
sentry-sidekiq (5.19.0)

[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] NoMethodError (undefined method `show_exceptions?' for an instance of ActionDispatch::Request):
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] 
Causes:
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] AuthPlugin::UserPayloadError (must be logged in)
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby]   
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] sentry-rails (4.4.0) lib/sentry/rails/rescued_exception_interceptor.rb:18:in `rescue in call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] sentry-rails (4.4.0) lib/sentry/rails/rescued_exception_interceptor.rb:11:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] rack (2.2.10) lib/rack/etag.rb:27:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] rack (2.2.10) lib/rack/conditional_get.rb:40:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] rack (2.2.10) lib/rack/head.rb:12:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] activerecord (7.2.1) lib/active_record/migration.rb:674:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] actionpack (7.2.1) lib/action_dispatch/middleware/callbacks.rb:31:in `block in call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] activesupport (7.2.1) lib/active_support/callbacks.rb:101:in `run_callbacks'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] actionpack (7.2.1) lib/action_dispatch/middleware/callbacks.rb:30:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] actionpack (7.2.1) lib/action_dispatch/middleware/executor.rb:16:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] actionpack (7.2.1) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] ddtrace (1.23.3) lib/datadog/tracing/contrib/rails/middlewares.rb:19:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] actionpack (7.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:31:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] actionpack (7.2.1) lib/action_dispatch/middleware/show_exceptions.rb:32:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] railties (7.2.1) lib/rails/rack/logger.rb:41:in `call_app'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] railties (7.2.1) lib/rails/rack/logger.rb:29:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] actionpack (7.2.1) lib/action_dispatch/middleware/remote_ip.rb:96:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] actionpack (7.2.1) lib/action_dispatch/middleware/request_id.rb:33:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] rack (2.2.10) lib/rack/runtime.rb:22:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] activesupport (7.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] sentry-ruby-core (4.4.2) lib/sentry/rack/capture_exceptions.rb:23:in `block in call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] sentry-ruby-core (4.4.2) lib/sentry/hub.rb:56:in `with_scope'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] sentry-ruby-core (4.4.2) lib/sentry-ruby.rb:165:in `with_scope'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] sentry-ruby-core (4.4.2) lib/sentry/rack/capture_exceptions.rb:14:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] actionpack (7.2.1) lib/action_dispatch/middleware/executor.rb:16:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] actionpack (7.2.1) lib/action_dispatch/middleware/static.rb:27:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] rack (2.2.10) lib/rack/sendfile.rb:110:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] actionpack (7.2.1) lib/action_dispatch/middleware/host_authorization.rb:143:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] ddtrace (1.23.3) lib/datadog/tracing/contrib/rack/middlewares.rb:109:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] rack-cors (1.1.1) lib/rack/cors.rb:100:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] railties (7.2.1) lib/rails/engine.rb:535:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] puma (6.4.2) lib/puma/configuration.rb:272:in `call'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] puma (6.4.2) lib/puma/request.rb:100:in `block in handle_request'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] puma (6.4.2) lib/puma/thread_pool.rb:378:in `with_force_shutdown'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] puma (6.4.2) lib/puma/request.rb:99:in `handle_request'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] puma (6.4.2) lib/puma/server.rb:464:in `process_client'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] puma (6.4.2) lib/puma/server.rb:245:in `block in run'
[dd.service= dd.trace_id=2290462679421853149 dd.span_id=0 ddsource=ruby] puma (6.4.2) lib/puma/thread_pool.rb:155:in `block in spawn_thread'

@dnt294
Copy link
Author

dnt294 commented Nov 24, 2024

@tdvietdev
Thanks

@yuki24
Sorry for late response. I've tried with @tdvietdev 's solution and it worked.
So I think we can close this issue. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants