Getting websockets 404 Error on Rails 5 Deployment to Heroku - ruby-on-rails

I'm deploying a simple Rails 5 app (https://morseaa.herokuapp.com/) to Heroku and cannot seem to get websockets to function correctly. The app works perfectly fine on local host, but whenever websockets functionality is invoked on the heroku deployment, I get the following error:
WebSocket connection to 'wss://morseaa.herokuapp.com/cable' failed: Error during WebSocket handshake: Unexpected response code: 404

Related

I tried running my server but kept getting an error message on django admin

I am getting an error and my django admin cannot run.i tried running the server but it didn't work. It gave an error message

API endpoints returning 500 err after deploy on Heroku

The API endpoint is working fine on my local machine but when I deploy my Rails project to Heroku, some endpoints are returning 500 Internal Server Error. My tech pack is below, because I could not find a way to watch Rails log messages on Heroku, I could not share anym detailed information. What can be helpful for me is general answers for 500 error, like what could cause this and maybe a way of inspecting Rails log messages on Heroku. Thanks.
MongoDB, ElasticSearch, Redis, Swagger
The error message on Heroku logs is Completed 500 Internal Server Error in 27ms (MongoDB: 0.0ms)
Additionally, on my local I get the following error but the endpoint is returning 200 OK. HTTP parse error, malformed request ()
I realized that the problem is BONSAI connection on ElasticSearch Gem is not supported on versions > 7.13

Rails 5 action cable not working on aws elastic beanstalk

Im working with Rails 5 and integrate Action cable for chat system, its working fine on local, also working fine in production mode but not working on AWS elastic Beanstalk, please help me to resolve this problem, many thanks.
Following errors has coming:
WebSocket connection to 'ws://dreamermade-staging.qdmpcqqmnw.us-west-2.elasticbeanstalk.com/cable' failed: Error during WebSocket handshake: Unexpected response code: 404

Is Websocket enabled in Google app engine Ruby runtime?

As in rails 5, action cable can be used as a layer above the application to provide persistent connection (WebSocket). So I created an application and tested locally then deployed it to Google AppEngine flexible environment Ruby runtime. the application runs fine except the WebSocket part.
I checked the console in the browser and found that it keeps giving this error:
WebSocket connection to 'ws://mydomain.com/cable' failed: Error during WebSocket handshake: Unexpected response code: 400

Faye.js not working on Heroku with https

I am developing rails 4 application with private_pub for chatting apps. Its work perfect in local. But when move code from local to Heroku chatting not working due to below error:
https://XXXXXX-XXXXXXX-8XXX6.herokuapp.com/faye.js Failed to load resource: the server responded with a status of 404 (Not Found)
Actually in local working with http:// and on Heroku with https:// so may be issue but not found. Any one have a idea on it.
Thanks
Have you created a separated faye app on heroku? If not it's described here: http://www.thegreatcodeadventure.com/hello-or-building-a-chatting-app-with-rails/. Btw I changed from faye to pusher in which case I don't have to deploy a second app on heroku.

Resources