Skip to content

[bug] android dev - "Waiting for your frontend dev server to start on..." #9824

Closed as not planned
@happybeing

Description

@happybeing

Describe the bug

I've been working on a Tauri v1 project, and then decided to try v2 beta, so I also created a Tauri v2 project and had the hello world example working there (showing the 'greet' UI).

I then made a copy of my Tauri v1 project and have migrated it to v2 beta and have it working for desktop.

I then decided to try the cargo tauri android dev on the migrated project. I had some issues with it complaining about the app identifier because it contains '-' but eventually cleared those by deleting src-tauri/gen and re-doing cargo tauri android init.

Now, when I do cargo tauri android dev, I get a strange result. Firstly, the emulator starts as normal, but shows the 'greet' example, not my app. And in the console I get the following:

VITE v5.2.6  ready in 722 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
    Warn Waiting for your frontend dev server to start on http://192.168.43.141:5173/...
    Warn Waiting for your frontend dev server to start on http://192.168.43.141:5173/...
    Warn Waiting for your frontend dev server to start on http://192.168.43.141:5173/...
    Warn Waiting for your frontend dev server to start on http://192.168.43.141:5173/...
    Warn Waiting for your frontend dev server to start on http://192.168.43.141:5173/...
    Warn Waiting for your frontend dev server to start on http://192.168.43.141:5173/...
    Warn Waiting for your frontend dev server to start on http://192.168.43.141:5173/...

I don't understand why it is showing the 'greet' example. http://192.168.43.141:5173/ is kindof correct in that this is the local IP of my machine, but I would expect it to us 'localhost'. But anyway, why is the dev server not starting?

I have my app working on desktop, and it feels like I'm very close to having it working on android, but I'm not sure what is going on here. I haven't done android development before so not sure what might cause this.

Reproduction

No response

Expected behavior

My app loads into the Android emulator.

Full tauri info output

cargo tauri info

[✔] Environment
    - OS: Ubuntu 24.4.0 X64
    ✔ webkit2gtk-4.1: 2.44.0
    ✔ rsvg2: 2.58.0
    ✔ rustc: 1.78.0 (9b00956e5 2024-04-29)
    ✔ cargo: 1.78.0 (54d8815d0 2024-03-26)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (environment override by RUSTUP_TOOLCHAIN)
    - node: 22.1.0
    - yarn: 1.22.5
    - npm: 10.7.0

[-] Packages
    - tauri [RUST]: 2.0.0-beta.19
    - tauri-build [RUST]: 2.0.0-beta.15
    - wry [RUST]: 0.39.5
    - tao [RUST]: 0.28.0
    - tauri-cli [RUST]: 2.0.0-beta.12
    - @tauri-apps/api [NPM]: 2.0.0-beta.11
    - @tauri-apps/cli [NPM]: 2.0.0-beta.12

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../build
    - devUrl: http://localhost:5173/
    - framework: Svelte
    - bundler: Vite

Stack trace

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions