Bug: Exception is thrown when previewing html files
See original GitHub issueDescription
In my other app’s tests, even if I called Ensure-- method before calling NavigateToString, WebView2 throw an exception that is something like ‘Method was called unexpected time’. So notice that WebView2 is still surprisingly unstable and has bad developer experience.
https://github.com/microsoft/microsoft-ui-xaml/issues/3714
Steps To Reproduce
- Go to the directry that contains html file.
- View its preview
Steps to fix
- As the title: call EnsureCoreWebView2Async before calling other WebView2-related methods such as navigateToString.
Files Version
Latest version
Windows Version
Windows 11 21H1
Relevant Assets/Logs
Although I added like following screenshot, sometimes still WebView2 doesn’t load its own html string with an exception InvalidOperationException.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How can I redirect to a html file inside a exception?
1 Answer 1 ; @ResponseStatus(HttpStatus.NOT_FOUND) @ExceptionHandler(NoCordInRouteFoundException.class) ; public · noCordInRouteFound ; return " ...
Read more >Live Preview Error - Not detecting index.html files or ...
Live Preview Error - Not detecting index.html files or html files with ... After trying few times, it throws Max connection attempts reached....
Read more >Unable to preview file changes or prevent files from being ...
An error has occured downloading file. Unchecking files in publish preview results in being published anyway. Is there a way to rollback to ......
Read more >Fix JavaScript errors that are reported in the Console
Open the demo webpage JavaScript error reported in the Console tool in a new window or tab. Right-click anywhere in the webpage and...
Read more >Problems to preview attachments in Confluence, Error ...
Diagnosis. Attachments can't be previewed and aren't displayed on pages. It's possible to find more about the problem by analyzing the file ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Of course, I would do. However I have little time these days.
@yaira2 I can’t reproduce this bug anymore. It seems this was fixed back in #10573