You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test('stress test: run electronApp.evaluate() over and over',async()=>{constapp=getApp()constiterations=1000for(leti=0;i<iterations;i++){constdisplays=awaitapp.evaluate(({ screen })=>screen.getAllDisplays())expect(displays).toBeTruthy()expect(displays.length).toBeGreaterThan(0)}})
Expected behavior
No errors
Actual behavior
When communicating with main or renderer processes, I regularly get errors similar to the following:
"context or browser has been closed"
"Promise was collected"
"Execution context was destroyed, most likely because of a navigation"
"Cannot read properties of undefined (reading 'getOwnerBrowserWindow')"
These errors seem to happen randomly. And they will also happen with methods like electronApplication.getBrowser(page) or page.evaluate()
Additional context
This seems to have started with the release of Electron 27 and has continued in subsequent versions.
I know that Electron support in Playwright is experimental. And I've been writing some workarounds for the electron-playwright-helpers library. But before I release the workarounds, I'd like to figure out what's happening.
I have yet to create a minimal reproduction that generates these errors nearly as reliably as my (maximal) application.
Version
1.49.0
Steps to reproduce
Expected behavior
No errors
Actual behavior
When communicating with main or renderer processes, I regularly get errors similar to the following:
These errors seem to happen randomly. And they will also happen with methods like
electronApplication.getBrowser(page)
orpage.evaluate()
Additional context
This seems to have started with the release of Electron 27 and has continued in subsequent versions.
I know that Electron support in Playwright is experimental. And I've been writing some workarounds for the
electron-playwright-helpers
library. But before I release the workarounds, I'd like to figure out what's happening.I have yet to create a minimal reproduction that generates these errors nearly as reliably as my (maximal) application.
Environment
The text was updated successfully, but these errors were encountered: