tauri-apps/tauri · error
failed to read missing addr file {}: {e}
Error message
failed to read missing addr file {}: {e} What it means
Panic in the mobile dev runtime support code. During `tauri ios dev`/`tauri android dev`, the CLI-side build step reads the temp file `{TMPDIR}/{identifier}-server-addr` (written by the running tauri CLI dev server) to learn the WebSocket address of the dev server, and read_to_string failure panics here. The identifier comes from the app configuration, so a mismatch yields a different filename than the one that was written.
Source
Thrown at crates/tauri-cli/src/mobile/mod.rs:386
Ok(OptionsHandle(runtime, handle))
}
fn read_options(config: &ConfigMetadata) -> CliOptions {
let runtime = tokio::runtime::Runtime::new().unwrap();
let options = runtime
.block_on(async move {
let addr_path = temp_dir().join(format!(
"{}-server-addr",
config
.original_identifier()
.context("app configuration is missing an identifier")?
));
let (tx, rx) = WsTransportClientBuilder::default()
.build(
format!(
"ws://{}",
read_to_string(&addr_path).unwrap_or_else(|e| panic!(
"failed to read missing addr file {}: {e}",
addr_path.display()
))
)
.parse()
.unwrap(),
)
.await
.context("failed to build WebSocket client")?;
let client: Client = ClientBuilder::default().build_with_tokio(tx, rx);
let options: CliOptions = client
.request("options", rpc_params![])
.await
.context("failed to request options")?;
Ok::<CliOptions, Error>(options)
})
.expect("failed to read CLI options");
View on GitHub (pinned to 52e4b6e71d)
Solutions
- Stop all tauri dev processes and re-run `tauri ios dev` / `tauri android dev` from a clean shell so server and build step share one session
- Keep the app identifier stable in tauri.conf.json while iterating on mobile dev
- Run the CLI and the IDE/build on the same user without sudo so TMPDIR resolves identically
Example fix
# before
# Xcode step panics: failed to read missing addr file /tmp/com.example.app-server-addr
# after
pkill -f 'tauri.*dev' || true
npx tauri ios dev # single session writes and reads the same {identifier}-server-addr file Defensive patterns
Strategy: retry
Validate before calling
# ensure no orphan dev servers before starting (stale/missing addr file is the usual cause)
pkill -f 'tauri.*dev' || true
ls "${TMPDIR:-/tmp}"/*-server-addr 2>/dev/null && echo 'stale addr file present; previous session crashed?' Prevention
- Run one `tauri dev` session per app; kill leftovers before starting
- Never change `identifier` while a mobile dev session is open
- Run the CLI and Xcode/Gradle as the same user (no sudo) so the temp dir matches
When it happens
Trigger: The dev server process died or never wrote the addr file; identifier in tauri.conf.json changed between the CLI run and the Xcode/Gradle build step; TMPDIR differs between the CLI and the build tool process (sudo, sandboxed Xcode service, macOS per-user temp dirs); a second dev session overwrote/removed it.
Common situations: Editing `identifier` mid-session; running Xcode builds with sudo or from a different login session; concurrent `tauri dev` runs on the same app; temp dir cleaners removing the file mid-build.
Related errors
- No external IP detected.
- {} project directory {} doesn't exist. Please run `tauri {}
- failed to read CLI options
- iOS platform not installed
- Target not found
AI-assisted analysis of tauri-apps/tauri@52e4b6e71d (2026-08-20).
Data as JSON: /api/errors/8b236f459500bea0.
Report an issue: GitHub.