<ul dir="auto">
<li><strong>Electron Version:</strong> 12.0.0-beta.21</li>
<li><strong>Operating System:</strong> Linux</li>
<li><strong>Last Known Working Electron version:</strong> 11.x works well on the same project/code-base and dataset</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">No crash.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">See attached <a href="https://github.com/electron/electron/files/5922021/dump.txt">dump.txt</a> file.</p>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">There is no simple way to provide minimal repro project but there are <code class="notranslate">session.webRequest.{onBeforeRequest,onBeforeSendHeaders,onHeadersReceived,onErrorOccurred,onCompleted}</code>-like handlers setup in this way: <a href="https://github.com/vladimiry/ElectronMail/blob/48ac271b441a7860bad41c31707316fb9447db36/src/electron-main/web-request/index.ts">https://github.com/vladimiry/ElectronMail/blob/48ac271b441a7860bad41c31707316fb9447db36/src/electron-main/web-request/index.ts</a>.</p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">The <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="800133449" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/27603" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/27603/hovercard" href="https://github.com/electron/electron/issues/27603">#27603</a> is a possibly related issue.</p>
<h3 dir="auto">Preflight Checklist</h3>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong><br>
12.0.0-beta.21</li>
<li><strong>Operating System:</strong><br>
Windows 10</li>
<li><strong>Last Known Working Electron version:</strong><br>
12.0.0-beta.20</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">No crash.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Crash reported to Sentry using minidump uploader:<br>
<a href="https://sentry.io/share/issue/70e843318a304dae9616805c3223a1cc/" rel="nofollow">https://sentry.io/share/issue/70e843318a304dae9616805c3223a1cc/</a></p>
<h3 dir="auto">To Reproduce this might be enough</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Use Electron.WebRequest .onBeforeRequest(
      {
        urls: [],
      },
      ({ url }, callback) =&gt; {
        if (url.startsWith('https://test..com')) {
          callback({ cancel: true });
        } else {
          callback({ cancel: false });
        }
      },
    );"><pre class="notranslate"><code class="notranslate">Use Electron.WebRequest .onBeforeRequest(
      {
        urls: [],
      },
      ({ url }, callback) =&gt; {
        if (url.startsWith('https://test..com')) {
          callback({ cancel: true });
        } else {
          callback({ cancel: false });
        }
      },
    );
</code></pre></div>