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 not running in GitHub actions CI for ubuntu-latest (electron.launch: Process failed to launch!)

See original GitHub issue

Electron is failing to launch in GitHub action for ubuntu-latest.

Binaries:

  • Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
  • npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm

npmPackages:

  • playwright: ^1.18.1 => 1.18.1

I passed DEBUG: pw:browser* and got:

2022-02-15T23:41:17.849Z pw:browser [pid=12798] <process did exit: exitCode=null, signal=SIGILL>

I tried running xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test:e2e or just npm run test:e2e which maps to npx playwright test.

Everything working fine in macOS locally. I put headless: true in Playwright config. What is missing?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tanishqkancharlacommented, Nov 22, 2022

I was running into this same issue, and it seems the most likely issue is the electron process failing on startup immediately. If you’re piping your logs somewhere else (which is common for electron apps), you might not see the logs that lead to the failure.

For me specifically, the autoupdater was failing; it seems the autoupdater can’t work on unsigned Electron builds. So I had to disable the autoupdater on CI.

1reaction
dgozmancommented, Feb 16, 2022

Perhaps, similarly to #11932, you need xvfb-run because Electron is a GUI application and requires a display?

# replace "npx playwright test" with your test command
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npx playwright test

Without any logs with DEBUG=pw:browser*, we have no insights into what’s happening with that Electron process. If it were to output some error or stack trace, that would be something, but otherwise I am not sure how to help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] electron.launch: Process failed to launch on Ubuntu ...
I'm trying to run a simple electron test on different platforms. The test works on Windows (In GH action and on the local...
Read more >
microsoft/playwright-vscode - Electron failed to launch #100
When attempting to run tests using Electron 17.0.1 it appears that playwright is unable to start Electron returning a "electron.launch: ...
Read more >
[Question] how to diagnose seemingly failing electron launches
I enabled playwright based Electron smoke tests for VSCode today but had to quickly disable that again and make it not fail the...
Read more >
test: replace (webContents as any).destroy() with ... - GitHub
electron : Build cross-platform desktop apps with JavaScript, HTML, and CSS - test: ... [Bug]: GPU process launch failed when running from network...
Read more >
[Question] Failed to launch electron app when passing ...
electronApp = await electron.launch(options); Run export ELECTRON_ENV=test && ./node_modules/.bin/cucumber-js --require cucumber...
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