Description
Describe the feature/enhancement you need
I'm running into a lot of problems UnauthorizedException
on WebView startup. I know what the problem is - most likely the environment folder is ending up somewhere it shouldn't and doesn't have permissions to write. My app provides an explicit path in %localappdata%
which in theory should always work but there are a lot of places where a WebView is instantiated including some places that are out of the base application's scope (add-ins).
The problem is that it's impossible to get any useful information about the failure. My app creates 15 different WebView instances internally at various times throughout the application cycle, some of them coming from external addins. I've gone through and tried as much as possible to homogenize the CreateAsync()
call that provides the browser environment with all of them using the same startup path and structure, but still I see these errors.
When they show up they come in like this:
There's no call stack and the UnAuthorizedException
has no further information.
The scenario/use case where you would use this feature
My request is to have this exception report more information - specifically the path and actual cause would be useful here (I'm not 100% sure it's the environment path but that would be my guess).
How important is this request to you?
Impactful, but not critical.
Suggested implementation
Provide an exception wrapper around the internal CreateAsync()
calls and provide more context in the exception message/data or a custom exception.
Other
FWIW, it's not just this exception but also invalid command line parameters passed into the environment that could benefit from this. Some context about instantiation would benefit any WebView creation errors!
What does your app do? Is there a pending deadline for this request?
It's a commercial desktop application and these errors are 95% of all errors reported, although the number is relatively small (about 2-4 a day out of 1000 users a day). These errors do cause hard stop so although the failure rate is low it has a negative impact.