Closed MaKleSoft closed 4 years ago
Thank you for reporting it!
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 this The 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 extracting WebView2Loader.dll
from there.
Is there anything I can help with to diagnose this, @lucasfernog? Thank you!
Did you install the webview2 runtime?
Did you install the webview2 runtime?
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?
@noseratio can you provide 'tauri info' ? also try asking in our discord server we can help triage it faster there.
@noseratio can you provide 'tauri info' ? also try asking in our discord server we can help triage it faster there.
Operating System - Windows, version 10.0.22000 X64
Webview2 - 95.0.1020.44
Node.js environment
Node.js - 17.1.0
@tauri-apps/cli - 1.0.0-beta.10
@tauri-apps/api - 1.0.0-beta.8
Global packages
npm - 8.1.2
yarn - Not installed
Rust environment
rustc - 1.56.1
cargo - 1.56.0
App directory structure
/dist
/node_modules
/src-tauri
App
tauri.rs - 1.0.0-beta.8
build-type - bundle
CSP - default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
distDir - ../dist
devPath - ../dist
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).
Isn't that the "I'm using the gnu toolchain" error? .You can check the with
rustup toolchain list
for example.
That was it, thank you @FabianLars. I was indeed using MinGW, which I installed after my first attempt to npm run tauri build
failed with gcc.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 the WebView2Loader
issue.
Thanks again!
Describe the bug
Starting the Windows app fails with the message:
Screenshots
Platform and Versions (please complete the following information):