#54199·electron

webview.findInPage hangs Electron when window contains an iframe

Author: taozhou-gleanCreated Sep 22, 2026Updated Sep 28, 2026
Labelsplatform/macOSbug :beetle:has-repro-gist44-x-y

Preflight Checklist

Electron Version

44.4.3

What operating system(s) are you using?

macOS

Operating System Version

macOS 26.6 (25G72)

What arch are you using?

arm64 (Apple Silicon)

Last Known Working Electron version

Unknown

Does the issue also appear in Chromium / Google Chrome?

I don't know how to test

Expected Behavior

Calling webview.findInPage() should return search results and keep the Electron application responsive.

Actual Behavior

A minimal Electron app becomes unresponsive after calling native webview.findInPage() when the same window contains an iframe. The call returns synchronously, but no found-in-page event arrives and the app stops processing its event loop. The user-visible result is a complete application hang.

The attached reproduction searches for the single-character query a, but the same behavior occurs while rapidly navigating matches with Enter. The behavior reproduces with ordinary web pages as well as Google Docs.

Testcase Gist URL

https://gist.github.com/taozhou-glean/54bad8ed029baf3ef99f5a8f7ce7a560

Additional Information

In-depth investigation

I reproduced this in a clean Electron 44.4.3 app using one host-page iframe and one webview. The host iframe is intentionally tiny and hidden; removing it avoids the repro in the tested environment. The gist uses data URLs and does not depend on a specific website.

Environment:

  • Electron 44.4.3
  • Chromium 152.0.7977.130
  • macOS 26.6 (25G72), arm64, Mac15,7
  • Electron process launched from Ghostty

During the hang, a macOS sample reported the Electron main process unresponsive for 40 seconds. The main process used 4.116 seconds of CPU in a 4.20-second sampled interval and had a 352 MB footprint. Symbolicating Electron Framework 44.4.3 identified the repeated path as:

content::FindRequestManager::FinalUpdateReceived(int, content::RenderFrameHost*)
content::FindRequestManager::Traverse(content::RenderFrameHost*, bool, bool, bool)
content::(anonymous namespace)::GetChildren(content::RenderFrameHostImpl*)
content::(anonymous namespace)::GetNextSibling(content::RenderFrameHostImpl*)

This appears to be the same class of issue described in electron/electron#20602, where a comment reports an infinite loop in find_request_manager.cc with a webview and iframe. That issue is closed, and the problem remains reproducible on Electron 44.4.3.

A renderer-side window.find() implementation does not hang on the same fixture, which further isolates the failure to the native Electron/Chromium find-in-page path.

— sent via Glean Tau