Closed RyanWalpole closed 1 year ago
Fix did not actually fix anything. Might be that the WebView2 cannot generate user data folders being in the program files folder? This could be a permissions issue. Going to try the following:
Proposed Resolution
public Example()
{
InitializeComponent();
InitializeBrowser();
}
private async Task InitializeBrowser()
{
var userDataFolder =
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\RWE Labs\SDVMM\WV2\";
var env = await CoreWebView2Environment.CreateAsync(null, userDataFolder);
await webView.EnsureCoreWebView2Async(env);
webView.Source = new Uri("https://example.com") ;
}
Fix did not actually fix anything. Might be that the WebView2 cannot generate user data folders being in the program files folder? This could be a permissions issue. Going to try the following:
Proposed Resolution
public Example() { InitializeComponent(); InitializeBrowser(); } private async Task InitializeBrowser() { var userDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\RWE Labs\SDVMM\WV2\"; var env = await CoreWebView2Environment.CreateAsync(null, userDataFolder); await webView.EnsureCoreWebView2Async(env); webView.Source = new Uri("https://example.com") ; }
Didn't actually finish comment. The proposed solution is to asynchronously create a new user data folder in the appdata where it should be accessible and read/writeable no matter what.
The Issue or Bug
The Stardew Valley WebTools UI loads a blank window and then has an unhandled exception
Version
221001
Operating System
Windows 11
Steps to reproduce the behavior
Log Files
Screenshots
Additional Context
No response
Suggested Resolution
No response