`dx serve --addr 0.0.0.0` causes error in fullstack app
Problem
I am testing out Dioxus and trying to serve my freshly created app at 0.0.0.0 to see if I can access it from a phone on the LAN. I observed the discussions in https://github.com/DioxusLabs/dioxus/issues/2989 and https://github.com/DioxusLabs/dioxus/issues/3207, however none of the solutions proposed have worked for me and I get the following error when attempting to load the site both locally and from another device
Backend connection failed. The backend is likely still starting up. Please try again in a few seconds. Error: Error {
context: "Failed to send proxy request",
source: hyper_util::client::legacy::Error(
Connect,
ConnectError(
"tcp connect error",
0.0.0.0:57348,
Os {
code: 10049,
kind: AddrNotAvailable,
message: "The requested address is not valid in its context.",
},
),
),
}
Steps To Reproduce
Steps to reproduce the behavior:
- Create a fullstack app using
dx newwith the following options:- Template -- Jumpstart
- Fullstack -- true
- Router -- true
- Tailwind CSS -- true
- Prompts for LLMs -- true
- Default platform -- web
- Run
dx serve --addr 0.0.0.0 - Try to load the app at http://127.0.0.1:8080 from your machine, or at http://YOUR_MACHINE_IP:8080 from another device on your LAN
Expected behavior
The Dioxus application should spin up with 0.0.0.0 binding correctly, not throw 500 server errors
Environment:
- Dioxus version: 0.7.1
- Rust version: 1.91.1
- OS info: Windows 11
- App platform: web
Also having this issue
After looking into it further, I noticed that pressing "/" to reveal more commands also reveals a network port which does respect the --addr flag
│ Network: http://0.0.0.0:63365