mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
Socket Disconnection Error #540
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 @AykutToprak on GitHub (Jul 21, 2020).
Originally assigned to: @GregorBiswanger on GitHub.
Got disconnect! Reason: transport close
ASP.NET Core Application connected... global.electronsocket fVcXgik5tZt05sn7AAAB 2020-07-21T13:23:13.319Z
stdout: BridgeConnector connected!
As it showed above socket are disconnected and reconnected again. This caused problem for IPC Listeners. I guess they are somehow removed.
Is there any workaround to solve this? @GregorBiswanger
Similar issue : #442 #428
@rakista112 commented on GitHub (Jul 29, 2020):
I've been facing this issue too. One minute all IPC works properly, then a transport error appears and it doesn't try to reconnect.
I'm using ElectronNET.CLI Version: 9.31.2.0
Here is the error that's being displayed.
@GregorBiswanger commented on GitHub (Aug 14, 2020):
Normally the socket connection should restore the registrations. Have you lost these?
@AykutToprak commented on GitHub (Aug 20, 2020):
Socket connection is restored however IPC Listeners are not. Commitications between front-end and back-end are completely disconnected
@Gaulomatic commented on GitHub (Oct 15, 2020):
I am encountering this issue as well. On some Windows 10 machines this leads to the situation where the app can not quit itself anymore. The main process is killed, but all remaining Electron processes as well as the ASP.NET core process run until they are force killed by any means (e.g. TaskManager).
EDIT:
Here is an example if you invoke
Electron.WindowManager.BrowserWindows.First().Maximize();after the disconnect happened:@IIiKoBiT commented on GitHub (Jan 17, 2021):
When will it be fixed?
This is very critical for me. Is there a way to temporarily fix this?
@IIiKoBiT commented on GitHub (Jan 19, 2021):
@GregorBiswanger
I didn't wait for an answer, I cloned the whole project and built it. The disconnect problem is gone and everything works well. But any resources stopped working for me, there are no icons and images, what could it be?
@danatcofo commented on GitHub (Jan 25, 2021):
I believe this is fixed as of 11.5.1 @GregorBiswanger
@JollyRoger91 commented on GitHub (Feb 16, 2021):
@danatcofo Unfortunately, this bug is not fixed yet.
I'm facing this issue now too and I'm using the latest release 11.5.1
As @Gaulomatic pointed out, it seems that this issue depends on the machine. Our Software runs on 30-40 machines without any issue, but on 4 machines this issue happens frequently. I do not see any obvious difference between the machines which work and the machines which won't work.
@IIiKoBiT I don't quite understand how this bug can be fixed if I compile this project myself? Did you make additional make any changes to the code?
@GregorBiswanger commented on GitHub (Jul 2, 2021):
I can hardly reproduce it. We need support.
Here is a video of how you can install the missing features yourself and submit them as a pull request: https://youtu.be/Po-saU_Z6Ws
Please also test it with you.
@GregorBiswanger commented on GitHub (Jul 2, 2021):
We are currently also using a .NET library to be able to communicate with Nodejs Socket.io, which has long been deprecated.
We need a new one that will continue to be maintained and will also work with the current Socket.io version. Can someone help us? We are also happy to do this together.
@GregorBiswanger commented on GitHub (Jul 2, 2021):
The talk here is of SocketIoClientDotNet
https://github.com/Quobject/SocketIoClientDotNet/
@tub5 commented on GitHub (Jul 5, 2021):
@GregorBiswanger the socket.io-client-csharp package seems to be fairly similar. As long as we specify that the EIO is 3 (socket.io 2.x) rather than the default 4 (socket.io 3.x 4.x). It seems to be updated fairly regularly.
@pvenky commented on GitHub (Jul 9, 2021):
I'm able to reproduce this problem fairly consistently when calling
BrowserWindow.GetBoundsAsync. When I programmatically resize the window, I can callGetBoundsAsyncand there seems to be no problem. However, when I call the same method after a user resize event, i.e., inside an event handler for theBrowserWindow.OnResize, then theawait window.GetBoundsAsync()never returns and eventually there is a socket disconnect.@dbphoton commented on GitHub (Oct 12, 2021):
Is there any way to handled that issue manually from code?
@Krizzzn commented on GitHub (Jul 7, 2022):
I'm encountering the same issue and I think I have pinned it down to being caused by a large json (~500KB) document being transmitted from the backend to the Electron App. What's weird is, that different computers seem to have different limits here.
Maybe this helps.
@jamieyello commented on GitHub (Nov 30, 2022):
In my case the solution was as simple as making sure my System.Threading.Timer was disposed.
Not disposing it caused this error.
If it's any use to a developer, here's a (not isolated) function where it would occur. I create a Timer to update my Blazor component every 50 milliseconds, excluding the
usingcaused the bug.I'll try to reproduce it later on shareable code, but it seems like more of a user error issue than an electron one.
@GregorBiswanger commented on GitHub (Mar 28, 2023):
🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉
With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!
@arthurvalentereis commented on GitHub (Dec 18, 2023):
Hello everyone, I have this problem, my visual studio is .NET8 but I just cloned the repository, followed the steps and started the project. Can someone help me? Could .net8 be the cause of the problem?
Solved: Guys, I didn't see it, but my Electron CLI was outdated, I updated it using command
dotnet tool update ElectronNET.CLI -gand now it works ✅