BridgeConnector not connected (spam console) #419

Closed
opened 2026-01-29 16:39:04 +00:00 by claunia · 7 comments
Owner

Originally created by @nurbat on GitHub (Dec 6, 2019).

Originally assigned to: @GregorBiswanger on GitHub.

last version

VS2019, netcore 3.1, nodejs last version

Steps to Reproduce:

  1. start app
  2. view log console
    изображение

Does not respond to Electron functions. {...} when a BridgeConnect appears, a link appears for 1-2 seconds, then signals through Electron. {...} do not arrive..

Originally created by @nurbat on GitHub (Dec 6, 2019). Originally assigned to: @GregorBiswanger on GitHub. <!-- Please search existing issues to avoid creating duplicates. --> <!-- Which version of Electron.NET CLI and API are you using? --> <!-- Please always try to use latest version before report. --> last version <!-- Which version of .NET Core and Node.js are you using (if applicable)? --> VS2019, netcore 3.1, nodejs last version <!-- Enter your issue details below this comment. --> <!-- If you want, you can donate to increase issue priority (https://donorbox.org/electron-net) --> Steps to Reproduce: 1. start app 2. view log console ![изображение](https://user-images.githubusercontent.com/5789051/70311197-d3824380-1819-11ea-8300-2a927da0bf8b.png) Does not respond to Electron functions. {...} when a BridgeConnect appears, a link appears for 1-2 seconds, then signals through Electron. {...} do not arrive..
claunia added the bug label 2026-01-29 16:39:04 +00:00
Author
Owner

@nurbat commented on GitHub (Dec 6, 2019):

изображение

@nurbat commented on GitHub (Dec 6, 2019): ![изображение](https://user-images.githubusercontent.com/5789051/70314723-bef57980-1820-11ea-8ba1-0516c62a584f.png)
Author
Owner

@GregorBiswanger commented on GitHub (Dec 6, 2019):

I tried it with .net core 3.1 and the Electron.NET 7.30.2. It worked wonderfully. Can you put an example application with the same misconduct on GitHub? So I can test it better.

@GregorBiswanger commented on GitHub (Dec 6, 2019): I tried it with .net core 3.1 and the Electron.NET 7.30.2. It worked wonderfully. Can you put an example application with the same misconduct on GitHub? So I can test it better.
Author
Owner

@nurbat commented on GitHub (Dec 10, 2019):

Project 2GB, I 'd rather tell you how to imitate this mistake. I will try.

public async void ElectronBootstrap()
        {
            browserWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions
            {
                Width = 1152,
                Height = 864,
//                Show = false
            });

            //            browserWindow.OnReadyToShow += () => browserWindow.Show();
            browserWindow.SetTitle("Electron.NET API Demos");
            BrowserWindow_OnShow();
        }

        private void BrowserWindow_OnShow()
        {
            Thread t = new Thread(ThreadProc);
            t.Start();
        }

        private void ThreadProc()
        {
            while (true)
            {
                Thread.Sleep(100);
//                Electron.IpcMain.Send(browserWindow, "some_js_Method", "testMessage");
            }
        }

later, upload api-demos copy controllers and views to project. And as a result almost immediately after these actions the connect flies and stops working everything connected with C #

@nurbat commented on GitHub (Dec 10, 2019): Project 2GB, I 'd rather tell you how to imitate this mistake. I will try. ``` public async void ElectronBootstrap() { browserWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Width = 1152, Height = 864, // Show = false }); // browserWindow.OnReadyToShow += () => browserWindow.Show(); browserWindow.SetTitle("Electron.NET API Demos"); BrowserWindow_OnShow(); } private void BrowserWindow_OnShow() { Thread t = new Thread(ThreadProc); t.Start(); } private void ThreadProc() { while (true) { Thread.Sleep(100); // Electron.IpcMain.Send(browserWindow, "some_js_Method", "testMessage"); } } ``` later, upload api-demos copy controllers and views to project. And as a result almost immediately after these actions the connect flies and stops working everything connected with C #
Author
Owner

@giorgosavramopoulos commented on GitHub (Feb 4, 2020):

Hi guys.. @GregorBiswanger do you have any update on this issue? I have been also facing it for quite some time.
Only in my occasion it does not happen all the time. On my desktop pc that has high specs it happens rarely, but on my laptop it happens quite often.. I am in a dead end with this issue as it makes the application completeley unresponsive

@giorgosavramopoulos commented on GitHub (Feb 4, 2020): Hi guys.. @GregorBiswanger do you have any update on this issue? I have been also facing it for quite some time. Only in my occasion it does not happen all the time. On my desktop pc that has high specs it happens rarely, but on my laptop it happens quite often.. I am in a dead end with this issue as it makes the application completeley unresponsive
Author
Owner

@GregorBiswanger commented on GitHub (Apr 19, 2020):

@nurbat I tried your example and the connection remains with me without problems (10 minutes long). There is a bit of memory growing with your method in the long run. However, you should not send a message every 100ms by default. Otherwise you should use alternative communication. But I think you just wanted to demonstrate it as an example of how it should crash?!

I am currently also using the latest version of Electron (version 8) - this may solve the problem automatically. Electron 8 have changed something here at the IPC. I would say that the problem is solved with the latest Electron.NET version 8.31.1.

image

@GregorBiswanger commented on GitHub (Apr 19, 2020): @nurbat I tried your example and the connection remains with me without problems (10 minutes long). There is a bit of memory growing with your method in the long run. However, you should not send a message every 100ms by default. Otherwise you should use alternative communication. But I think you just wanted to demonstrate it as an example of how it should crash?! I am currently also using the latest version of Electron (version 8) - this may solve the problem automatically. Electron 8 have changed something here at the IPC. I would say that the problem is solved with the latest Electron.NET version 8.31.1. ![image](https://user-images.githubusercontent.com/7336300/79674268-9f645980-81e1-11ea-9cd2-dabeb7e35b1a.png)
Author
Owner

@thomvandevin commented on GitHub (May 4, 2020):

hey! @GregorBiswanger
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)

Like I said, it happens pretty randomly but my guess is resource loads due to other programs. There is one way to trigger this bug consistently though:

  • I make sure I log all events I send from my core to the frontend. (any other stream of logs will also work)
  • I make the app 'hang' by selecting a log forcing the program in an 'awaiting' state
  • I wait around 2 minutes
  • Then I unselect the console-logs to make the app continue
  • There is a high-chance (if you wait long enough; always) that the Bridge Reconnected message shows up.
  • After this the app is left in a state where the frontend javascript calls still work, however the app doesnt update anymore.

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
  • ElectronNET API & CLI 8.31.1.0
  • .NET Core 3.1

Let me know if you have any ideas/details,
Greeting,
Thom

ElectronNET Bridge Connector bug

@thomvandevin commented on GitHub (May 4, 2020): hey! @GregorBiswanger 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) Like I said, it happens pretty randomly but my guess is resource loads due to other programs. There is one way to trigger this bug consistently though: - I make sure I log all events I send from my core to the frontend. (any other stream of logs will also work) - I make the app 'hang' by selecting a log forcing the program in an 'awaiting' state - I wait around 2 minutes - Then I unselect the console-logs to make the app continue - There is a high-chance (if you wait long enough; always) that the Bridge Reconnected message shows up. - After this the app is left in a state where the frontend javascript calls still work, however the app doesnt update anymore. 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 - ElectronNET API & CLI 8.31.1.0 - .NET Core 3.1 Let me know if you have any ideas/details, Greeting, Thom [![ElectronNET Bridge Connector bug](https://img.youtube.com/vi/WQDjJ5YtbTw/0.jpg)](https://www.youtube.com/watch?v=WQDjJ5YtbTw)
Author
Owner

@redplane commented on GitHub (Mar 25, 2021):

I have the same iisue while using ipc process to call a function on front end which is run per second. I deployed my application to raspberry pi and after 5 or 10 minutes, the issue occurs.

@redplane commented on GitHub (Mar 25, 2021): I have the same iisue while using ipc process to call a function on front end which is run per second. I deployed my application to raspberry pi and after 5 or 10 minutes, the issue occurs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#419