process loop when loading

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
  • Operating System:
    • windows 10
  • Last Known Working Electron version:
    • 10

To Reproduce


Additional Information

loading this website will make the the process to go in a loop, high CPU and the page is white.

1 possible answer(s) on “process loop when loading

  1. This is an issue with the JavaScript on the site, and not an Electron bug.

    I was able to attach a debugger while the site was running, and the JS is caught in this loop:

    while (!![]) {
      try {
        if (j[au('0x228')](j[au('0x287')], j[au('0x287')])) {
          function a4() {
            var aC = function(c, d) {
              return au(c - '0x30f', d);
            j[aC('0x4f0')](Z, 0x3, !![]);
        } else
          !!a1 && !(!!window[au('0x289')] && !!document[au('0x18f')]) && (a1 += j[au('0x272')]);
      } catch (a5) {}

    This is obfuscated, here’s my rough deobfuscation based on live evaluation, which I believe is functionally identical to the above in this particular situation:

    while (true) {
      try {
        if (false) {
          // ...
        } else {
          if (a1 && !(window.MSInputMethodContext && document.documentMode)) {
            a1 += "MP=";
      } catch (a5) {}

    (window.MSInputMethodContext && document.documentMode) is essentially a check for Internet Explorer, which fails, so this loop is basically:

    while (true) {
      a1 += "MP=";

    and it is unsurprising that the app hangs.

    I’m closing this as I don’t believe this is an Electron bug, but rather a logic error in the website under test.