Skip to content

[bug] yarn tauri dev window crashes and restart with no any error message printed. #5417

@Tnze

Description

@Tnze

Describe the bug

  1. When using yarn tauri dev, the window closes after executing a tauri::command and automatically reopen. With no any panic message.
  2. When yarn build and then using cargo run, the program works just fine, no any error occurs. Which is wired.

I guess this is a bug of @tauri/cli.

Reproduction

  1. git clone https://github.com/Tnze/ffxiv-best-craft.git
  2. git checkout e804ed40496595fb3143f38bf641b2f62c15dc07
  3. yarn install
  4. yarn tauri dev
  5. Click the second button
    image

Expected behavior

Expecte the cli doesn't close and reopen my window.

Platform and versions

yarn-run-tauri 1.1.1
   Node.js: 18.10.0
   npm: 8.19.2
   pnpm: Not installed!
   yarn: 3.2.1
   rustup: 1.25.1
   rustc: 1.66.0-nightly
   cargo: 1.66.0-nightly
   Rust toolchain: nightly-x86_64-pc-windows-msvc

Packages
   @tauri-apps/cli [NPM]: 1.1.1
   @tauri-apps/api [NPM]: 1.1.0
   tauri [RUST]: 1.1.1,
   tauri-build [RUST]: 1.1.1,
   tao [RUST]: 0.14.0,
   wry [RUST]: 0.21.1,

App
   build-type: bundle
   CSP: unset
   distDir: ../dist
   devPath: http://localhost:5173/
   framework: Vue.js

App directory structure
  ├─ .git
  ├─ .vscode
  ├─ .yarn
  ├─ dist
  ├─ node_modules
  ├─ public
  ├─ src
  └─ src-tauri

Stack trace

DOESN'T EXIST

Additional context

The tauri::command executed is this one:

https://github.com/Tnze/ffxiv-best-craft/blob/e804ed40496595fb3143f38bf641b2f62c15dc07/src-tauri/src/main.rs#L107-L111

The defining of app_state is tauri::State<'_, AppState> which has to write a '_ lifetime for pass the compiling. That is different from other commands. Is that expected?

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