Closed
Description
Describe the bug
Starting the Windows app fails with the message:
The code execution cannot proceed because WebView2Loader.dll was not found. Reinstalling the program may fix this problem.
Screenshots
Platform and Versions (please complete the following information):
[tauri]: running info
Operating System - Windows_NT(10.0.19041) - win32/x64
Microsoft Edge - 44.19041.1.0_neutral__8wekyb3d8bbwe
Node.js environment
Node.js - 12.18.2
tauri.js - 0.10.0
Rust environment
rustc - 1.45.0
cargo - 1.45.0
tauri-bundler - 0.9.0
Global packages
NPM - 6.14.5
yarn - Not installed
App directory structure
/dist
/node_modules
/src
/src-tauri
App
tauri.rs - 0.8.0
mode - embedded-server
build-type - bundle
CSP - default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline'
distDir - ../dist
devPath - http://localhost:8080
Activity
fix(bundler) webview dll not being bundled, fixes #875
lucasfernog commentedon Jul 24, 2020
Thank you for reporting it!
noseratio commentedon Nov 14, 2021
I've just tried
npx create-tauri-app
on fresh Windows 11 OS (I did follow "Setup for Windows" for prereqs). The build completes OK, but I'm still getting thisThe code execution cannot proceed because WebView2Loader.dll was not found
error:I get it both when running
.\tauri-app\src-tauri\target\release\tauri-app.exe
and when installing.\tauri-app\src-tauri\target\release\bundle\msi\tauri-app_0.1.0_x64.msi
and running it from the installed location.I was able to run the app by downloading
microsoft.web.webview2.1.0.1020.30.nupkg
and extractingWebView2Loader.dll
from there.Is there anything I can help with to diagnose this, @lucasfernog? Thank you!
lucasfernog commentedon Nov 14, 2021
Did you install the webview2 runtime?
noseratio commentedon Nov 14, 2021
I did and verified that, my Blazor/Desktop "hello world" app worked out of the box.
Although I don't think I should have manually installed the WebView2 runtime under Windows 11, doesn't it come bundled with that OS?
amrbashir commentedon Nov 14, 2021
@noseratio can you provide 'tauri info' ? also try asking in our discord server we can help triage it faster there.
noseratio commentedon Nov 14, 2021
FabianLars commentedon Nov 14, 2021
Isn't that the "I'm using the gnu toolchain" error? .You can check the with
rustup toolchain list
for example.It used to work but as you already found out, the dll download doesn't work anymore.
The imo best "workaround" would be to use the msvc toolchain instead, cause that's also more future proof considering that the new bindings used on the
next
branch seemingly don't work at all with the gnu toolchain.Otherwise downloading the dll manually and placing them in the target folder before bundling should work on the current release (tauri should pull it into the msi automatically if it's there).
noseratio commentedon Nov 14, 2021
That was it, thank you @FabianLars. I was indeed using MinGW, which I installed after my first attempt to
npm run tauri build
failed withgcc.exe was missing
message. Though I did have Visual Studio 2019 installed.Now I've reinstalled "Visual Studio 2019 Build Tools" (
choco install visualstudio2019buildtools
), "Visual C++ build tools workload" (choco install visualstudio2019-workload-vctools
),rustup
, and then was able to built and run the app without theWebView2Loader
issue.Thanks again!
mukul-a commentedon Mar 18, 2025
I am facing this issue now in 2025, Tauri info is as below
I am able to the bundle sis, however when I try to launch the install app, I get WebView2Loader.dll not found error