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.

Blazor Hybrid WinForms apps give error if there's an ErrorBoundary

See original GitHub issue

Description

Ironically it’s the ErrorBoundary that causes the error.

image

This may also affect WPF/MAUI but I haven’t tried those yet.

Steps to Reproduce

Put <ErrorBoundary> inside a Blazor Hybrid WinForms app.

Fix: We need to add a default IErrorBoundaryLogger to the DI container. Presumably it should just log to console.

Version with bug

Preview 12 (current)

Last version that worked well

Unknown/Other

Affected platforms

Other (Tizen, Linux, etc. not supported by Microsoft directly)

Affected platform versions

All

Did you find any workaround?

No response

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
javiercncommented, Feb 4, 2022

@SteveSandersonMS As long as we use ILogger I think it’s fine.

Then people can choose whether to log to the console or a different ILogger implementation, my point was about doing something like Console.WriteLine by default; Although we should ask/figure the Maui/WF/WPF story for logging to make sure we have a proper E2E.

1reaction
javiercncommented, Mar 2, 2022

@Eilon we should patch this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handle errors in ASP.NET Core Blazor apps
Error boundaries provide a convenient approach for handling exceptions. The ErrorBoundary component: Renders its child content when an error ...
Read more >
Blazor Best Practices: Handling Errors
Error boundaries can contain unhandled exceptions and keep your Blazor Server app running even though one component has failed. Whether you're ...
Read more >
Blazor WebAssembly Exception Handling With Error ...
Blazor WebAssembly Error Boundaries allow us to manage unhandled exceptions and display custom error UI when an unhandled exception occurs.
Read more >
Catch and display on the page any error in a .NET Maui ...
Trying to decipher the error, on first look, it seems that the type ErrorBoudary that you inherit needs a dependency that is not...
Read more >
Global exception handling with MessageBoxes : r/Blazor
There is a out-of-the-box component called ErrorBoundary. It allows you to catch exceptions thrown by UI or logic called by child components. By ......
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