Questions tagged [ipcrenderer]

70 questions
1
vote
0 answers

why is ipcRenderer.sendSync() causing crashing the application?

In the onbeforeunload-Event, I use in my renderer-process ipcRenderer.sendSync() to notify the main-process to show a dialog: window.onbeforeunload = (e) => { const response = ipcRenderer.sendSync('askForSavingChanges'); if (response == 0)…
BennoDual
  • 5,865
  • 15
  • 67
  • 153
1
vote
0 answers

IPC communication between electron 19 and Angular 14

I have to use few electron power events and usb-detection in our app and also communicate these events to the angular side. Earlier with electron version 8, we used the ngx-electron in the angular side and webContents on the electron side to send…
MJ2410
  • 468
  • 1
  • 9
  • 26
1
vote
1 answer

Electron: Simplest example to pass variable from JS to HTML, using IPC, Contextbridge and Preload?

I am trying to learn electron, but I'm struggling to understand this basic functionality of IPC. Already tried from documentation or tutorials but everytime they overcomplicate with complex examples or using other libaries like svelte, typescript…
Lodes
  • 21
  • 6
1
vote
1 answer

I am getting an error when using ipcRenderer (typeerror cannot read properties of undefined (reading 'send'))

I am getting an error when using ipcRenderer (typeerror cannot read properties of undefined (reading 'send')). I feel the error is in ( const mainWindowTemplate) , I don't know why this error is poping up because the other times I used ipcRenderer…
1
vote
1 answer

Electron/React cannot access component state changes in ipcRenderer listener

I am using Electron with React and I am facing a little problem. I am creating a functional component and in the useEffect hook I subscribe to ipcRenderer to listen for when ipcMain replies. When ipcRenderer event triggers I am unable to access the…
1
vote
1 answer

electron app json data to renderer using ipc

i am new to electron so im sorry if my question is childish but i have sent some user inout data as object from renderer to main to store in json file (electron-db) but i want to show all data in a table i tired this by event.reply but it giving my…
Warlord
  • 17
  • 6
1
vote
1 answer

ipcRenderer not receiving the message from webContents.send (Electron)

In the main window of my program, I have a button that, if clicked, creates a new, additional window. When this new window finishes loading, I want to send a message to ipcRenderer; however, I have not been able so far to make ipcRenderer able to…
notexactly
  • 918
  • 1
  • 5
  • 21
1
vote
1 answer

Electron FFmpeg progress handling

I have an Electron app (with Angular). I am new to Electron and all this inter-process event handling. My problem is that I have this ipcMain handler(main process) (that I 'Invoke' from an Angular service) : ipcMain.handle('video-audio-merge',…
Ano
  • 13
  • 2
1
vote
0 answers

ElectronJS Jquery and IPCRenderer / It doesn't work / Can't run it together

I'm trying to make a simple desktop application for my colleagues at work to use. I designed the interface and I am using webview. I removed the frame with the frame: false command, made a custom design frame, and I control the buttons with…
tsk
  • 11
  • 3
1
vote
0 answers

Electron app: TypeError fs.existsSync is not a function

I am building a desktop application in Electron using React and SQLite3. My configuration is as follows: node: v14.17.4 electron: 13.2.1 react: 17.0.2 sqlite3: ^5.0.2 I am trying to enable the communication between the main side and the renderer…
El_Merendero
  • 603
  • 3
  • 14
  • 28
1
vote
2 answers

How to update react state when using contextBridge/preload in electron app

I have an electron application that is using react. I am using the contextBridge in preload.js. I would like to pass a variable from app.js through the bridge to a function in the main process; which returns a value to the bridge and back to app.js…
DMonde
  • 71
  • 8
1
vote
0 answers

Why send method of Electron does not working from the main process?

I'm in big trouble. I checked other solutions but nothing helped me. I don't understand why the "send" method doesn't work here. No exceptions, no messages or anything else. I tried wrapping the send method in another method but it failed. I tried…
Yefis
  • 11
  • 3
1
vote
0 answers

Electron | Error invoking remote method 'some-name'

I'm trying to implement in my electron application. In main.ts : ipcMain.handle('some-name', async (event, someArgument) => { console.log("--------------------") console.log(someArgument) console.log("--------------------") return…
Maifee Ul Asad
  • 3,992
  • 6
  • 38
  • 86
1
vote
1 answer

How to move ipcMain.on calls outside the main.js file

I am working on a project with Electron and React. I am going to be making multiple calls to the database via ipcMain and ipcRenderer so I moved the calls for ipcMain to another file(ipcMainHandler.js). The challenge I am facing now is how to send…
David Essien
  • 1,463
  • 4
  • 22
  • 36
1
vote
1 answer

How to pass ipcRenderer.invoke handler answer to electron renderer process using preload.js

I'm writing a CRA + Electron app and I need to use ipcRenderer.invoke for inter-processes communication. I was able to make ipcRenderer.send and ipcRender.on work in contextIsolation mode, but no luck with ipcRender.invoke. For some reason I don't…
LittoX9
  • 11
  • 1
  • 3