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.

Bug: Exception is thrown when previewing html files

See original GitHub issue

Description

https://github.com/files-community/Files/blob/d4bb3e867cf7f52bf9ddc184501a993e3ccb40c5/src/Files.App/UserControls/FilePreviews/HtmlPreview.xaml.cs#L10-L25

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

  1. Go to the directry that contains html file.
  2. 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.

image

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
0x5bfacommented, Oct 30, 2022

Of course, I would do. However I have little time these days.

1reaction
ferrariofilippocommented, May 14, 2023

@yaira2 I can’t reproduce this bug anymore. It seems this was fixed back in #10573

Read more comments on GitHub >

github_iconTop 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 >

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