Questions tagged [ipcmain]

36 questions
0
votes
1 answer

uncaught ReferenceError: require is not defined in ElectronJS using example docs

Short intro I've been following the official Electron docs (https://www.electronjs.org/docs/api/ipc-main) about communicating from render and main processes, but I can't get it to work. The error While trying the Sending Messages example, I get this…
Jose Serodio
  • 1,390
  • 3
  • 17
  • 31
0
votes
1 answer

Electron ipcMain how to gracefully handle throwing an error

In Electron if I throw an error anywhere on the backend it goes to a custom window. Trying to find a way to catch that to push to a custom area in my app I've found that I can detect the process with process.on('uncaughtException'). However I'm…
DᴀʀᴛʜVᴀᴅᴇʀ
  • 7,681
  • 17
  • 73
  • 127
0
votes
2 answers

ipcMain help needed

I am trying to send a reply message back to my render. In the render I get a print out of "undefined" in the console log. I am trying to get the json response back from my api call So far I tried the follow ipcMain.on("get_scenes", (event, arg) =>…
Jerry Seigle
  • 417
  • 4
  • 12
0
votes
2 answers

How to open new window in electron using window.open in renderer process?

I have an angular application which is wrapped as electron app. Now when, in the renderer process I call Window.open for an internal route, I get a message saying Not allowed to load a local resource and a blank window opens. How do I get around…
0
votes
1 answer

Reacting to ipcMain events in Spectron

I have an electron application that first starts a launcher window (in a renderer process) that starts several background services. After those background services started successfully it sends "services-running" on its ipcRenderer back to the main…
Tom
  • 3,807
  • 4
  • 33
  • 58
-1
votes
1 answer

Wait for an answer from Electron synchronously

I'm trying to make a desktop bybit trading app... and I can't figure it out how to make the code wait for the response from the main script..... I need to wait for a response with the needed info for example like wallet balance. Instead the code…
Eugene1111
  • 27
  • 2
  • 7
1 2
3