Cannot get a ipc connection to run with aspnetcore 2.1 & angular 6 #263

Open
opened 2026-01-29 16:35:11 +00:00 by claunia · 0 comments
Owner

Originally created by @ffetech on GitHub (Jan 31, 2019).

Originally assigned to: @GregorBiswanger on GitHub.

Hello Gregor, Hello Robert, Hello all,

Thank you for this library!

I have a AspNetCore 2.1 Angular 6 App with ElectronApi 0.11. "electronize start" works fine and the app starts fine but I cannot get a ipc connection to run.

I have an Angular service with the following parts of code to establish a ipc connection. Its executing immediately after angular app start,

import { IpcRenderer } from 'electron';
...
if (process.versions.electron && (<any>window).require)
this.ipc = (<any>window).require("electron").ipcRenderer;
...
this.ipc.send("connect", "x");

This is my code on C# side

var browserWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = false });
browserWindow.OnReadyToShow += () =>
{
Electron.IpcMain.On("connect", args => Connect());
browserWindow.Show();
};

if I make a sendSync on angular side, the app freezes. Do you have some idea what i did wrong.

Originally created by @ffetech on GitHub (Jan 31, 2019). Originally assigned to: @GregorBiswanger on GitHub. Hello Gregor, Hello Robert, Hello all, Thank you for this library! I have a AspNetCore 2.1 Angular 6 App with ElectronApi 0.11. "electronize start" works fine and the app starts fine but I cannot get a ipc connection to run. I have an Angular service with the following parts of code to establish a ipc connection. Its executing immediately after angular app start, `import { IpcRenderer } from 'electron'`; `...` `if (process.versions.electron && (<any>window).require)` ` this.ipc = (<any>window).require("electron").ipcRenderer;` `...` `this.ipc.send("connect", "x");` This is my code on C# side `var browserWindow = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions { Show = false });` `browserWindow.OnReadyToShow += () =>` `{` ` Electron.IpcMain.On("connect", args => Connect());` ` browserWindow.Show();` `};` if I make a sendSync on angular side, the app freezes. Do you have some idea what i did wrong.
claunia added the information label 2026-01-29 16:35:11 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#263