Terminal Window Briefly Opens and Closes During Tauri App Runtime in Production on Windows #11446
-
Hello everyone, I’m encountering an issue where a terminal window briefly opens and closes intermittently during runtime of my Tauri app in production (Windows). This does not happen during the build process; the build completes without issues. However, once the app is running in production mode, the terminal window flashes open and immediately closes at random intervals. This behavior only occurs in production, not during development. I suspect that some background process might be unintentionally causing a terminal window to spawn. Has anyone else faced a similar issue in production environments on Windows? Could this be linked to specific plugins, background tasks, or external dependencies? I noticed that this occurs since I used the OPENSSL dependency. In earlier Tauri-RC Versions this problem also didn't happen. Any help or suggestions on how to prevent the terminal window from appearing while the app is running would be greatly appreciated! I also found this topic which is about Commands and creation flags but I don't run a command with my custom code:
[package]
name = "app"
version = "0.1.0"
description = "A Tauri App"
authors = ["you"]
license = ""
repository = ""
edition = "2021"
rust-version = "1.71"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "app_lib"
crate-type = ["staticlib", "cdylib", "lib"]
[build-dependencies]
tauri-build = { version = "2.0.2", features = [] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "2.0.6", features = [] }
tauri-plugin-fs = {version = "2.0.3"}
tauri-plugin-os = {version = "2.0.1"}
#tauri-plugin-http = "2.0.3"
#tauri-plugin-shell = { version = "2.0.2" }
dirs = "5.0.1"
#pnet = { version = "0.35.0" }
sha2 = "0.10.8"
rusqlite = {version = "0.32.1", features = ["bundled-sqlcipher", "serde_json"] }
openssl-sys = { version = "0.9.104", features = ["vendored"] }
[profile.release.package.wry]
debug = true
debug-assertions = true
[✔] Environment
- OS: Windows 10.0.22631 x86_64 (X64)
✔ WebView2: 130.0.2849.46
✔ MSVC:
- Visual Studio Build Tools 2022
- Visual Studio Community 2022
✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
- node: 20.17.0
- npm: 10.8.2
[-] Packages
- tauri 🦀: 2.0.6
- tauri-build 🦀: 2.0.2
- wry 🦀: 0.46.3
- tao 🦀: 0.30.3
- @tauri-apps/api : 2.0.3
- @tauri-apps/cli : 2.0.5
[-] Plugins
- tauri-plugin-fs 🦀: 2.0.3
- @tauri-apps/plugin-fs : 2.0.1
- tauri-plugin-os 🦀: 2.0.1
- @tauri-apps/plugin-os : 2.0.0
[-] App
- build-type: bundle
- CSP: default-src 'self'; script-src 'self' data: mediastream: blob: filesystem: https: 'unsafe-inline' 'unsafe-eval'; style-src 'self' data: 'unsafe-inline' https://fonts.googleapis.com; img-src 'self'; media-src 'self' data:; font-src 'self' data: https://fonts.gstatic.com; object-src 'self' data:; connect-src 'self' https://api.example.com ipc: tauri: http://localhost:* http://ipc.localhost;
- frontendDist: ../dist/angular-proj/browser
- devUrl: http://localhost:4200/
- framework: Angular
- bundler: Webpack This is how it looks like when the terminal opens for just a millisecond: Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Having the same problem! Looks like support is not provided at all. |
Beta Was this translation helpful? Give feedback.
Sorry, thats my bad - I actually found the solution.
In my case it was the same problem as in #9719
I implemented a function (which I completely forgot) that created and executed a command - The solution is to set the creation flag like in the code below.