2

I am having issues with action cable websocket connections, in development. When I start puma it works fine (connection is open, I can send data back and forth), and then after few page reloads, it just stop working.. No error is thrown.

Started GET "/cable/" [WebSocket] for 127.0.0.1 at 2017-06-12 11:49:21 +0200
Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)
Started GET "/cable" for 127.0.0.1 at 2017-06-12 11:49:22 +0200
Started GET "/cable/" [WebSocket] for 127.0.0.1 at 2017-06-12 11:49:22 +0200
Started GET "/user/projects/11/forecast" for 127.0.0.1 at 2017-06-12 11:49:22 +0200
Started GET "/notifications?limit=30" for 127.0.0.1 at 2017-06-12 11:49:22 +0200
Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)

In browser I see switching protocols 101, and that's it.

I am using Rails 5.0.3, Ruby 2.2.2p95, Puma server 3.9.1, ActionCable is also 5.0.3.

cable.yml is a standard one:

development:
  adapter: async

Any suggestions?

Ivan Bajalovic
  • 780
  • 1
  • 9
  • 20
  • Not sure if this will help but check this related post [here](https://stackoverflow.com/questions/36266746/actioncable-not-receiving-data) – Belder Jun 12 '17 at 13:57
  • @BrandonElder as I remember, according to documentation, Async adapter do not assure that messages will be delivered. However, I am having issue that connection is broken. – Ivan Bajalovic Jun 12 '17 at 14:03
  • 1
    After some investigations, it turns out that problem arises because of browserify - actioncable/ws breaks after i change my js code and browserify compiles js... I posted an issue on browserify-rails. – Ivan Bajalovic Jun 12 '17 at 14:05

0 Answers0