ruby-hyperloop / hyper-mesh

The project has moved to Hyperstack!! - Synchronization of active record models across multiple clients using Pusher, ActionCable, or Polling
https://hyperstack.org/
MIT License
22 stars 12 forks source link

ActionController::UrlGenerationError - No route matches #24

Open creativetags opened 7 years ago

creativetags commented 7 years ago

I'm getting this error when I load a page that calls for reception_index_url

ActionController::UrlGenerationError - No route matches {:action=>"index", :channel_name=>"private--Application", :client_id=>"6c081015-2c97-42d5-9840-63a9663eac18-f3e8fa788cc8d405b8c169bf8225c277", :controller=>"reception"}

I'm running ruby-2.4.0 rails 5.0.1 hyper-rails 0.4.1 hyper-mesh 0.5.3 hyper-router 2.4.0

Reproducing it is a little tricky and I'm integrating with a project I can't share unfortuntately

barriehadfield commented 7 years ago

@catmando I spent some time trying to fix this with @creativetags earlier today. Seems this is sporadically happening when HyperMesh calls back to Rails looking for updates. Same result with simple_polling and ActionCable. I don't think that reception_index_url has anything to do with it as we commented that out and got the same result.

The exception is being generated on the server.

ActionController::UrlGenerationError at /synchromesh-action-cable-auth/beee642b-2b58-489b-914d-0f948a6c1748-7eb3163b163a4353e85eba00bab61985/private--Application

app/controllers/application_controller.rb, line 112

107         cart
  108       end
  109     end
  110   
  111     def set_menu
> 112       @menu_items = []
  113       # @menu_items = [ { name: 'reception', link: reception_index_url, can_read: "Reception" },
  114       #                 { name: 'furniture', link: furniture_index_url, can_read: "Furniture" },
  115       #                 { name: 'users', link: :users, can_read: "User" },
  116       #                 { name: 'orders', link: :orders, can_read: "Order" },
  117       #                 { name: 'delivery_slots', link: delivery_slots_url, can_read: "DeliverySlot" },

Full backtrace

actionpack (5.0.1) lib/action_dispatch/journey/formatter.rb:51:in generate' actionpack (5.0.1) lib/action_dispatch/routing/route_set.rb:629:ingenerate' actionpack (5.0.1) lib/action_dispatch/routing/route_set.rb:660:in generate' actionpack (5.0.1) lib/action_dispatch/routing/route_set.rb:707:inurl_for' actionpack (5.0.1) lib/action_dispatch/routing/route_set.rb:236:in call' actionpack (5.0.1) lib/action_dispatch/routing/route_set.rb:177:incall' actionpack (5.0.1) lib/action_dispatch/routing/route_set.rb:295:in block (2 levels) in define_url_helper' app/controllers/application_controller.rb:112:inset_menu' activesupport (5.0.1) lib/active_support/callbacks.rb:382:in block in make_lambda' activesupport (5.0.1) lib/active_support/callbacks.rb:169:inblock (2 levels) in halting' actionpack (5.0.1) lib/abstract_controller/callbacks.rb:12:in block (2 levels) in <module:Callbacks>' activesupport (5.0.1) lib/active_support/callbacks.rb:170:inblock in halting' activesupport (5.0.1) lib/active_support/callbacks.rb:454:in block in call' activesupport (5.0.1) lib/active_support/callbacks.rb:454:incall' activesupport (5.0.1) lib/active_support/callbacks.rb:101:in run_callbacks' activesupport (5.0.1) lib/active_support/callbacks.rb:750:in_run_process_action_callbacks' activesupport (5.0.1) lib/active_support/callbacks.rb:90:in run_callbacks' actionpack (5.0.1) lib/abstract_controller/callbacks.rb:19:inprocess_action' actionpack (5.0.1) lib/action_controller/metal/rescue.rb:20:in process_action' actionpack (5.0.1) lib/action_controller/metal/instrumentation.rb:32:inblock in process_action' activesupport (5.0.1) lib/active_support/notifications.rb:164:in block in instrument' activesupport (5.0.1) lib/active_support/notifications/instrumenter.rb:21:ininstrument' activesupport (5.0.1) lib/active_support/notifications.rb:164:in instrument' actionpack (5.0.1) lib/action_controller/metal/instrumentation.rb:30:inprocess_action' actionpack (5.0.1) lib/action_controller/metal/params_wrapper.rb:248:in process_action' activerecord (5.0.1) lib/active_record/railties/controller_runtime.rb:18:inprocess_action' actionpack (5.0.1) lib/abstract_controller/base.rb:126:in process' actionview (5.0.1) lib/action_view/rendering.rb:30:inprocess' actionpack (5.0.1) lib/action_controller/metal.rb:190:in dispatch' actionpack (5.0.1) lib/action_controller/metal.rb:262:indispatch' actionpack (5.0.1) lib/action_dispatch/routing/route_set.rb:50:in dispatch' actionpack (5.0.1) lib/action_dispatch/routing/route_set.rb:32:inserve' actionpack (5.0.1) lib/action_dispatch/journey/router.rb:39:in `block