tauri-apps/tauri

[bug] iOS dev - "Waiting for your frontend dev server to start on..."

giuseppegreco opened this issue · 2 comments

Describe the bug

I've just created a Tauri project for Angular, and when I try to run it with npm run tauri ios dev, I get a few warnings like this:

Warn Waiting for your frontend dev server to start on http://127.0.0.1:5173/...

And finally it ends with the following error:

Error Could not connect to http://127.0.0.1:5173/ after 180s. Please make sure that is the URL to your dev server.

I've tried to change devUri in src-tauri/tauri.conf.json to localhost.1420, localhost:5173, 127.0.0.1:1420 and 127.0.0.1:5173... but none of them worked.

Reproduction

Create a new project with Cargo:

run cargo create-tauri-app

Select TypeScript / JavaScript as the frontend language

Select npm as the package manager

Select Angural as the UI template

move into the project folder

run npm install

run npm run tauri ios init

run npm run tauri ios dev

Expected behavior

The server should start and the app show up in the iOS simulator.

Full tauri info output

Warn Waiting for your frontend dev server to start on http://127.0.0.1:5173/...
    ...
    Warn Waiting for your frontend dev server to start on http://127.0.0.1:5173/...
    Warn Waiting for your frontend dev server to start on http://127.0.0.1:5173/...
    Error Could not connect to `http://127.0.0.1:5173/` after 180s. Please make sure that is the URL to your dev server.

Stack trace

No response

Additional context

No response

Set the TAURI_DEV_HOST to 0.0.0.0 and in the package.json file for the angular project add --host 0.0.0.0 for npm start

  ...
 "scripts": {
    "ng": "ng",
    "start": "ng serve --host 0.0.0.0",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "tauri": "tauri"
  },
  ...

Set the TAURI_DEV_HOST to 0.0.0.0 and in the package.json file for the angular project add --host 0.0.0.0 for npm start

  ...
 "scripts": {
    "ng": "ng",
    "start": "ng serve --host 0.0.0.0",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "tauri": "tauri"
  },
  ...

Just tried, but I still get the same error.