-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Renderer Backend will not work without access to ipcRenderer #279
Comments
Last night I was working on a PR for exactly this which exposes IPC through It's not a simple change because With context isolation enabled, you'll need to call |
That's wonderful @timfish. Thank you very much. I took a look at your PR and can see where it is headed. Appreciate your efforts. |
I am trying to do this, but it does not seem to capture unhandled errors. My code is: // Main process
...
const Sentry = require("@sentry/electron");
Sentry.init({
dsn: "_DSN_",
});
...
// Preload script
...
const Sentry = require("@sentry/electron");
Sentry.init({
dsn: "_DSN_",
});
contextBridge.exposeInMainWorld("electron", {
// General
Sentry: Sentry,
...
});
// Renderer
<script>
electron.Sentry.init({
dsn: "_DSN_",
});
</script> Not sure if related to this. |
Once this is merged you'll need to call The test app shows what is required. |
@bermanboris Now! |
Thanks for an update @timfish ! |
Hi @timfish, would it be possible to provide an example of |
@hibearpanda Hey! According to webpack configuration, it uses src/sentry.js file as preload. I hope this helps. |
Electron's security documentation suggest setting:
nodeIntegration
to falsecontextIsolation
to truecontextBridge
(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?
The text was updated successfully, but these errors were encountered: