<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="4074723" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright/discussions/14169" data-hovercard-type="discussion" data-hovercard-url="/microsoft/playwright/discussions/14169/hovercard" href="https://github.com/microsoft/playwright/discussions/14169">#14169</a><br>
playwright: 1.18.0<br>
os:mac<br>
I have this problem with firefox.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1261933/168509777-fb61fbfa-5de2-4792-98a9-1e69c1c8dfc6.png"><img width="699" alt="截屏2022-05-16 上午10 26 44" src="https://user-images.githubusercontent.com/1261933/168509777-fb61fbfa-5de2-4792-98a9-1e69c1c8dfc6.png" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Preface:</strong> I'm using playwright for large scale academic web measurements, which I know is not what playwright was built for. I've done a fair share of FOSS work myself, so you have my full sympathies if you consider hard-to-reproduce crashes from unsupported use-cases out of scope for the time being - I can easily work around them. That being said, I was originally about to report five different tracebacks here, just to notice that <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dgozman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dgozman">@dgozman</a> fixed four of them in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1037696489" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright/issues/9826" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/playwright/pull/9826/hovercard" href="https://github.com/microsoft/playwright/pull/9826">#9826</a> a few hours ago. <g-emoji class="g-emoji" alias="smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f604.png">😄</g-emoji><g-emoji class="g-emoji" alias="cake" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f370.png">🍰</g-emoji> So my presumption is you may find this interesting, which is why I'm sharing the remaining one here.</p>
<hr>
<p dir="auto">I've encountered the following crash with <code class="notranslate">1.16.0-next-alpha-oct-20-2021</code> running Firefox on Ubuntu 20.04. Unfortunately there are no good repros - this happens very rarely and seemingly at random. For reference, I've seen it five times during ~70k website visits made with Firefox. For comparison, this is about as often as the various context-is-undefined crashes fixed in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1037696489" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright/issues/9826" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/playwright/pull/9826/hovercard" href="https://github.com/microsoft/playwright/pull/9826">#9826</a>.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2021-10-23T02:32:29.114Z pw:browser [pid=1135] &lt;kill&gt;
2021-10-23T02:32:29.114Z pw:browser [pid=1135] &lt;will force kill&gt;
2021-10-23T02:32:29.121Z pw:browser [pid=1135] starting temporary directories cleanup
/root/node_modules/playwright-core/lib/server/frames.js:337
    for (const child of frame.childFrames()) this._removeFramesRecursively(child);
                              ^

TypeError: Cannot read properties of undefined (reading 'childFrames')
    at FrameManager.removeChildFramesRecursively (/root/node_modules/playwright-core/lib/server/frames.js:337:31)
    at FrameManager.frameCommittedNewDocumentNavigation (/root/node_modules/playwright-core/lib/server/frames.js:169:10)
    at FFPage._onNavigationCommitted (/root/node_modules/playwright-core/lib/server/firefox/ffPage.js:211:30)
    at FFSession.emit (node:events:390:28)
    at /root/node_modules/playwright-core/lib/server/firefox/ffConnection.js:247:41"><pre class="notranslate"><code class="notranslate">2021-10-23T02:32:29.114Z pw:browser [pid=1135] &lt;kill&gt;
2021-10-23T02:32:29.114Z pw:browser [pid=1135] &lt;will force kill&gt;
2021-10-23T02:32:29.121Z pw:browser [pid=1135] starting temporary directories cleanup
/root/node_modules/playwright-core/lib/server/frames.js:337
    for (const child of frame.childFrames()) this._removeFramesRecursively(child);
                              ^

TypeError: Cannot read properties of undefined (reading 'childFrames')
    at FrameManager.removeChildFramesRecursively (/root/node_modules/playwright-core/lib/server/frames.js:337:31)
    at FrameManager.frameCommittedNewDocumentNavigation (/root/node_modules/playwright-core/lib/server/frames.js:169:10)
    at FFPage._onNavigationCommitted (/root/node_modules/playwright-core/lib/server/firefox/ffPage.js:211:30)
    at FFSession.emit (node:events:390:28)
    at /root/node_modules/playwright-core/lib/server/firefox/ffConnection.js:247:41
</code></pre></div>
<p dir="auto">I have also done about 70k website crawls with Chromium and Webkit each without observing a crash at this location, so this seems Firefox-specific.</p>