Renderer Backend will not work without access to ipcRenderer
See original GitHub issueElectron’s security documentation suggest setting:
nodeIntegration
to falsecontextIsolation
to true- using
contextBridge
(https://www.electronjs.org/docs/api/context-bridge, https://stackoverflow.com/a/57656281/6319004)
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:
- Created 3 years ago
- Reactions:7
- Comments:9
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@hibearpanda Hey! According to webpack configuration, it uses src/sentry.js file as preload. I hope this helps.
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.