tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
78.1k stars 2.31k forks source link

[bug] Failed to exec ` cargo-tauri android android-studio-script ` #9701

Closed Chiichen closed 1 week ago

Chiichen commented 1 week ago

Describe the bug

I am trying to run tauri on android device, and It reports

thread '<unnamed>' panicked at src/mobile/mod.rs:279:6:
failed to read CLI options: Error when opening the TCP socket: Connection refused (os error 61)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

And I tested write_options and read_options directly as follow. It works well

#[test]
fn test_option_storage() {
  let r = write_options("com.tauri.test", CliOptions::default()).unwrap();
  let output = read_options("com.tauri.test");
  assert_eq!(output.args, CliOptions::default().args);
  assert_eq!(output.features, CliOptions::default().features);
  assert_eq!(output.noise_level, CliOptions::default().noise_level);
}

I think there is some upper layer bugs in cli. I'm working on it

Reproduction

No response

Expected behavior

No response

Full tauri info output

[✔] Environment
    - OS: Mac OS 14.4.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.80.0-nightly (faefc618c 2024-05-07)
    ✔ cargo: 1.80.0-nightly (05364cb2f 2024-05-03)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: nightly-x86_64-apple-darwin (default)
    - node: 20.11.1
    - pnpm: 8.15.4
    - yarn: 1.22.21
    - npm: 10.2.4
    - bun: 1.1.7

[-] Packages
    - tauri [RUST]: 2.0.0-beta.18
    - tauri-build [RUST]: 2.0.0-beta.14
    - wry [RUST]: 0.39.4
    - tao [RUST]: 0.27.1
    - tauri-cli [RUST]: 2.0.0-beta.16
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 2.0.0-beta.16

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../.output
    - devUrl: http://localhost:3000/
    - framework: Vue.js (Nuxt)
    - bundler: Vite

Stack trace

No response

Additional context

No response