[bug] WebView crashes on certain pages(STATUS ACCESS VIOLATION)
kanatapple opened this issue · 3 comments
kanatapple commented
Describe the bug
The WebView crashes when you load the certain page by doing the following in initialization script(WebviewWindowBuilder::initialization_script
).
Initialization script
document.addEventListener('DOMContentLoaded', () => {
window.__TAURI__.event.listen('test', (event) => {
console.log(event);
});
});
URL
I don't know if it will crash with other URLs, but it will definitely crash with the above URL.
Reproduction
https://github.com/kanatapple/tauri-status-access-violation.git
- yarn
- yarn tauri dev
Expected behavior
The page loads without crashing.
Full tauri info
output
[✔] Environment
- OS: Windows 10.0.19045 x86_64 (X64)
✔ WebView2: 129.0.2792.89
✔ MSVC:
- Visual Studio Professional 2017
- Visual Studio Professional 2019
✔ 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
- yarn: 1.22.11
- npm: 10.8.2
[-] Packages
- tauri 🦀: 2.0.5
- tauri-build 🦀: 2.0.1
- wry 🦀: 0.46.2
- tao 🦀: 0.30.3
- tauri-cli 🦀: 1.2.3
- @tauri-apps/api : 2.0.2
- @tauri-apps/cli : 2.0.3
[-] Plugins
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: http://localhost:1420/
- bundler: Vite
Stack trace
No response
Additional context
No response