-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Electron firstWindow() timeouts unless you open the devtools #21117
Comments
Which electron version are you using? I cannot reproduce it on mac with electron 23.1.1, can you shared a repro? |
@yury-s our app is using v21.2.2, but even after upgrading to the latest v23.0.0 the issue remains. I unfortunately cannot share a repro, is there any other information I can give you? |
We've enabled the following fuses: |
@yury-s Hey, after a ton of debugging I just wanted to let you know I think I found what the issue is. When we open our main window, we first use the
If I replace the I'm not sure if this is a bug with Playwright though. |
Thanks, that's useful information. How long does const { app, BrowserWindow } = require('electron')
const path = require('path')
async function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
preload: path.join(__dirname, 'preload.js')
}
})
await new Promise(f => setTimeout(f, 1000));
await win.loadURL('file:///Users/user/sandbox/el/app/index.html');
}
app.whenReady().then(() => {
createWindow()
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
}) |
We need more information to act on this report. As long as we can't repro it, it is unlikely with can make progress with it. Allow me to close it, but please file a new one and link to this issue when you get back to it! |
Please investigate this further. I am having this exact issue. My app hangs on firstwindow() sometimes unless i open dev tools and then playwright can suddenly see the window and fields like there was never a problem. |
Context:
System:
Binaries:
Languages:
npmPackages:
Code Snippet
Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally. For example:
Describe the bug
When I run
npx playwright test
, Playwright correctly launches the app, but the promise returned byfirstWindow()
never resolves and so the tests ultimately timeout. If I manually or programatically open the devtools, the Promise immediately resolves.I found these previous issues which describe the exact same thing, but even after downgrading to versions 1.29.1 and 1.27.1, the problem remains.
#18928
#19246
Logs when running in debug mode:
Logs when opening the devtools manually:
The text was updated successfully, but these errors were encountered: