[BUG] - Electron hangs closing the context
See original GitHub issueContext:
- Playwright Version: 1.20
- Operating System: Windows 11
- Node.js version: v16.13.0
- Browser: ELECTRON
I use playwright to test both browser and electron. application is created with vue, vite and electron 18.2.0, and i cannot share sources in a repo for this issue. test is the same on browser and on electron, on browser, browser is opened with this
const browserContext = await webBrowser.newContext({
locale: language,
recordVideo: {
dir: 'browser-videos/',
size: { width: 640, height: 480 },
},
recordHar:{
path:"browser-network.har"
}
})
application = await browserContext.newPage()
on electron , electron is opened with this
const electronApp = await electron.launch({
recordVideo: {
dir:"./electron-test-run-videos",
size:{
width:1280,
height:720
}
},
recordHar:{
path:"electron-network.har"
}
})
application = electronApp.firstWindow
due i want to store the har, has documented, i need to close the context. So at the end of the test, i do
await application.context().close
await application.close
Describe the bug
- with browser, it works: i close the context and the har file is generated.
- with electron, if i don’t close the contest, test pass but har file is not generated.
- with electron, test hangs waiting until general timeout closing the context without trhow any exception, and at the end, the har file is generated.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Electron.js app freezes after an hour unused [closed]
I wrote an app with electron.js and vuetify.js for Windows 64bit; ... hangs up and does not work, and the user is forced...
Read more >Interop's Labyrinth: Sharing Code Between Web & Electron ...
The main process bootstraps the app and coordinates other processes in the background, while the renderer process is responsible for what the user...
Read more >BrowserWindow | Electron
Calling event.preventDefault() will cancel the close. Usually you would want to use the beforeunload handler to decide whether the window should be closed, ......
Read more >Electron Releases - GitHub Pages
The <webview> element now emits the context-menu event from the underlying webContents object. 1.4.14 January 10, 2017. Bug Fixes. Fixed a crash when...
Read more >Demo app crashed on join meeting - Zoom Developer Forum
Additional context objc[6496]: Class NSTaskLauncher is implemented in both /Users/yongxingdeng/stenolabs/zoom-sdk-electron/demo/node_modules ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Closing for now, but if you do happen to find a repro you can share, please file a new issue that references this one!
i’m so sorry, i cannot in this time 😦 i will try updating versions and when i could publish a demo version i’ll update this issue again.