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.launch: Process failed to launch on Ubuntu github action

See original GitHub issue

Context:

Describe the bug

I’m trying to run a simple electron test on different platforms. The test works on Windows (In GH action and on the local machine), on macos in GH action but does not work on Ubuntu in GH action. Unfortunately, I do not have the ability to test this on Ubuntu on a local machine.

Error: electron.launch: Process failed to launch!
 ❯ tests/e2e.spec.ts:10:31
      8| 
      9| beforeAll(async () => {
     10|   electronApp = await electron.launch({args: ['.']});
       |                               ^
     11| });
     12| 

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
cawa-93commented, Feb 9, 2022

This fix for me:

- - run: npm run test:e2e

+ - run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test:e2e
+ if: matrix.os == 'ubuntu-latest'
+ - run: npm run test:e2e
+ if: matrix.os != 'ubuntu-latest'
2reactions
ncaqcommented, Jul 30, 2022

I solve to env of extends.

env: { ...process.env, NODE_ENV: 'development' },
Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] Electron not running in GitHub actions CI for ubuntu ...
I was running into this same issue, and it seems the most likely issue is the electron process failing on startup immediately. If...
Read more >
[BUG] Electron app hangs during launch process · Issue #9351
It seems that attaching the debugger, which happens on the previous 2 lines of code, causes the process to hang after emitting "Waiting...
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 >
"gpu process launch failed: error_code=40" · Issue #32074 ...
When I opened the app, the app should be launched without any error. Actual Behavior. Created a demo electron app with electron version>=10...
Read more >
Electron 5 failing to launch on WSL #17321 - GitHub
The link is that the GPU process is launched sandboxed in v5, even if no renderer processes are. Does Chromium launch without error...
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