I have the same issue, did you fixed this?
BridgeConnector Reconnected causes loss of socket
I'm still encountering this bug with the result that my frontend doesnt react on events anymore after a reconnect.
My hypothesis is that this happens whenever there is a large cpu or ram load going on. Due to this the app-lifetime can vary from 1 minute to multiple days depending on what I'm doing with my pc. The result however is that the user will have to manually end the app-task through the task manager since closing the app otherwise will leave the user with around 5 processes that dont close. (the app is unstartable due to that)
In this broken state I can still manually refresh the page to make the app show the latest data, however events through listeners dont work anymore. For some extra context I attached an url to a youtube video replicating this, I can provide you with some extra details or logs if you want.
My current environment: * Windows 10 * Version: ElectronNET API & CLI 22.214.171.124 * Target: .NET Core 3.1 + NodeJS v12.16.2
Let me know if you have any ideas/details, Greeting, Thom
10条回答 默认 最新
- 点赞 评论 复制链接分享
Honestly, I have no idea why the problem can be. Normally everything is still supported with a reconnect. Socket.IO and .NET Core with the library we used (SocketIoClientDotNet) are unfortunately no longer being developed and we would have to find an alternative. is currently working on a prototype of how we could do completely without websockets. However, this will be hard work because we have to rewrite our whole core.
However, I would have an idea for a workaround. You would have to try this out for yourself. If the connection is lost, you can completely reload the app. You would have to tap this via HostHook. See the Electron.NET API demo app under "Execute your own TypeScript code". In an emergency, I can show you the possible code. But would take time for me now. That might not be prioritized according to the prototype for me.
https://github.com/ElectronNET/electron.net-api-demos点赞 评论 复制链接分享
, this issue that makes bridgeconnector reconnected only happends in Electron.Net version 8.31 +?, or this happens in all version of Electron.Net cuz i'm working on a project using this tool but i always lose connectivity and after that i cant do any operation... so if i go back to an old version it will be fixed?? I see my electronize build /win failed when i start the exe, this loses brigeconnector too.点赞 评论 复制链接分享
- weixin_39934085 2021-01-12 18:31
Every now and then I get the same problems. You can also reproduce it, if you check for updates in debugger (not deployed / packed).
But just for fun I updated to the newest version of socket.io and everything work like a charm! I noticed that ElectronNET.Host has a mismatch in the version number: package.json has 2.1.2 but package-lock.json has 2.1.4 maybe that causes the problems?
Update Or maybe not...点赞 评论 复制链接分享
If the latest Socket.IO version works without problems.. Then we can update it.. best try with the demo app if everything still works..点赞 评论 复制链接分享
I only have one question about it, i updated to versions 8.31.2+, When i run ElectronNet project, menu is not working, i try to click Edit, View, Window, Help and it is not showing the dropdown, or popup. I had to clean something or it is a bug??点赞 评论 复制链接分享
please see #401点赞 评论 复制链接分享
Updatet to socket.io 2.3.0 - publish with Electron.NET 9.31.1
if the problem persists, we can open the issue again点赞 评论 复制链接分享
- weixin_39934085 2021-01-12 18:31
I have run several tests and this time no connection was closed! So it seems stable to me.点赞 评论 复制链接分享
- weixin_39849942 2021-01-12 18:31
Hey, Are there any particular files I need to setup or change to publish with socket.io 2.3.0 and ElectronNET 9.31.1?点赞 评论 复制链接分享