-
-
Notifications
You must be signed in to change notification settings - Fork 56
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 crashes with iframes in webContents #51
Comments
funny enough it seems like sentry was actually able to catch the crashes it was causing... https://sentry.io/superhuman/electron/issues/498531913/ |
Hi @ibash, thank you for reporting this bug. Could you please clarify what you mean by "put a preload in there"? Judging by the fact that this is a native crash, the SDK is either accessing some environment too early during WebContents creation when it's not yet allowed, or we've hit a bug in Electron. Are you using Ideally, we could create a minimal reproducing example. Could you maybe share relevant code parts here or via email to [email protected]` so I can try to reproduce this locally? In the meanwhile, you can obtain the CrashReporter URL by using the CSP Endpoint URL in Project Settings > Client Keys (DSN) and replacing "csp-report" with "minidump", e.g.: |
I meant requiring the sentry package within a preload file (passed as an option to webContents.create). In particular, this seems to be triggered by us creating an iframe in the webContents and then loading a script inside of that iframe with some code we run in the background. It's likely that there's something inside of the background code that's triggering it, but I didn't go farther than that. AFAIK we're not using Let me check what I can give you to reproduce it locally... |
@jan-auer I can generate a build of our electron app that includes sentry (and so would reproduce the crash). If you wanted to modify the code you'd probably need to unpack / repack the asar file. |
We have identified a couple of issues that cause troubles with disabled Node integration and sandbox mode. Documentation will be updated soon with current limitations and we are planning to fix those issues in the upcoming releases. |
The v0.5.5 release fixes a couple of issues related to node integration and sandboxing and includes more robust internal error handling. It would be great if you could give it another try. |
@jan-auer we have the same error, and are using v0.5.5. It seems like that release didn't fix it. EDIT: We also tried a few options (such as disabling native and javascript reporting), but that didn't change anything. We did try to only require it in the main process, which stopped the crashing. We too have iframes in our code (embedded from intercom.io). We'll debug some more to see if that's causing it. |
Can confirm that removing intercom, and with it all iframes, resolves the crashes too. |
@jeroenvisser101 Thanks for reporting this. We have not tried out iframes yet, so there might be a bug lurking in the dark :) I will open a separate issue to track this. |
You're right. Let's rename this issue for now. Adding @kamilogorek @HazAT here, since they are updating the SDK currently. |
We are experiencing the same thing with our app. We call Sentry.init in our main browser process and all the renderer processes via a preload script. Any iFrame that got created within the renderer would crash the renderer process. |
@jan-auer is this still on your radar? We'd very much like to have this shipped with our initial release to aid debugging issues that might arise. |
@jeroenvisser101 Yes it is, we're currently updating the Electron SDK with new internals and will look at this next. |
Hey, so I was playing around with this, currently working on #89 but I am not able to reproduce it. |
Will try to get a reproducible example today |
Just adding an iframe doesn't trigger anything in the application. I'll try to set up a project that similar to ours and add sentry-electron to it, but that means I'll defer from the example. Hope that's okay. |
@HazAT I've invited you for a private replication repo. We've ran out of seats, if needed, I'll mirror the repo on my personal account so I can add more people. |
Realized that we only have a public Intercom token in there, so made it public: https://github.com/mymobia/sentry-replication-repo See https://github.com/mymobia/sentry-replication-repo/blob/master/src/renderer/index.js#L4-L5, you can turn on the Intercom test which crashes the renderer. |
@jeroenvisser101 I already look at your repro case, thanks for providing it. |
I suspect this might be related: electron/electron#12467, which means it's an upstream issue. It should be fixed in electron@3, which I'll be testing today. |
I can confirm using electron@3, the renderer doesn't crash and Sentry works. |
OK, @jeroenvisser101 thanks for all the investigation you did but I will close this ticket now since it seems not to be only Sentry related. |
Steps:
require('@sentry/electron')
Expected:
Works
Actual:
Causes one of our renderer processes to crash
We instantiate a webContents with
webContents.create
. If we put a preload in there that requires this package, it causes that process to crash when the app loads.Let me know if you need any more information.
It would be great if sentry could simply give me a crash reporter url to send crashes to...
Also... getsentry/sentry-wizard#5
The text was updated successfully, but these errors were encountered: