tauri-apps/tauri · error
No external IP detected.
Error message
No external IP detected.
What it means
Panic during `tauri ios dev` / `tauri android dev` setup. local_ip_address::list_afinet_netifas() enumerates interfaces and the code keeps IPv4 addresses that are not loopback (plus IPv6 addresses ending in ::2); when the filtered list is empty it panics with 'No external IP detected.' because it needs a LAN IP for the device to reach the dev server.
Source
Thrown at crates/tauri-cli/src/mobile/mod.rs:195
pub target_device: Option<TargetDevice>,
}
fn local_ip_address(force: bool) -> &'static IpAddr {
static LOCAL_IP: OnceLock<IpAddr> = OnceLock::new();
LOCAL_IP.get_or_init(|| {
let prompt_for_ip = || {
let addresses: Vec<IpAddr> = local_ip_address::list_afinet_netifas()
.expect("failed to list networks")
.into_iter()
.map(|(_, ipaddr)| ipaddr)
.filter(|ipaddr| match ipaddr {
IpAddr::V4(i) => i != &Ipv4Addr::LOCALHOST,
IpAddr::V6(i) => i.to_string().ends_with("::2"),
})
.collect();
match addresses.as_slice() {
[] => panic!("No external IP detected."),
[ipaddr] => *ipaddr,
_ => {
let selected = dialoguer::Select::with_theme(&dialoguer::theme::ColorfulTheme::default())
.with_prompt(
"Failed to detect external IP, What IP should we use to access your development server?",
)
.items(&addresses)
.default(0)
.interact()
.expect("failed to select external IP");
*addresses.get(selected).unwrap()
}
}
};
let ip = if force {
prompt_for_ip()
} else {View on GitHub (pinned to 52e4b6e71d)
Solutions
- Bring up any interface with a real address (connect to Wi-Fi/Ethernet/hotspot) and re-run `tauri <platform> dev`
- If multiple candidates appear, pick the right one from the interactive prompt; if detection keeps failing, give the machine a stable LAN IP
- For containerized builds, run with a bridged network (e.g. docker --network) so a non-loopback address exists
Example fix
# before npx tauri android dev # panic: No external IP detected. # after sudo ip link set wlan0 up && nmcli device connect wlan0 # any real IP npx tauri android dev # prompt now lists candidate IPs
Defensive patterns
Strategy: fallback
Validate before calling
# check a usable interface exists before launching mobile dev
ip -4 addr show scope global | grep -q inet || { echo 'no non-loopback IPv4; enable Wi-Fi/Ethernet first'; exit 1; } Prevention
- Connect the dev machine to a network (or a phone hotspot) before `tauri ios/android dev`
- In containers, run with a bridged/user-defined network so a non-loopback address exists
- When several IPs exist, know your LAN subnet so the interactive pick is quick and correct
When it happens
Trigger: Running mobile dev on a machine whose only interfaces are loopback: disconnected Wi-Fi/Ethernet, disabled network interfaces, containers/VMs with no bridged adapter, or firewall/VPN tools that hide or zero out addresses.
Common situations: Laptops in airplane mode; CI docker containers doing Android builds; corporate VPNs replacing physical interface addresses; cloud builders with only internal addressing.
Related errors
- failed to read missing addr file {}: {e}
- {} project directory {} doesn't exist. Please run `tauri {}
- Couldn't bind to {port} on {ip}
- iOS platform not installed
- Target not found
AI-assisted analysis of tauri-apps/tauri@52e4b6e71d (2026-08-20).
Data as JSON: /api/errors/80d11dad2456686d.
Report an issue: GitHub.