Verify Blazor Hybrid on Android doesn't log exceptions by default
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 290
Description
In https://github.com/dotnet/maui/issues/5750, we've had a report about Android apps logging a stack trace like:
```
[System] Uncaught exception thrown by finalizer
[System] java.lang.IllegalStateException: Warning: Router objects should be explicitly closed when no longer required otherwise you may leak handles.
[System] at UM.finalize(chromium-TrichromeWebViewGoogle.apk-stable-410410686:4)
[System] at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:291)
[System] at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:278)
[System] at java.lang.Daemons$Daemon.run(Daemons.java:139)
[System] at java.lang.Thread.run(Thread.java:923)
[System] Caused by: java.lang.Exception: AutocloseableRouter allocated at:
[System] at UM.(chromium-TrichromeWebViewGoogle.apk-stable-410410686:7)
[System] at EP.(chromium-TrichromeWebViewGoogle.apk-stable-410410686:6)
[System] at org.chromium.content.browser.framehost.RenderFrameHostImpl.(chromium-TrichromeWebViewGoogle.apk-stable-410410686:10)
[System] at org.chromium.content.browser.framehost.RenderFrameHostImpl.create(chromium-TrichromeWebViewGoogle.apk-stable-410410686:1)
[System] at J.N.MjidYpBx(Native Method)
```
We should verify that this doesn't apply to the default app, but rather is something specific to someone's browser application code. If BlazorWebView is actually leaking something by default we certainly want to fix that.
Contributor guide
Research direction
Use issue #5750 as reproduction context; run the default Blazor Hybrid app on Android and inspect whether it emits the shown finalizer exception. Compare this with an app containing browser-specific code, then document whether the default app logs it; done means confirming the behavior or identifying a default BlazorWebView leak.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100