question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Electron firstWindow times out after upgrading to 1.28.1

See original GitHub issue

Issue has been reported with 1.28.0: https://github.com/microsoft/playwright/issues/18928 but it was not fixed with https://github.com/microsoft/playwright/pull/18972 (1.28.1)

Context:

  • Playwright Version: 1.28.1
  • Operating System: Tested on Windows and Mac
  • Node.js version: 16
  • Browser: Electron
  • Extra: Wasn’t a problem in 1.27.1 or below. Repros 100% of the time after upgrading.

Code Snippet

import { ElectronApplication, Page, _electron as electron } from "playwright";

(async () => {
  const electronApp = await electron.launch({
            args: [path.join(__dirname, "../dist/App.js"),
            '--enable-logging',
            '--skip-welcome',
            '--disable-telemetry',
            '--no-cached-data',
            ],
            env: {
                automation: "1",
                authConfig: JSON.stringify(config),
            }
        });
  const page = await electronApp.firstWindow(); // times out after 30 seconds
})();

Describe the bug

After upgrading to 1.28.0 or 1.28.1, Electron tests are all timing out. Downgrading to 1.27.1 resolves the issue. Example test to assist in repro can be found here

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
cawa-93commented, Dec 22, 2022

Probably fixed in 1.29.1

3reactions
benoitfcommented, Dec 12, 2022

There is a template repository https://github.com/cawa-93/vite-electron-builder Update of playwright is failing on https://github.com/cawa-93/vite-electron-builder/pull/874 due to a timeout (as described by this issue)

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - Electron application exits immediately after starting
EDIT: This problem resurfaced when an attempt to upgrade to Electron 8.2.2 failed because the application was running in a debugger.
Read more >
@playwright/experimental-ct-svelte: Versions | Openbase
1.28.1. latest. 19 days ago. Highlights. This patch release includes the following bug ... [BUG] Electron firstWindow times out after upgrading to 1.28.0 ......
Read more >
ElectronApplication | Playwright - CukeTest
You can use electron.launch([options]) to obtain the application instance. ... value when the waiting should resolve. timeout <number> maximum time to wait ...
Read more >
electron-builder
A complete solution to package and build a ready for distribution Electron app for macOS, Windows and Linux with “auto update” support out...
Read more >
Advanced Installation Instructions | Electron
To install prebuilt Electron binaries, use npm. The preferred method is to install Electron as a development dependency in your app:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found