Closed bodrovis closed 8 years ago
Heroku doesn't support websockets, so what you're seeing is Faye trying to select the best transfer protocol. I think you can disable websockets in the client so that you don't see these errors.
Understood. I used
client.disable('websocket')
to disable websockets. Now I get only two errors after the page is loaded:
"NetworkError: 404 Not Found - http://mydomain.com/faye/4ex1s08qcb1tzby20uve9udda2v9nld/4ex1s08qcb1tzby20uve9udda2v9nld"
and
Firefox can't establish a connection to the server at http://mydomain.com/faye/4ex1s08qcb1tzby20uve9udda2v9nld/4ex1s08qcb1tzby20uve9udda2v9nld.
Same problem here, even disabling websockets doesn't work, I'm not using heroku though, everything works in development mode and does not in production env.
Well, I have to admit that everything is working fine for me, though I see those errors.
The GET request is generated by the EventSource connection type.
Try adding this: client.disable('eventsource');
Since I'm using Heroku, and WebSockets aren't supported, I disabled both: client.disable('websocket'); client.disable('eventsource');
This stopped the ActionController::RoutingError(s)
@bcavileer @bodrovis i am also have this issue bad request for "https://mydomain.herokuapp.com/faye" for my domain.I am new to rails so plz explain to use your answer
@Praveen-Invoscape I have not used faye in quite a while, mainly because Rails 5 now has ActionCable. That line should be added into your JS or CoffeeScript file, but things may have changes during these years so it may not be needed. Also, your error may be related to something else. By the way, here is my article on Faye that may come in handy https://www.sitepoint.com/realtime-mini-chat-rails-faye/
@Praveen-Invoscape Also do note that now Heroku does support websockets - at least I had no problems with ActionCable.
Thank you @bodrovis i will try to fix it by your link
Hello. I am using Faye with Rails 3.2.12 to implement comments that are instantly showing up. Everything is working fine, however I get some errors in the Firebug console. When i open the page the POST request is being sent to "http://mydomain.com/faye" with the following response:
But right after this appears an error
Then another POST request is again sent to the "http://mydomain.com/faye" with reponse like:
Then another two errors appears:
and
After these errors follow succesfull POST requests to the "http://mydomain.com/faye" with responses like:
I get all these errors in production (Heroku).
Still the comments are being updated instantly and I detect no other errors or problems.
In my route file I get:
Am I doing something wrong or did I forget something?
Thanks!