question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Renderer Backend will not work without access to ipcRenderer

See original GitHub issue

Electron’s security documentation suggest setting:

The sentry client for the renderer directly requires ipcRenderer (https://github.com/getsentry/sentry-electron/blob/master/src/renderer/backend.ts#L5) as a way to send events to the main process, but with the suggested security settings, this would not be possible (ipcRenderer wouldn’t be available in the renderer process).

Are there any plans to allow us to use sentry in the renderer process without exposing ipcRenderer directly?

If not, would it be possible for us to submit a PR for this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:9

github_iconTop GitHub Comments

3reactions
bermanboriscommented, Mar 1, 2021

@hibearpanda Hey! According to webpack configuration, it uses src/sentry.js file as preload. I hope this helps.

3reactions
timfishcommented, Dec 9, 2020

Last night I was working on a PR for exactly this which exposes IPC through contextBridge when context isolation is enabled.

It’s not a simple change because @sentry/electron still needs to work with context isolation disabled and in versions of Electron before context isolation even existed.

With context isolation enabled, you’ll need to call init in the main process, the renderer preload and in the renderer in the isolated context.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Access methods in electron's main process from render ...
This works when I run the the app locally, but as soon as I build the app with electron-forge it can no longer...
Read more >
Requiring electron outside of main.js causes a TypeError #7300
I'm using the above method for accessing the ipcRenderer from electron in my Angular app but Angular change detection is not working when...
Read more >
Inter-Process Communication - Electron
To send messages to the listener created above, you can use the ipcRenderer.send API. By default, the renderer process has no Node.js or...
Read more >
cannot access 'ipcrenderer' before initialization - You.com
I'm new in electron and I tried to create a simple app that will hide the main window and show other window when...
Read more >
Handling interprocess communications in Electron ...
Whatever side of the divide you find yourself, you can't help but agree ... for the main process and ipcRenderer for the renderer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found