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] Development Server Do Not Killed After Window Exited #4262

Closed
j4w3ny opened this issue Jun 3, 2022 · 4 comments · Fixed by #4416
Closed

[bug] Development Server Do Not Killed After Window Exited #4262

j4w3ny opened this issue Jun 3, 2022 · 4 comments · Fixed by #4416

Comments

@j4w3ny
Copy link

j4w3ny commented Jun 3, 2022

Describe the bug

When I exited the window, the app window was exited and terminated. But the development server didn't stop and continuously running on background until I manually kill the process.

Confirm that it exists on official cli create-react-app template.

Reproduction

  1. Create a testing repo with create-tauri-app [select create-react-app template]
  2. Run yarn tauri dev
  3. Close the window
  4. Repeat step 2 or check ports with netstat -nlpn

Expected behavior

No response

Platform and versions

$ tauri info

Environment
  › OS: Linux Soaring X64
  › Node.js: 16.15.0
  › npm: 8.5.5
  › pnpm: Not installed!
  › yarn: 1.22.18
  › rustup: 1.24.3
  › rustc: 1.61.0
  › cargo: 1.61.0
  › Rust toolchain: stable-x86_64-unknown-linux-gnu 

Packages
  › @tauri-apps/cli [NPM]: 1.0.0-rc.13
  › @tauri-apps/api [NPM]: 1.0.0-rc.6
  › tauri [RUST]: 1.0.0-rc.14,
  › tauri-build [RUST]: 1.0.0-rc.12,
  › tao [RUST]: 0.9.1,
  › wry [RUST]: 0.17.0,

Stack trace

No response

Additional context

No response

@FabianLars
Copy link
Member

FabianLars commented Jun 3, 2022

I think we will never get rid of all variations of this issue 😭

Thanks for the report.

@PeytonHanel
Copy link

I'm having this same problem too, using Yarn with Vite+Svelte on Ubuntu.

@rgwood
Copy link

rgwood commented Jun 18, 2022

Same on Fedora with NPM, Vite, React+TypeScript (just the template created using npx create-tauri-app). I'm not able to reproduce the issue on Windows.

One unfortunate twist is that the development server stays partially attached to my terminal; I can go back to my terminal prompt and run commands, but then if I save a .tsx file my whole terminal is overwritten with 7:33:51 p.m. [vite] hmr update /src/App.tsx or similar.

Environment
  › OS: Fedora 36.0.0 X64
  › Node.js: 16.15.1
  › npm: 8.8.0
  › pnpm: Not installed!
  › yarn: 1.22.19
  › rustup: 1.24.3
  › rustc: 1.61.0
  › cargo: 1.61.0
  › Rust toolchain: stable-x86_64-unknown-linux-gnu 

Packages
  › @tauri-apps/cli [NPM]: 1.0.0
  › @tauri-apps/api [NPM]: 1.0.1
  › tauri [RUST]: 1.0.0,
  › tauri-build [RUST]: 1.0.0,
  › tao [RUST]: 0.11.2,
  › wry [RUST]: 0.18.3,

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

App directory structure
  ├─ src
  ├─ node_modules
  └─ src-tauri

@KaKi87
Copy link

KaKi87 commented Jun 18, 2022

Hello,

I'm experiencing the same issue when running a bundler from a Node script : it never receives SIGTERM when quitting the app by closing its main window, although it exits successfully when pressing Ctrl+C in terminal.

I'll eventually create another reproduction repo with a Node script that runs a simple HTTP server with no bundler.

Thanks

@lucasfernog lucasfernog linked a pull request Jun 21, 2022 that will close this issue
13 tasks
lucasfernog added a commit that referenced this issue Jun 21, 2022
Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.studio>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants