mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
Blazor app Failed to load URL://localhost:8002/ #819
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @PPL-Ryan on GitHub (Aug 31, 2022).
Electron.NET CLI version: 13.5.1.0
Electron.NET API version: 13.5.1
Node version: 18.7.0
osx
I have an application built for windows and osx using ElectronNET and Blazor. Everything works fine on my windows machines but when I attempt to run the software on osx I got a blank white screen and the debug terminal says
"(node:14402) electron: Failed to load URL: http://localhost:8002/ with error: ERR_CONNECTION_REFUSED"
If I go to the menubar and click refresh the page loads and I get another message
"warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect."
I've tried cleaning my project, deleting the bin and obj folders, deleting the .vs folder, turning off firewall, configuring chrome, checking proxies, etc. nothing has worked so far and I'm not sure what to do anymore.
@PPL-Ryan commented on GitHub (Sep 9, 2022):
changing this line
var browserWindow = await Electron.WindowManager.CreateWindowAsync(browserWindowOptions);
to this
async void CreateWindow()
{
var window = await Electron.WindowManager.CreateWindowAsync(browserWindowOptions);
window.OnClosed += () => {
Electron.App.Quit();
};
}
fixed the issue