question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTML failing to render on Windows 10

See original GitHub issue

Prelude

I’m quite new to Rust so it’s very likely I’ve missed something simple! If that’s the case I’ll apologise now in advance! Any suggestions on how I can provide more information, or further diagnose the issue please do let me know.

System Information: Windows 10 Pro 10.0.18362

The Issue

The issue I’m having is that my example-project application won’t render any HTML (it just shows an empty application window) when I execute: cargo run. Interestingly enough though it works perfectly if I run the example_project.exe in the /target/debug directory.

As a side note, if I try to interact with the application window created by cargo run (for example by minimising it) I will get the following fault in my console:

error: process didn't exit successfully: `target\debug\example_project.exe` (exit code: 0xc000041d)

This is probably just a red-herring due to the application being in some unintended state, but for the sake of completeness the application error I get in the Event Viewer is as follows:

Faulting application name: wwahost.exe, version: 10.0.18362.1, time stamp: 0xd44a1ada
Faulting module name: wwahost.exe, version: 10.0.18362.1, time stamp: 0xd44a1ada
Exception code: 0xc0000409
Fault offset: 0x0000000000089f9d
Faulting process id: 0x7034
Faulting application start time: 0x01d5a3c28cde3547
Faulting application path: C:\Windows\System32\wwahost.exe
Faulting module path: C:\Windows\System32\wwahost.exe
Report Id: 7c263c14-97b5-483c-9848-4591a0fa6f63
Faulting package full name: Microsoft.Win32WebViewHost_10.0.18362.449_neutral_neutral_cw5n1h2txyewy
Faulting package-relative application ID: DPI.Unaware

Full Context

Using a slightly modified elm-counter.rs file as an example I have the following main.rs file:

use web_view::*;

fn main() {
    let file_content = include_str!("index.html");
    println!("Hello World \n\n {}", file_content);
	
    web_view::builder()
        .title("Example Project")
        .content(Content::Html(file_content))
        .size(320, 480)
        .resizable(false)
        .debug(true)
        .user_data(())
        .invoke_handler(|_webview, _arg| Ok(()))
        .run()
        .unwrap();
}  

And an index.html file in the same (src) directory:

<html><body><h1>Test</h1></body></html>

The only dependency I have defined in my Cargo.toml file is web-view, but I don’t think anything else is required:

[dependencies]
web-view = { version = "0.5.4", features = ["edge"] }

Thank you for your time!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
sopiumcommented, Dec 25, 2019

Are you running as Administrator? Edge webview does not work when run as Administrator.

https://github.com/windows-toolkit/Microsoft.Toolkit.Win32/issues/50

2reactions
MichaelSearsoncommented, Nov 28, 2019

Gotcha. Cheers for clariying!

If there’s no objections I’ll fork this repo and update the documentation to be a bit more comprehensive for newcomers such as myself. I’ll see if I can raise a PR sometime this week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

window 10 browsers render error - stretched - Microsoft Q&A
In the Desktop , right click and click on Display settings and under Display and try change the Display resolution and see if...
Read more >
Webbrowser control sometimes failed to render html in mult ...
Hi all,. Because webbrowser control is for STA, I create a form which has webbrowser control within a thread execution.
Read more >
ALL browsers fail to render [some] pages correctly: tried
ALL browsers fail to render [some] pages correctly: tried all Windows browsers. There is something odd with my new laptop with NVIDIA ...
Read more >
Problem rendering HTML emails in Windows 10 Mail and ...
Problem rendering HTML emails in Windows 10 Mail and Calendaring app · Go to the Windows 10 Mail app. · 2. Go to...
Read more >
IE11 - web pages render incorrectly - TechNet - Microsoft
Running current W7 Home Premium 64bit on an HP desktop. I upgraded current IE10 (which was running OK) to current IE11 and now...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found