Websocket-rails gem in standalone mode FiberError

586 views Asked by At

I'm first time working with websocket-rails gem. When i trying to trigger some event in standalone mode my server falls with error. But if standalone mode = false there are no errors

This is full stack trace

FiberError - can't yield from root fiber:
   () Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/em-synchrony-ad17ce925fe4/lib/em-synchrony.rb:75:in `sync'
  redis (3.0.7) lib/redis/connection/synchrony.rb:47:in `read'
  redis (3.0.7) lib/redis/connection/synchrony.rb:110:in `read'
  redis (3.0.7) lib/redis/client.rb:229:in `block in read'
  redis (3.0.7) lib/redis/client.rb:220:in `io'
  redis (3.0.7) lib/redis/client.rb:228:in `read'
  redis (3.0.7) lib/redis/client.rb:96:in `block in call'
  redis (3.0.7) lib/redis/client.rb:201:in `block (2 levels) in process'
  redis (3.0.7) lib/redis/client.rb:309:in `ensure_connected'
  redis (3.0.7) lib/redis/client.rb:191:in `block in process'
  redis (3.0.7) lib/redis/client.rb:270:in `logging'
  redis (3.0.7) lib/redis/client.rb:190:in `process'
  redis (3.0.7) lib/redis/client.rb:96:in `call'
  redis (3.0.7) lib/redis.rb:1821:in `block in hget'
  redis (3.0.7) lib/redis.rb:37:in `block in synchronize'
  /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
  redis (3.0.7) lib/redis.rb:37:in `synchronize'
  redis (3.0.7) lib/redis.rb:1820:in `hget'
  redis-objects (0.9.0) lib/redis/hash_key.rb:27:in `hget'
   () Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/websocket-rails-060af4602a05/lib/websocket_rails/channel.rb:58:in `token'
   () Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/websocket-rails-060af4602a05/lib/websocket_rails/channel.rb:31:in `trigger'
  app/views/api/v1/sympathies/create.json.jbuilder:7:in `_app_views_api_v__sympathies_create_json_jbuilder__4268387822506745492_70181429715020'
  actionpack (4.0.2) lib/action_view/template.rb:143:in `block in render'
  activesupport (4.0.2) lib/active_support/notifications.rb:161:in `instrument'
  actionpack (4.0.2) lib/action_view/template.rb:141:in `render'
  actionpack (4.0.2) lib/action_view/renderer/template_renderer.rb:49:in `block (2 levels) in render_template'
  actionpack (4.0.2) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
  activesupport (4.0.2) lib/active_support/notifications.rb:159:in `block in instrument'
  activesupport (4.0.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.0.2) lib/active_support/notifications.rb:159:in `instrument'
  actionpack (4.0.2) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
  actionpack (4.0.2) lib/action_view/renderer/template_renderer.rb:48:in `block in render_template'
  actionpack (4.0.2) lib/action_view/renderer/template_renderer.rb:56:in `render_with_layout'
  actionpack (4.0.2) lib/action_view/renderer/template_renderer.rb:47:in `render_template'
  actionpack (4.0.2) lib/action_view/renderer/template_renderer.rb:17:in `render'
  actionpack (4.0.2) lib/action_view/renderer/renderer.rb:42:in `render_template'
  actionpack (4.0.2) lib/action_view/renderer/renderer.rb:23:in `render'
  actionpack (4.0.2) lib/abstract_controller/rendering.rb:127:in `_render_template'
  actionpack (4.0.2) lib/action_controller/metal/streaming.rb:219:in `_render_template'
  actionpack (4.0.2) lib/abstract_controller/rendering.rb:120:in `render_to_body'
  actionpack (4.0.2) lib/action_controller/metal/rendering.rb:33:in `render_to_body'
  actionpack (4.0.2) lib/action_controller/metal/renderers.rb:26:in `render_to_body'
  actionpack (4.0.2) lib/abstract_controller/rendering.rb:97:in `render'
  actionpack (4.0.2) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render'
  activesupport (4.0.2) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
  /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
  activesupport (4.0.2) lib/active_support/core_ext/benchmark.rb:12:in `ms'
  actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:41:in `block in render'
  actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
  actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:40:in `render'
  remotipart (1.2.1) lib/remotipart/render_overrides.rb:14:in `render_with_remotipart'
  actionpack (4.0.2) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
  actionpack (4.0.2) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
  actionpack (4.0.2) lib/abstract_controller/base.rb:189:in `process_action'
  actionpack (4.0.2) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (4.0.2) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (4.0.2) lib/active_support/callbacks.rb:443:in `_run__3619126610137267988__process_action__callbacks'
  activesupport (4.0.2) lib/active_support/callbacks.rb:80:in `run_callbacks'
  actionpack (4.0.2) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (4.0.2) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
  activesupport (4.0.2) lib/active_support/notifications.rb:159:in `block in instrument'
  activesupport (4.0.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.0.2) lib/active_support/notifications.rb:159:in `instrument'
  actionpack (4.0.2) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  actionpack (4.0.2) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
  actionpack (4.0.2) lib/abstract_controller/base.rb:136:in `process'
  actionpack (4.0.2) lib/abstract_controller/rendering.rb:44:in `process'
  actionpack (4.0.2) lib/action_controller/metal.rb:195:in `dispatch'
  actionpack (4.0.2) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
  actionpack (4.0.2) lib/action_controller/metal.rb:231:in `block in action'
  actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
  actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:48:in `call'
  actionpack (4.0.2) lib/action_dispatch/journey/router.rb:71:in `block in call'
  actionpack (4.0.2) lib/action_dispatch/journey/router.rb:59:in `call'
  actionpack (4.0.2) lib/action_dispatch/routing/route_set.rb:680:in `call'
  rack-pjax (0.7.0) lib/rack/pjax.rb:12:in `call'
  meta_request (0.2.8) lib/meta_request/middlewares/app_request_handler.rb:13:in `call'
  rack-contrib (1.1.0) lib/rack/contrib/response_headers.rb:17:in `call'
  meta_request (0.2.8) lib/meta_request/middlewares/headers.rb:16:in `call'
  meta_request (0.2.8) lib/meta_request/middlewares/meta_request_handler.rb:13:in `call'
  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.3) lib/warden/manager.rb:34:in `call'
  rack (1.5.2) lib/rack/etag.rb:23:in `call'
  rack (1.5.2) lib/rack/conditionalget.rb:25:in `call'
  rack (1.5.2) lib/rack/head.rb:11:in `call'
  remotipart (1.2.1) lib/remotipart/middleware.rb:27:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/flash.rb:241:in `call'
  rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
  rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/cookies.rb:486:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  activesupport (4.0.2) lib/active_support/callbacks.rb:373:in `_run__4258674676079134758__call__callbacks'
  activesupport (4.0.2) lib/active_support/callbacks.rb:80:in `run_callbacks'
  actionpack (4.0.2) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/reloader.rb:64:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
  better_errors (1.1.0) lib/better_errors/middleware.rb:84:in `protected_app_call'
  better_errors (1.1.0) lib/better_errors/middleware.rb:79:in `better_errors_call'
  better_errors (1.1.0) lib/better_errors/middleware.rb:56:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.0.2) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.0.2) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in `block in tagged'
  activesupport (4.0.2) lib/active_support/tagged_logging.rb:25:in `tagged'
  activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in `tagged'
  railties (4.0.2) lib/rails/rack/logger.rb:20:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
  rack-contrib (1.1.0) lib/rack/contrib/runtime.rb:18:in `call'
  activesupport (4.0.2) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
  actionpack (4.0.2) lib/action_dispatch/middleware/static.rb:64:in `call'
  rack-contrib (1.1.0) lib/rack/contrib/sendfile.rb:105:in `call'
  railties (4.0.2) lib/rails/engine.rb:511:in `call'
  railties (4.0.2) lib/rails/application.rb:97:in `call'
  rack (1.5.2) lib/rack/content_length.rb:14:in `call'
  thin (1.6.2) lib/thin/connection.rb:86:in `block in pre_process'
  thin (1.6.2) lib/thin/connection.rb:84:in `pre_process'
  thin (1.6.2) lib/thin/connection.rb:53:in `process'
  faye-websocket (0.7.2) lib/faye/adapters/thin.rb:40:in `process'
  thin (1.6.2) lib/thin/connection.rb:39:in `receive_data'
  faye-websocket (0.7.2) lib/faye/adapters/thin.rb:44:in `receive_data'
  eventmachine (1.0.3) lib/eventmachine.rb:187:in `run'
  thin (1.6.2) lib/thin/backends/base.rb:73:in `start'
  thin (1.6.2) lib/thin/server.rb:162:in `start'
  rack (1.5.2) lib/rack/handler/thin.rb:16:in `run'
  rack (1.5.2) lib/rack/server.rb:264:in `start'
  railties (4.0.2) lib/rails/commands/server.rb:84:in `start'
  railties (4.0.2) lib/rails/commands.rb:76:in `block in <top (required)>'
  railties (4.0.2) lib/rails/commands.rb:71:in `<top (required)>'
  bin/rails:4:in `<main>'

Exiting
/Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/em-synchrony-ad17ce925fe4/lib/em-synchrony.rb:66:in `block in sync': unexpected return (LocalJumpError)
  from /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/em/deferrable.rb:158:in `call'
  from /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/em/deferrable.rb:158:in `set_deferred_status'
  from /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/em/deferrable.rb:198:in `fail'
  from /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/redis-3.0.7/lib/redis/connection/synchrony.rb:57:in `unbind'
  from /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:1440:in `event_callback'
  from /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
  from /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
  from /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
  from /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
  from /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/handler/thin.rb:16:in `run'
  from /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:264:in `start'
  from /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/railties-4.0.2/lib/rails/commands/server.rb:84:in `start'
  from /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in <top (required)>'
  from /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
  from /Users/selivandex/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
  from bin/rails:4:in `require'
  from bin/rails:4:in `<main>'

Any ideas?

1

There are 1 answers

1
Dinesh On

Using web sockets gem version 0.6.2 might help fix this issue.