Renderer entirely hangs with “uncaught illegal access” when loading page with 2 iframes, nodeIntegrationInSubFrames, and node-ipc

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • 11.2.1, also verfied on Electron 10.2.x and 9.0.0
  • Operating System:
    • verified on MacOS 10.14.6, MacOS 11.1, Debian 4.19.160-2, and Debian 5.9.15
  • Last Known Working Electron version:
    Electron 8.5.5 works.

Expected Behavior

Page sucessfully loads and js continues running normally.

Actual Behavior

The render window completely hangs partway through loading, is unresponsive to all input including the developer console, and can only be killed from the main process, or by killing the main process. When loading for the first time, there’s no output in the developer console, but when reloading an intermittent form of the bug (by wrapping the node-ipc connectTo call in an async function with a delay) following stack trace is sometimes displayed:
Screen Shot 2021-01-15 at 5 45 55 PM. Although the error is displayed as being on line 1 of my html file, line 1 is simply <html>, so that’s obviously not correct.

To Reproduce

Install this minimal example project. by runing

$ git clone
$ npm install
$ npm start

Notice that when running the app, the big iframe’s contents never load, and the app is unresponsive to the normal keyboard shortcuts to interact with it (Quit, open the, dev tools, etc.). Look at the source code (especially index.html) to see that the JS abruptly stops running, unlike it expected behavior. The comments describe which lines seem necessary to trigger the bug, and which are just to demonstrate the behavior.


Additional Information

I’m submitting the issue here as well as node-ipc’s repository, as the issue seems to be in the interaction of the two codebases. However, the set of unique circumstances in the electron configuration needed to cause this, as well as the fact that the normal debugging tools like the developer console are rendered non-functional, would seem to indicate that the issue is primarly regarding electron, and not node-ipc. The fact that electron 8.5.5 and eariler don’t have this issue would seem to confirm that conclusion.

1 possible answer(s) on “Renderer entirely hangs with “uncaught illegal access” when loading page with 2 iframes, nodeIntegrationInSubFrames, and node-ipc