{"record":{"id":"80d11dad2456686d","repo":"tauri-apps/tauri","slug":"no-external-ip-detected","errorCode":null,"errorMessage":"No external IP detected.","messagePattern":"No external IP detected\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-cli/src/mobile/mod.rs","lineNumber":195,"sourceCode":"  pub target_device: Option<TargetDevice>,\n}\n\nfn local_ip_address(force: bool) -> &'static IpAddr {\n  static LOCAL_IP: OnceLock<IpAddr> = OnceLock::new();\n  LOCAL_IP.get_or_init(|| {\n    let prompt_for_ip = || {\n      let addresses: Vec<IpAddr> = local_ip_address::list_afinet_netifas()\n        .expect(\"failed to list networks\")\n        .into_iter()\n        .map(|(_, ipaddr)| ipaddr)\n        .filter(|ipaddr| match ipaddr {\n          IpAddr::V4(i) => i != &Ipv4Addr::LOCALHOST,\n          IpAddr::V6(i) => i.to_string().ends_with(\"::2\"),\n\n        })\n        .collect();\n      match addresses.as_slice() {\n        [] => panic!(\"No external IP detected.\"),\n        [ipaddr] => *ipaddr,\n        _ => {\n          let selected = dialoguer::Select::with_theme(&dialoguer::theme::ColorfulTheme::default())\n            .with_prompt(\n              \"Failed to detect external IP, What IP should we use to access your development server?\",\n            )\n            .items(&addresses)\n            .default(0)\n            .interact()\n            .expect(\"failed to select external IP\");\n          *addresses.get(selected).unwrap()\n        }\n      }\n    };\n\n    let ip = if force {\n      prompt_for_ip()\n    } else {","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/tauri-apps/tauri/blob/52e4b6e71d8632a7e648f866c442e287ecddee34/crates/tauri-cli/src/mobile/mod.rs#L177-L213","documentation":"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.","triggerScenarios":"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.","commonSituations":"Laptops in airplane mode; CI docker containers doing Android builds; corporate VPNs replacing physical interface addresses; cloud builders with only internal addressing.","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"],"exampleFix":"# before\nnpx tauri android dev  # panic: No external IP detected.\n\n# after\nsudo ip link set wlan0 up && nmcli device connect wlan0  # any real IP\nnpx tauri android dev   # prompt now lists candidate IPs","handlingStrategy":"fallback","validationCode":"# check a usable interface exists before launching mobile dev\nip -4 addr show scope global | grep -q inet || { echo 'no non-loopback IPv4; enable Wi-Fi/Ethernet first'; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["mobile","dev-server","network","tauri-cli","android","ios"],"backgroundTag":"no-network-interface","analyzedSha":"52e4b6e71d8632a7e648f866c442e287ecddee34","analyzedAt":"2026-08-20T13:59:20.734Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}