Closed IamCarbonMan closed 6 years ago
This sounds like a caching problem of some kind, because :websocket-url does indeed work.
Remember to do a lein clean
. Also, you may want to try 0.5.16-SNAPSHOT
as it has improved the caching situation a bit.
lein clean
doesn't seem to change anything. Nor does using lein-figwheel 0.5.16-SNAPSHOT. I've removed and reinstalled the whole project and tested each option again, so it's definitely not a caching problem.
Well, I'm an idiot. The issue was the line: :init tabletop.server/init
. I haven't implemented the init function yet, removing that line fixed it, not sure why though. However, I'm now getting: socket.cljs?rel=1524715185107:71 WebSocket connection to 'ws://54.213.249.100:3449/figwheel-ws/dev/dev' failed: Error during WebSocket handshake: Unexpected response code: 404
. Changing :websocket-url to "ws://${ip-address}/figwheel-ws" or using :websocket-host :js-client-host have the same error.
ws://54.213.249.100:3449/figwheel-ws/dev/dev
is wrong it should be
ws://54.213.249.100:3449/figwheel-ws/dev
Use:
:websocket-url ws://54.213.249.100:3449/figwheel-ws
I did just that, still didn't work. I'm nor sure what I changed to make it work at this point, but unless someone else has the same issue this can be closed.
I encountered the same issue, figwheel just appends the name of my build to the websocket-url. i described more here: https://github.com/bhauman/lein-figwheel/issues/683#issuecomment-561220278
I'm trying to setup lein-figwheel on an AWS dev box. I SSH into the development machine and connect to its public IP from my browser. But no matter what I try I get an error in the browser console:
WebSocket connection to 'ws://localhost:3449/figwheel-ws/dev' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
. I've tried using:server-ip "<literal-ip-address>"
,:websocket-host :js-client-host
, `:websocket-url "ws://<literal-ip-address/figwheel-ws/dev". None of these have any effect. Here's my project.clj: