Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Error in tauri.conf.json crashes dev server #5173

Closed
madflow opened this issue Sep 11, 2022 · 1 comment
Closed

[bug] Error in tauri.conf.json crashes dev server #5173

madflow opened this issue Sep 11, 2022 · 1 comment
Labels
priority: 1 high scope: cli.rs The tauri-cli rust crate status: backlog Issue is ready and we can work on it type: bug

Comments

@madflow
Copy link

madflow commented Sep 11, 2022

Describe the bug

An invalid value tauri.conf.json when running yarn run tauri devcrashes the dev server.

thing ➜ yarn run tauri dev
yarn run v1.22.19
$ tauri dev
`tauri.conf.json` error on `tauri > windows > 0 > height`: The value must be number
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

When trying to run yarn run tauri dev again - there is still a process running.

➜  yarn run tauri dev
yarn run v1.22.19
$ tauri dev
     Running BeforeDevCommand (`yarn dev`)
        Info Watching /xxx/src-tauri for changes...
$ vite
   Compiling xxx v0.0.0 (/src-tauri)
error when starting dev server:======> ] 325/326: xxx(bin)
Error: Port 1420 is already in use
    at Server.onError (file:////xxx/node_modules/vite/dist/node/chunks/dep-665b0112.js:52451:28)
    at Server.emit (node:events:527:28)
    at emitErrorNT (node:net:1399:8)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

The current fix is ps aux and kill.

Reproduction

  • I have create a new project with yarn create tauri-app.
  • I have selected the vanilla-ts template
  • I have installed all deps with yarn
  • Start yarn run tauri dev
  • Change the windows height in tauri.conf.json to an invalid value ("abc") and save

Expected behavior

I would expect a better developer experience. Either the dev server should exit cleanly or I should be able to kill all running processes with "tauri"

Platform and versions

Environment
  › OS: Mac OS 12.5.0 X64
  › Node.js: 16.15.1
  › npm: 8.13.1
  › pnpm: 7.5.2
  › yarn: 1.22.19
  › rustup: Not installed!
  › rustc: 1.63.0
  › cargo: 1.63.0
  › Rust toolchain:

Packages
  › @tauri-apps/cli [NPM]: 1.0.5
  › @tauri-apps/api [NPM]: 1.0.2
  › tauri [RUST]: 1.0.5,
  › tauri-build [RUST]: 1.0.4,
  › tao [RUST]: 0.12.2,
  › wry [RUST]: 0.19.0,

App
  › build-type: bundle
  › CSP: unset
  › distDir: ../dist
  › devPath: http://localhost:1420/

App directory structure
  ├─ node_modules
  ├─ src-tauri
  ├─ .vscode
  └─ src
✨  Done in 8.67s.

Stack trace

No response

Additional context

No response

@madflow madflow added status: needs triage This issue needs to triage, applied to new issues type: bug labels Sep 11, 2022
@FabianLars FabianLars added priority: 1 high status: backlog Issue is ready and we can work on it and removed status: needs triage This issue needs to triage, applied to new issues labels Sep 11, 2022
@Moon1102
Copy link

In my case (under Mac OS 11.4.0 X64), although the port is not occupied,but the original app has not been terminated. After change invalid number into a valid number, the new app process will be enabled on the new port, and I will get two apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: 1 high scope: cli.rs The tauri-cli rust crate status: backlog Issue is ready and we can work on it type: bug
Projects
None yet
Development

No branches or pull requests

4 participants