tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
81.79k stars 2.45k forks source link

[bug] Failed to start a development server #4230

Closed kfiven closed 2 years ago

kfiven commented 2 years ago

Describe the bug

After updating

tauri from 1.0.0-rc.9 to 1.0.0-rc.14 tauri-build from 1.0.0-rc.8 to 1.0.0-rc.12

@tauri-apps/cli from 1.0.0-rc.10 to 1.0.0-rc.13 @tauri-apps/api from 1.0.0-rc.5 to 1.0.0-rc.6

The dev server of tauri app fails with the following error:

thread 'main' panicked at 'error while running tauri application: Runtime(CreateWebview(We }))))', src\main.rs:17:6Error { code: 0x80004002, message: No such interface supported
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\cinny.exe` (exit code: 101)

Reproduction

No response

Expected behavior

No response

Platform and versions

Environment
  › OS: Windows 10.0.22000 X64
  › Webview2: 90.0.818.66
  › MSVC:
      - Visual Studio Build Tools 2019
  › Node.js: 17.6.0
  › npm: 8.5.1
  › pnpm: Not installed!
  › yarn: 1.22.17
  › rustup: 1.24.3
  › rustc: 1.61.0
  › cargo: 1.61.0
  › Rust toolchain: stable-x86_64-pc-windows-msvc

Packages
  › @tauri-apps/cli [NPM]: 1.0.0-rc.13
  › @tauri-apps/api [NPM]: 1.0.0-rc.6
  › tauri [RUST]: 1.0.0-rc.14,
  › tauri-build [RUST]: 1.0.0-rc.12,
  › tao [RUST]: 0.9.1,
  › wry [RUST]: 0.17.0,

App
  › build-type: bundle
  › CSP: script-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
  › distDir: ../cinny/dist
  › devPath: http://localhost:8080/

App directory structure
  ├─ .git
  ├─ .github
  ├─ cinny
  ├─ node_modules
  ├─ resources
  ├─ scripts
  └─ src-tauri

Stack trace

No response

Additional context

No response

kfiven commented 2 years ago

I have also done cargo update (as suggested in Discord chat) but it didn't fixed the issue.

FabianLars commented 2 years ago

i could imagine that this is because of the old webview2 version, maybe it's incompatible with the newer bindings. Buuut i don't know why it's outdated in the first place, because windows 11 should use the evergreen version (the auto-updated one) 🤔

lucasfernog commented 2 years ago

Your webview2 is super old, mine is 101.0.1210.53.

lucasfernog commented 2 years ago

Seems like the minimum version we support is 101.0.1210.39: https://raw.githubusercontent.com/wravery/webview2-rs/main/crates/bindings/src/Microsoft/Web/WebView2/Win32/mod.rs

kfiven commented 2 years ago

sorry to ask this, but how is this supposed to get updated? Updated windows itself to the latest, updated all apps from the store including edge, also tried to download webview2 manually but it says a webview2 is already installed.

FabianLars commented 2 years ago

That's the thing, it's really supposed to update itself and iirc I didn't saw this problem before.

Did you try executing the WebView2 installer (evergreen) explicitly with elevated permissions? It has 2 install "modes" that's why it may be worth a shot.

kfiven commented 2 years ago

Ok, giving it elevated permission installed version 101.0.1210.53 and now the dev server works fine. Feel free to close.