Skip to content

System Error upon starting Windows app #875

Closed
@MaKleSoft

Description

@MaKleSoft

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

Screenshot 2020-07-21 at 17 27 03

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

added a commit that references this issue on Jul 24, 2020
feb563b
lucasfernog

lucasfernog commented on Jul 24, 2020

@lucasfernog
Member

Thank you for reporting it!

noseratio

noseratio commented on Nov 14, 2021

@noseratio

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:

image

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!

lucasfernog

lucasfernog commented on Nov 14, 2021

@lucasfernog
Member

Did you install the webview2 runtime?

noseratio

noseratio commented on Nov 14, 2021

@noseratio

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?

amrbashir

amrbashir commented on Nov 14, 2021

@amrbashir
Member

@noseratio can you provide 'tauri info' ? also try asking in our discord server we can help triage it faster there.

noseratio

noseratio commented on Nov 14, 2021

@noseratio

@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
FabianLars

FabianLars commented on Nov 14, 2021

@FabianLars
Member

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

noseratio commented on Nov 14, 2021

@noseratio

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!

deleted a comment from pakinming on May 10, 2022
mukul-a

mukul-a commented on Mar 18, 2025

@mukul-a

I am facing this issue now in 2025, Tauri info is as below

Image

I am able to the bundle sis, however when I try to launch the install app, I get WebView2Loader.dll not found error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @MaKleSoft@noseratio@lucasfernog@FabianLars@amrbashir

        Issue actions

          System Error upon starting Windows app · Issue #875 · tauri-apps/tauri