mclintprojects / actioncable-vue

A Vue plugin that makes integrating Rails Action Cable dead-easy.
MIT License
182 stars 38 forks source link

Vue 2.6.12, Rails 6.02, subscribing loop #62

Open PatrykDubinski opened 2 years ago

PatrykDubinski commented 2 years ago

Hello

I'm using Vue 2.6.12 with Rails 6.02 and when i try to subscribe to ActionCable all i get is "welcome message" and then it starts subscribing loop and keeps connecting and disconnecting from websocket. After couple of minutes there are many "/cable" finished request instead of couple listening/pending. This bug happens on actioncable-vue@2.5.1 but i figured that it's working on version 2.4.6.

To Reproduce Steps to reproduce the behaviour:

  1. Generate channel in rails action cable and remove generated js channel
  2. Configure ActionCable authorization and subscribing just to not throw an "Unauthorized" error
  3. Subscribe to Channel with actioncable-vue
  4. When websocket will try to connect in Network tab there will be multiple requests and subscribing loop

Screenshots Screenshot below. Every "cable" request looks the same Zrzut ekranu 2022-01-11 o 07 54 51

mammad2c commented 2 years ago

Hi, can you provide your codes to detect what happens exactly?