Skip to content
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] Playwright Electron getting "TimeoutError: electron.launch" #28547

Closed
Omikens opened this issue Dec 8, 2023 · 5 comments
Closed

[BUG] Playwright Electron getting "TimeoutError: electron.launch" #28547

Omikens opened this issue Dec 8, 2023 · 5 comments

Comments

@Omikens
Copy link

Omikens commented Dec 8, 2023

System info

  • Playwright Version: v1.40
  • Operating System: macOS 13.6.1 Ventura
  • Browser: Electron desktop app (Figma)
  • Other info: Node.js 19.5.0

I have a set of automated tests written in Javascript + Playwright Electron experimental support. Those tests are using Figma desktop app for MacOS. With version of Figma desktop app 116.14.9 and below, those tests were functioning properly. Since version 116.15.4 I am getting "TimeoutError: electron.launch: Timeout 30000ms exceeded" during the "electron.launch()" method.
The app is launched "properly" but it is waiting endlessly for something, the tests do not proceed past the "electron.launch()" even though the app seems to be already fully launched.
I tried various solutions and I am sure that the issue is related to version of the desktop app that I am trying to launch.

Is this specific case and internal issue with Figma desktop app or maybe playwright does not support newest version of electron that Figma might be now using?

I also asked Figma support and I am waiting for their response.

Source code

I cannot provide source code of my tests but simple launch of Figma desktop app should reproduce the issue.

electronApp = await electron.launch({
    executablePath: '/Applications/Figma.app/Contents/MacOS/Figma',
    colorScheme: 'dark',
});

Steps

Expected

App launches and tests are run.

Actual

App launches and the code does not proceed further. Timeout occurs.

@dgozman
Copy link
Contributor

dgozman commented Dec 8, 2023

@Omikens What's the underlying Electron version? There has been a recent regression with the newest Electron versions, which should be fixed in the next Playwright v1.41 release.

@Omikens
Copy link
Author

Omikens commented Dec 8, 2023

@dgozman From what I was able to found, Figma desktop app version 116.15.4 is using:

  • Electron 26.2.4, Chromium 116.0.5845.190, Node.js 18.16.1

@dgozman
Copy link
Contributor

dgozman commented Dec 8, 2023

@Omikens We fixed a problem for Electron 28+ recently (#28499), so that's probably something else. Unfortunately, I don't think we have enough bandwidth to debug the Figma desktop app right now, so any insights would be appreciated.

@mxschmitt
Copy link
Member

Closing as per above. Feel free to re-file if you still encounter any issues.

@Omikens
Copy link
Author

Omikens commented Dec 16, 2023

For future readers that might encounter the same issue.

I got response from Figma team, according to them they are having some issues with playwright. But they provided me a workaround that seems to be working properly. Just pass env var FIGMA_TEST and set it to 1 when launching the app. Example code that is working:

electronApp = await electron.launch({
    env: { FIGMA_TEST:1 },
    executablePath: '/Applications/Figma.app/Contents/MacOS/Figma',
    colorScheme: 'dark',
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants