actioncable

ActionCable - Error during WebSocket handshake: Unexpected response code: 404

让人想犯罪 __ 提交于 2021-02-08 03:31:31
问题 Have deployed my Rails 5.2 app via Capistrano, and am having problems with ActionCable. I am using Nginx, Puma and Lets Encrypt. I have tried many combinations of configuration, but each time am receiving the same error. I am not sure how to debug this issue, and suggestions as well and any tips on re-arranging my ngnx.conf would be well-appreciated. Have changed the real website to website.com nginx.conf upstream puma { server unix:///home/deploy/apps/website/shared/tmp/sockets/website-puma

Action Cable issue: messages occasionally not delivering or occasionally sent to the wrong channel

≡放荡痞女 提交于 2021-02-07 19:05:41
问题 I'm using Action Cable for a chat application with many different channels. Everything is set up with Redis and Postgresql (to save messages) on Heroku and 95% of the time works great in development and production. Occasionally though, messages sent do not show up. The message is sent, it is saved in the database, but then it never shows up on the front end unless I refresh. Or, the message shows up in another channel for which it is not directed. Again, everything is properly saved in the

Action Cable issue: messages occasionally not delivering or occasionally sent to the wrong channel

£可爱£侵袭症+ 提交于 2021-02-07 19:01:22
问题 I'm using Action Cable for a chat application with many different channels. Everything is set up with Redis and Postgresql (to save messages) on Heroku and 95% of the time works great in development and production. Occasionally though, messages sent do not show up. The message is sent, it is saved in the database, but then it never shows up on the front end unless I refresh. Or, the message shows up in another channel for which it is not directed. Again, everything is properly saved in the

How can I call a channel method in a rails controller?

谁都会走 提交于 2021-02-07 11:59:14
问题 I have an ActionCable method that subscribes the user. If a new convo is started, I want to subscribe the user to the new channel as well. I can't figure out the proper syntax for calling a channel method in a controller. UPDATE: The issue is that the messages are appended to the chatbox when sent, but when the first message, is sent, the websocket connection is not established yet, and therefore it looks to the user as if the message was not sent (because it's not being appended). channel

Rails ActionCable Request Origins Subdomain

青春壹個敷衍的年華 提交于 2021-01-29 02:50:40
问题 I'm building a SaaS platform with the apartment gem and am introducing ActionCable for chat functionality. I have most of the chat functionality built, but when transmitting to the channel I get the following: Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket) User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 1], ["LIMIT", 1]] An unauthorized connection attempt was