mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Failed to load URL: http://localhost:8001/ with error: ERR_CONNECTION_RESET #876
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 @nazar322 on GitHub (Apr 15, 2023).
Originally assigned to: @GregorBiswanger on GitHub.
After updating Electron.NET to 23.6.1 I can't no longer start my app, I have this error all the time
Got disconnect! Reason: transport close (node:16976) electron: Failed to load URL: http://localhost:8001/ with error: ERR_CONNECTION_RESET (Use electron --trace-warnings ... to show where the warning was created)how can I add --trace-warnings to electron?
This is how I launch the app
electronize start /args "--remote-debugging-port=9222" /dotnet-configuration "Release_Windows"I have tried running it like this
electronize start /args "--remote-debugging-port=9222 --trace-warnings" /dotnet-configuration "Release_Windows"but it did not change anything in the output@nazar322 commented on GitHub (Apr 15, 2023):
Not a bug looks like but I have asked at Gitter and no one replied.
@nazar322 commented on GitHub (Apr 15, 2023):
@nazar322 commented on GitHub (Apr 15, 2023):
In TCPView I see that port 8001 has been created and connected by electron.exe but a few seconds later the port gets closed and
Got disconnectedis shown.@GregorBiswanger commented on GitHub (Apr 15, 2023):
Do you have the Electron.NET CLI in the same version 23.6.1 also?
Delete the
obj/hostfolder please and try again.@nazar322 commented on GitHub (Apr 15, 2023):
I have the CLI installed

Deleting
obj/hostdid not help@GregorBiswanger commented on GitHub (Apr 15, 2023):
You can reproduce the issue in a MRE that you can give us in form of a GitHub repository (such that we only need to clone and open to see the issue appearing on our machines)
@nazar322 commented on GitHub (Apr 18, 2023):
I'm on it...
@nazar322 commented on GitHub (Apr 18, 2023):
I have stripped the project I am working on and that causing the problem
https://drive.google.com/file/d/1PpT-JREP-1Qp5ViJ6r568BDbIsD6df4e/view?usp=share_link
Video recording
https://drive.google.com/file/d/19wtVQj8AlSFF9rQLtjRG87e0XKNUp2NA/view?usp=share_link
You can see on the video that the splash screen (via electron.manifest.json) is shown, next it disappears but the main window is not shown + 8001 port been opened.
Ignore JIT debug pop-up, I have
System.Diagnostics.Debugger.Launch();inMain.electronize start /args "--remote-debugging-port=9222" /dotnet-configuration "Release_Windows"from the Frontend folder as shown in the video.
@GregorBiswanger commented on GitHub (Apr 18, 2023):
The first thing that strikes me is that Electron is having trouble accessing the default URL. If I want to start the frontend project alone in Visual Studio, I get error messages.
My tip: Remove the SPA Services and integrate Angular manually. You free yourself from this built-in dependency, which always leads to problems. You can find enough tutorials online on how to integrate Angular with ASP.NET Core WITHOUT SPA Services. As soon as the project can be run normally in the browser without electron, your example will work again with Electron.NET.
@nazar322 commented on GitHub (Apr 18, 2023):
@GregorBiswanger I'll try it, thanks!
@GregorBiswanger commented on GitHub (Apr 19, 2023):
If you have made your changes and it still doesn't work, then you are very welcome to reopen the issue.
@nazar322 commented on GitHub (Apr 22, 2023):
I found the problem place in my code. It was this line
Electron.App.On("activate", async () =>on its execution the app just died somewhere within and there was CONNECTION_RESET.
As soon as I changed the line to
Electron.App.On("activate", async _ =>i.e. I added named parameter it started to pass execution.