Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BridgeConnector not connected (spam console) #347

Closed
nurbat opened this issue Dec 6, 2019 · 7 comments
Closed

BridgeConnector not connected (spam console) #347

nurbat opened this issue Dec 6, 2019 · 7 comments
Assignees
Labels
Milestone

Comments

@nurbat
Copy link

nurbat commented Dec 6, 2019

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..

@nurbat nurbat added the bug label Dec 6, 2019
@nurbat
Copy link
Author

nurbat commented Dec 6, 2019

изображение

@GregorBiswanger GregorBiswanger self-assigned this Dec 6, 2019
@GregorBiswanger
Copy link
Member

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.

@nurbat
Copy link
Author

nurbat commented 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 #

@giorgosavramopoulos
Copy link

giorgosavramopoulos commented 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

@GregorBiswanger GregorBiswanger added this to the 8.31.1 milestone Apr 17, 2020
@GregorBiswanger
Copy link
Member

@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

@thomvandevin
Copy link

thomvandevin commented 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

@redplane
Copy link

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants