Questions tagged [ipcrenderer]
70 questions
17
votes
6 answers
communication between 2 browser windows in electron
I need to build an app that will span across multiple monitor screens, something like this:
Electron supports multiple windows but how do I communicate between them?

AIon
- 12,521
- 10
- 47
- 73
16
votes
6 answers
Unable To Pass Objects/Arrays in IPCRenderer, An object could not be cloned EventEmitter.i.send.i.send
I am unable to pass any object or arrays to IPCRenderer.
I am getting error when passing an object or array through ipcs, I have even tried to send by converting to string using JSON.stringify but it converts it into empty object string.
I have…

Kashan Haider
- 1,036
- 1
- 13
- 23
14
votes
3 answers
How to import ipcRenderer in vue.js ? __dirname is not defined
I'm struggling to understand how to correctly import ipcRenderer in a .vue file.
I put in /src/background.js file :
webPreferences: {
nodeIntegration:false,
contextIsolation: true, // protects against prototype pollution
preload:…

Raphael10
- 2,508
- 7
- 22
- 50
9
votes
3 answers
Communicate directly between two renderer processes in Electron
I've created multiple windows from Electron's main process and need to pass messages between them. The only way I know to send messages from rendererA to rendererB is by bouncing it to the main process. Is there any way to directly send a message…

hawk
- 1,827
- 2
- 14
- 28
6
votes
0 answers
Are Electron ipc messages ordered?
Are there any ordering guarantees of ipc messages in Electron? If so, what are they?
For instance, in main:
window.webContents.send('channel-a', 1)
window.webContents.send('channel-a', 2)
And in the renderer:
ipcRenderer.on('channel-a', (_event,…

Betamos
- 26,448
- 9
- 23
- 28
6
votes
2 answers
Why is my ipcMain not sending to ipcRenderer in Electron?
New to electron I've figured out how to send from Renderer to Main but I'm trying to learn how to go from Main to Renderer. In my research I've read:
IPC send from main process to renderer and tried:
main.js:
const { app, ipcMain, Menu } =…

DᴀʀᴛʜVᴀᴅᴇʀ
- 7,681
- 17
- 73
- 127
3
votes
0 answers
Issue With electron IPC Renderer on event, browser page reloaded
I am working with electron desktop application using following technologies:
Front end : Angular 8
Communication between main process to child process is IPC Renderer Mechanism.
My issue is - when i am sending message from child to main process,…

Pavani Krishna
- 31
- 2
3
votes
2 answers
How to unregister from ipcRenderer.on event listener?
In my host application I have a button, that when clicked, sends data over to my angular application with data. Like so:
component:
onClick() {
ipcRenderer.send("data-bridge",{name: 'John…

Kode_12
- 4,506
- 11
- 47
- 97
2
votes
1 answer
How is webContents.send detected by ipcRenderer.on which is inside preload.js?
I am a totally new user to stack overflow and this is my first ever question.
I have been researching ways to make Electron applications more secure and came across the following discussion about contextBridge and preload.js.
With contextIsolation =…

Blobby123
- 51
- 6
2
votes
1 answer
Angular 11 Electron IPC communication 'send' of undefined
I did my first try and wanted to use the electron apis from an angular renderer process. I followed the instructions in
Instruction creating Angular -Electron application
so in my main.js file I added:
const {app, BrowserWindow, ipcMain} =…

nodefastic
- 21
- 2
2
votes
1 answer
Electron: Can same channel name use for ipcMain.on and ipcMain.handle?
Can we register the same channel for ipcMain.on method and ipcMain.handle()?
For eg:
ipcMain.handle('test', async(event,args) => {
let result = await somePromise();
return result;
});
ipcMain.on('test', async(event,args) => {
…

Akash Sethiya
- 73
- 1
- 4
2
votes
1 answer
Electron-Angular open client-side dialog on ipc event
I have a back-end notification that pops up a client-side angular-material dialog component. Sometimes, but not always, the dialog does not completely instantiate. The constructor of the component is invoked, but nothing else in the lifecycle is…

Nate
- 2,205
- 17
- 21
2
votes
2 answers
Is there a function to send electron 6 data to an angular 8 component?
I need to send information to an angular component in order to do an "automatic" login,
I can send component data to the electron process using the
IPCRederer (on component) and IPCMain (on 'electron' side), but I can't
use in the opposite way that…

Bruno Furukawa
- 21
- 5
1
vote
1 answer
Learning Electron, trying to send data to renderer from main but appearing as undefined in renderer. Any help much appreciated
Am working with electron and encountering and issue that I cannot for the life of me fix despite it being so simple, where my received data is showing as undefined in renderer, yet shows correctly when console.log(the data) in main.
All I am trying…

benmag11
- 25
- 3
1
vote
1 answer
how to get chunk data in renderer.js from main.js in electron js application
I have to get data from a server in my electron app I am using "net" module of the node js.
As "net" is main process moduel I can't directly access it from renderer file.
I had to use 'net' module in main.js file.
I followed two way IPC from…

A.Muqtadir
- 21
- 6