Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows 10,cannot run examples #410

Closed
adminSxs opened this issue Sep 6, 2021 · 6 comments
Closed

windows 10,cannot run examples #410

adminSxs opened this issue Sep 6, 2021 · 6 comments

Comments

@adminSxs
Copy link

adminSxs commented Sep 6, 2021

Os: win10 19042.1165
toolchain: stable-x86_64-pc-windows-msvc
rustc: 1.54.0
when I clone source code from github, and run cargo run --example multi_window, show below error

Error: WebView2Error(webview2 error, HRESULT 0x80070002)
error: process didn't exit successfully: `target\debug\examples\multi_window.exe` (exit code: 1)
@wusyong
Copy link
Member

wusyong commented Sep 6, 2021

WebView2 is required on Windows. Did you install the bootstrapper yet?
https://developer.microsoft.com/en-US/microsoft-edge/webview2/#download-section

@wusyong
Copy link
Member

wusyong commented Sep 16, 2021

I'm going to assume it's because of missing webview2 and close this. Please re-open it if it's still the same after installing it.

@PrimeDominus
Copy link

Having installed the evergreen bootstrapper as directed on https://tauri.studio/docs/get-started/setup-windows#4-install-webview2 and also rebooted, but when npm run tauri info is run it says:

Operating System - Windows, version 10.0.19042 X64
Webview2 - Not installed

Then, after running our react app in dev mode, npm run tauri dev is run which states the following after building crates:

Compiling app v0.1.0 (C:\Users\proda\OneDrive\Documents\lfcgh\appointment-frontend\src-tauri)
    Finished dev [unoptimized + debuginfo] target(s) in 7.67s
     Running `target\debug\app.exe`
error: could not execute process `target\debug\app.exe` (never executed)

Caused by:
  This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher. 
(os error 216)

Are we supposed to somehow include WebView2 bootstrapper into the Tauri app directly? If so, how? If not, how does one resolve this issue?

@FabianLars
Copy link
Member

@PrimeDominus This error typically means that you have the wrong version of MS Build Tools installed.
You need at least version 2019.
Also, having multiple versions can cause problems too.

@PrimeDominus
Copy link

Thank you, @FabianLars. For those experiencing this issue, as suggested we've ensured all our individual MS Build Tools components are the latest version, and none are the 2017 version. Furthermore, we must install WebView2 with elevated permissions (i.e. Run as Administrator), which is required due to a bug currently with the WebView2 installer MicrosoftEdge/WebView2Feedback#2030

@FabianLars
Copy link
Member

@PrimeDominus Good to hear that it works. 👍
About the WV2 installer tho. This is not a bug, but a design choice. We already adapted to that change in tauri's next branch, but this also shouldn't concern you in dev environments because it's only a problem for tauri info (the one you posted) and the .msi installer (the one you get from tauri build for your app).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants