rollbar / rollbar-gem

Exception tracking and logging from Ruby to Rollbar
https://docs.rollbar.com/docs/ruby
MIT License
447 stars 280 forks source link

ActionController::RoutingError (No route matches [GET] "/verify"): #696

Closed damienlethiec closed 5 years ago

damienlethiec commented 6 years ago

Hello,

I often add rollbar to my projects without problems but this time it is not working:

Rails 5.2.0.rc1 (I have already been able to make Rollbar work in another rails 5.2.0.rc1 project).

When I run rake rollbar:test, I have an error (bellow).

Running via Spring preloader in process 85529
Testing manual report...
Setting up the controller.
Processing...
Started GET "/verify" for  at 2018-03-06 18:19:26 +0700
Cannot render console from ! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255

ActionController::RoutingError (No route matches [GET] "/verify"):

actionpack (5.2.0.rc1) lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call'
rollbar (2.15.5) lib/rollbar/middleware/rails/show_exceptions.rb:22:in `call_with_rollbar'
web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.5.1) lib/web_console/middleware.rb:20:in `block in call'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `call'
actionpack (5.2.0.rc1) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (5.2.0.rc1) lib/rails/rack/logger.rb:38:in `call_app'
railties (5.2.0.rc1) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (5.2.0.rc1) lib/active_support/tagged_logging.rb:71:in `block in tagged'
activesupport (5.2.0.rc1) lib/active_support/tagged_logging.rb:28:in `tagged'
activesupport (5.2.0.rc1) lib/active_support/tagged_logging.rb:71:in `tagged'
railties (5.2.0.rc1) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.2.0.rc1) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack (5.2.0.rc1) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.0.4) lib/rack/method_override.rb:22:in `call'
rack (2.0.4) lib/rack/runtime.rb:22:in `call'
activesupport (5.2.0.rc1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (5.2.0.rc1) lib/action_dispatch/middleware/executor.rb:14:in `call'
rack-livereload (0.3.16) lib/rack/livereload.rb:23:in `_call'
rack-livereload (0.3.16) lib/rack/livereload.rb:14:in `call'
actionpack (5.2.0.rc1) lib/action_dispatch/middleware/static.rb:127:in `call'
rack (2.0.4) lib/rack/sendfile.rb:111:in `call'
webpacker (3.3.0) lib/webpacker/dev_server_proxy.rb:18:in `perform_request'
rack-proxy (0.6.4) lib/rack/proxy.rb:57:in `call'
railties (5.2.0.rc1) lib/rails/engine.rb:524:in `call'
rollbar (2.15.5) lib/rollbar/rake_tasks.rb:86:in `block (2 levels) in <top (required)>'
rake (12.3.0) lib/rake/task.rb:251:in `block in execute'
rake (12.3.0) lib/rake/task.rb:251:in `each'
rake (12.3.0) lib/rake/task.rb:251:in `execute'
rake (12.3.0) lib/rake/task.rb:195:in `block in invoke_with_call_chain'
/usr/local/Cellar/rbenv/1.1.1/versions/2.5.0/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
rake (12.3.0) lib/rake/task.rb:188:in `invoke_with_call_chain'
rake (12.3.0) lib/rake/task.rb:181:in `invoke'
rake (12.3.0) lib/rake/application.rb:160:in `invoke_task'
rake (12.3.0) lib/rake/application.rb:116:in `block (2 levels) in top_level'
rake (12.3.0) lib/rake/application.rb:116:in `each'
rake (12.3.0) lib/rake/application.rb:116:in `block in top_level'
rake (12.3.0) lib/rake/application.rb:125:in `run_with_threads'
rake (12.3.0) lib/rake/application.rb:110:in `top_level'
rake (12.3.0) lib/rake/application.rb:83:in `block in run'
rake (12.3.0) lib/rake/application.rb:186:in `standard_exception_handling'
rake (12.3.0) lib/rake/application.rb:80:in `run'
bin/rake:9:in `<top (required)>'
activesupport (5.2.0.rc1) lib/active_support/dependencies.rb:277:in `load'
activesupport (5.2.0.rc1) lib/active_support/dependencies.rb:277:in `block in load'
activesupport (5.2.0.rc1) lib/active_support/dependencies.rb:249:in `load_dependency'
activesupport (5.2.0.rc1) lib/active_support/dependencies.rb:277:in `load'
/usr/local/Cellar/rbenv/1.1.1/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/local/Cellar/rbenv/1.1.1/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
-e:1:in `<main>'
Test failed! You may have a configuration issue, or you could be using a gem that's blocking the test. Contact support@rollbar.com if you need help troubleshooting.

Anybody know what is the problem?

Thank you

rivkahstandig3636 commented 6 years ago

@ArturMoczulski Could you take a look into this?

sandrods commented 6 years ago

Same problem here. Rails 5.2 Ruby 2.5.1

Any hints?

(Not a very good start... )

jondeandres commented 6 years ago

Hi there, I couldn't reproduce the problem with a fresh installation of rails5.2 and ruby 2.5.1. Can you try that in your environments?

We'd need more information to try to resolve this issue. Running bundle exec rake middleware and pasting the output might help to identify if a middleware can be causing a problem. Also, if there is some special configuration related to the routes, hosts, etc...it'd be nice to know.

jessewgibbs commented 6 years ago

I'm going to close this issue pending feedback from one of the participants.

filipemenezes commented 6 years ago

I am facing the same issue using Rails API.

thermistor commented 5 years ago

FWIW I found that the spring gem caused this error for me. Remove spring code from ./bin/rake fixes the issue, or call it like this:

DISABLE_SPRING=1 rake rollbar:test
jessewgibbs commented 5 years ago

Reopening this one. @waltjones can you investigate when you get a chance?

waltjones commented 5 years ago

@damienlethiec @filipemenezes @thermistor

Thank you for these reports. I have not been able to reproduce, even when using exactly Rails 5.2.0.rc1, and ensuring that spring is running and routes are loaded before running the rake task. I have considered it might be related to an earlier version of spring, but spring has been at 2.0.2 since well before Rails 5.2.0 and the initial issue report.

If you are using a different spring version, or if there is anything notable about your config that hasn't been discussed yet, let me know.

waltjones commented 5 years ago

@damienlethiec @filipemenezes @thermistor

We have a fix now. See https://github.com/rollbar/rollbar-gem/pull/816, or try setting config.cache_classes == true in your Rails config.

I discovered that my problems reproducing were caused by using bundle exec rake rather than bin/rake, so that is a workaround as well.

thermistor commented 5 years ago

Nice work

waltjones commented 5 years ago

@thermistor thank you for mentioning spring.