tauri
tauri copied to clipboard
[bug] Exception in creating a new window under Windows
Describe the bug
It's normal on Mac systems, but on Windows systems, when I click a button to create a new window, a blank page always appears。
Reproduction
#[tauri::command]
async fn open_pet_window(app: tauri::AppHandle) {
use tauri::webview::{NewWindowResponse, WebviewWindowBuilder};
let webview_window = tauri::WebviewWindowBuilder::new(&app.clone(), "label", tauri::WebviewUrl::App("mango_pet.html".into()))
.build()
.unwrap();
}
Expected behavior
Under the Mac system
Full tauri info output
[✔] Environment
- OS: Windows 10.0.22631 x86_64 (X64)
✔ WebView2: 142.0.3595.90
✔ MSVC: Visual Studio 生成工具 2022
✔ rustc: 1.90.0 (1159e78c4 2025-09-14)
✔ cargo: 1.90.0 (840b83a10 2025-07-30)
✔ rustup: 1.28.2 (e4f3ad6f8 2025-04-28)
✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
- node: 20.9.0
- yarn: 1.22.19
- npm: 10.1.0
[-] Packages
- tauri 🦀: 2.9.3
- tauri-build 🦀: 2.5.2
- wry 🦀: 0.53.5
- tao 🦀: 0.34.5
- tauri-cli 🦀: 2.9.4
- @tauri-apps/api ⱼₛ: 2.9.0
- @tauri-apps/cli ⱼₛ: 2.9.4
[-] Plugins
- tauri-plugin-process 🦀: 2.3.1
- @tauri-apps/plugin-process ⱼₛ: 2.3.1
- tauri-plugin-autostart 🦀: 2.5.1
- @tauri-apps/plugin-autostart ⱼₛ: not installed!
- tauri-plugin-shell 🦀: 2.3.3
- @tauri-apps/plugin-shell ⱼₛ: 2.3.3
- tauri-plugin-clipboard-manager 🦀: 2.3.2
- build-type: bundle
Stack trace
Additional context
No response
Hmm, usually it's https://docs.rs/tauri/latest/tauri/webview/struct.WebviewWindowBuilder.html#known-issues but you're already using an async command 🤔
Can you share the config or builder of your other open windows? Some configs can conflict across windows on Windows.
@FabianLars I upgraded Tauri to the latest version and now there are no issues. Thank you