atmosphere-play icon indicating copy to clipboard operation
atmosphere-play copied to clipboard

Example on front page does not work.

Open bb-work opened this issue 7 years ago • 3 comments

Play Framework 2.5.4, atmosphere-play 2.3.0

Used the chat code from the front page of this project, get handshake errors when trying to connect websocket. WebSocket connection to 'ws://localhost:9000/chat?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.3.2-javascript&X-Atmosphere-Transport=websocket&X-Atmosphere-TrackMessageSize=true&Content-Type=application/json&X-atmo-protocol=true' failed: Error during WebSocket handshake: Unexpected response code: 404

bb-work avatar Jul 12 '16 19:07 bb-work

Can someone please explain what the replacement is for the missing Router.dispatch() method????

bb-work avatar Jul 13 '16 14:07 bb-work

I have the same problem! Edit : solved with issue #39

Flo354 avatar Jul 18 '16 15:07 Flo354

Issue #39 did not solve the problem for me and the example on git seems to be broken as well. It uses Router.request, which cannot be found in the current version and there is no explanation of what to do differently. I've tried using the following line in application.conf, as suggested in issue #39: play.https.requestHandler = "org.atmosphere.play.AtmosphereHttpRequestHandler" It does not work and it seems the onRouteRequest cannot easily be replaced in Java:

GlobalSettings.onRouteRequest: There is no simple migration for this method when using the Java API. If you need this, you will have to keep your Global class around for a little longer.

(from the Play documentation: https://www.playframework.com/documentation/2.5.x/GlobalSettings).

DeveloperInResidence avatar Dec 12 '16 10:12 DeveloperInResidence