DioxusLabs / DioxusLabs/dioxus

Bundled app panics on startup due to webview.rs "Access is denied."

Open
#3,679 6 comments 2 reactions 0 assignees View on GitHub
bug bundle windows
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

**Problem**

When I try to run my program after installing it from the `.msi` bundle a command prompt appears for a split second and then disappears. When running my program via terminal, I see the following message:

```txt
$ ./cat.exe
thread 'main' panicked at C:\Users\[redacted]\.cargo\registry\src\index.crates.io-6f17d22bba15001f\dioxus-desktop-0.6.2\src\webview.rs:397:39:
called `Result::unwrap()` on an `Err` value: WebView2Error(WindowsError(Error { code: HRESULT(0x80070005), message: "Access is denied." }))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

Since I noticed "Access is denied" in the reason, I tried to run my program with elevated privileges (admin), and I got a following popup:

![Image](https://github.com/user-attachments/assets/9c82d8fb-97be-4080-8c43-738067fbbe15)

**Steps To Reproduce**

Steps to reproduce the behavior:
- `dx bundle --platform windows`
- Install the program through the produced `.msi` file
- Open the installed program, and observe brief moment where command prompt shows up

**Expected behavior**

I expect my program to open instead of panicking.

**Screenshots**

Click to expand




**Environment:**
- Dioxus version: 6.2.0 (both `dioxus` & `dioxus-cli`)
- Rust version: 1.84.1
- OS info: Windows 11
- App platform: Desktop

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.