Hi!
It's seems that sockjs get rails port instead webpack-dev-server config port (webpacker.yml).
鈹溾攢 @rails/[email protected]
鈹溾攢 [email protected]
鈹溾攢 [email protected]
鈹溾攢 [email protected]
鈹溾攢 [email protected]
webpack.yml (dev-server part):
# Reference: https://webpack.js.org/configuration/dev-server/
dev_server:
https: false
host: 0.0.0.0
port: 3036
public: 0.0.0.0:3036
hmr: true
# Inline should be set to true if using HMR
inline: true
overlay: true
disable_host_check: true
use_local_ip: false
quiet: false
headers:
'Access-Control-Allow-Origin': '*'
watch_options:
ignored: /node_modules/
got rails error: ActionController::RoutingError (No route matches [GET] "/sockjs-node/info"):
got js console error: [WDS] Disconnected!
It try to connect sockets in 3007 (rails server port) instead 3036.

This return "ok" status if i change port manually and resend request.
To be sure, i reran 'rails webpacker:binstubs' and said me identical files...
Where change config to resolve websocket connection crashes?
Thanks
Caused by this PR: https://github.com/webpack/webpack-dev-server/pull/1664
@amiuhle is right the line https://github.com/webpack/webpack-dev-server/blob/master/client-src/default/index.js#L211
changes your port when using 0.0.0.0 as a host ...
makes it difficult to use this with docker and docker-compose
I saw this merged PR https://github.com/webpack/webpack-dev-server/pull/1792/files but can't get it to work with webpacker. Has anyone had any luck with this? I have webpack-dev-server version 3.3.1
What about specifying sockPort?
dev_server:
https: false
host: 0.0.0.0
port: 3036
sockPort: 3036
seems going well with webpack-dev-server 3.5.1
Upgrading to 3.5.1 got it working for me with sockPort thanks @GuillaumeM59
Most helpful comment
What about specifying
sockPort?