Using Phoenix 1.1.1, when doing mix phoenix.new myapp --no-html, the console gets filled with:
[info] GET /phoenix/live_reload/socket/websocket log messages.
I noticed that the deps function doesn't include phoenix_live_reload when using the --no-html option. I don't know if this has anything to do with it.
That's it. We should likely skip including the socket call and middleware for --no-html cases. :)
I'll fix this one if no one is on it
I'm willing to bet you had an old phoenix app running in a browser tab with live reload enabled, which is making those requests. For --no-html, we do not plug the LiveReloader, so you shouldn't be seeing any log entries from the app. It must be from another tab?
Ok you're right @chrismccord.
I quit all browsers and terminal sessions and started from scratch. The messages didn't show.
But reproducing it is easy and consistent.
So for the sake of clarity, this is exactly what to do to cause the log messages to appear (this is all using Phoenix 1.1.1):
In a terminal session (S1):
mix phoenix.new apiapp --no-htmlcd apiapp & mix phoenix.serverIn another terminal session (S2):
mix phoenix.new htmlappcd htmlapp & mix phoenix.serverhttp://localhost:4000 to display the default home page. Keep it open.htmlapp home page is open.I'm not sure anymore if you would consider this a bug. However, it was definitely confusing and annoying. The solution is extremely simple though (just close the tab).
Yeah there is nothing to fix here since you had two different apps running on the same host/port, with old clients attempting connections. Glad it's sorted out!
Most helpful comment
I'm willing to bet you had an old phoenix app running in a browser tab with live reload enabled, which is making those requests. For --no-html, we do not plug the LiveReloader, so you shouldn't be seeing any log entries from the app. It must be from another tab?