Comments (10)
I'll try to reproduce this.
from web-view.
So I looked a bit into this, first i thought maybe it was an older sdk, but you have the same version as me 10.0.18362.0. I remember I had problems with with compiler from MSVC 2017, could you try installing 2019 Build Tools (no need for the whole Visual Studio) and try if it fixes the issue?
from web-view.
I already have Visual Studio 2019 installed and as far as I know I'm using the latest build tools. I tried building from the "Developer Command Prompt for VS 2019" and "x64 Native Tools Command Prompt for VS 2019", with no difference. Did you see something that indicates that I'm using MSVC 2017?
from web-view.
Did you see something that indicates that I'm using MSVC 2017?
No it's just that I remember having problems with that.
I cannot reproduce this yet, I'll try again when I have more energy to delve deeper.
from web-view.
I have the same problem, with everything installed as suggested in the readme.
EDIT: I've experienced the issue on my laptop, but not my desktop PC. Both are on windows 10.
from web-view.
I have a very similar problem, possible related but not exactly the same stack.
The webview starts and closes almost instantly without any information, when debugging with visual studio, it is clear that there is an exception internal to webview-sys navigate function.
void navigate(const char* url)
{
std::string html = html_from_uri(url);
if (html != "") {
m_webview.NavigateToString(winrt::to_hstring(html.c_str()));
} else {
Uri uri(winrt::to_hstring(url));
m_webview.Navigate(uri); <------ HERE
}
}
Then further down windows sdk will try to convert the exception using to_hresult()
, which in turn calls a std::terminate()
. I'll missed which was the exception, I'll try to collect more info once I'm at the problematic machine.
Windows SDK 10.0.18362.0
from web-view.
Hey,
I experienced the issue myself when trying to load a local file using the edge feature. In particular:
- Everything works correctly when loading a remote url, such as
https://google.com
- When I try to open a local file using the
file:
uri prefix, the same crash happens.
Steps to reproduce:
- Create a local file
index.html
with the following content:
<html lang="en">
<head>
<title>Hello</title>
</head>
<body>
Hello
</body>
</html>
- Load the file using the File URI path:
web_view::builder()
.title("My Project")
.content(Content::Url("file:///C:/Users/Freddy/Documents/testgui/index.html"))
.size(700, 480)
.resizable(true)
.user_data(())
.invoke_handler(|_webview, _arg| Ok(()))
.run()
.unwrap();
The script will crash with exit code: (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)
I'll try to dig myself into the code to find the root of the issue.
I'm running Visual Studio 2019
Cheers
from web-view.
Following up to my previous comment, it turns out my use case (loading a file using the file://
protocol uri) is not currently possible. See CommunityToolkit/WindowsCommunityToolkit#2211
from web-view.
Hopefully this will be fixed, when we switch to Edge Preview, I am working on it.
from web-view.
Glad to hear that @Zxey, thanks for your reply
from web-view.
Related Issues (20)
- Examples not working correctly on Ubuntu 20.04. No interactivity. HOT 1
- Navigation between pages in my app HOT 1
- How to load url?
- Facilitate using step() while processing other events
- alert(), confirm(), and console.log() extremely slow and distorted on Ubuntu 20.04 HOT 1
- Way to get current URL?
- Debug mode dumps HTML on every console message HOT 1
- Is there a ready event?
- Is this browser ready?
- Is there a way to access the true file system path when using a "Browse" button on webview?
- [Solved] Compilation fails with Edge feature enabled HOT 1
- Hovering over an image for alt text causes `NSException` on macOS 12.1 w/ M1
- Is multitouch supported? HOT 1
- Android? iOS?
- Make a fork and cooperate to maintain this crate! HOT 1
- box-shadow wrongly displayed
- iframe support?
- Corrupted files
- Is there a way to open two webview windows without crashing? HOT 1
- external.invoke returns undefined instead of promise on Windows 10 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web-view.