electron: findInPage can freeze the whole app

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:
    • 6.x
  • Operating System:
    • macOS 10.14.6
  • Last Known Working Electron version:
    • unknown

Expected Behavior

When one use webContents::findInPage method, it should not freeze the app.

Actual Behavior

On some verify specific conditions, it happens that calling webContents::findInPage can freeze the whole app. We are yet unsuccessful to reproduce the issue in Electron Fiddle. We haven’t found all the parameters that triggers the issues. I created this issue mainly to help us debug and be able to provide more information afterwards Additionnal information:

  • found-in-page event is not received when it crashes
  • ~The crash only happens in the first ~2seconds after the webContents in created. After that, no more freeze~ It can crash after those 2 seconds, but it’s not 100% of the time
  • It can crash after the first findInPage call or subsequent ones (with or without findNext: true)
  • We reproduce the issue with any webviews in our application 100% of the time
  • We have multiple webviews behind each others
  • We have multiple BrowserWindow (the visible one that crashes, and an invisible one)
  • We tried to unplug all custom configuration on our webviews (no preload, all default webviews props), and we still have the crash
  • As we only reproduce in our app, it is difficult to test with other Electron version than 6.x for now

To Reproduce

See comment above

Additional Information

See comment above

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 15 (4 by maintainers)

Most upvoted comments

Still seeing this on Electron 17, when using findInPage in a webview that contains one or more iframes.