ItsSim / fsolauncher

Official FreeSO Launcher made with Electron
https://beta.freeso.org
Mozilla Public License 2.0
18 stars 9 forks source link

[Windows] Electron GPU startup errors #47

Closed ItsSim closed 1 year ago

ItsSim commented 2 years ago

Describe the bug The launcher, on certain systems, will not run at all due to a "GPU process launch failed" error. This has been reported to me by a user, externally. I have not been able to reproduce it myself and it seems like a rare occurrence.

The log (when running fsolauncher.exe from cmd) shows the following:

[9132:0829/162657.308:ERROR:gpu_process_host.cc(960)] GPU process launch failed: error_code=18 [9132:0829/162657.554:ERROR:gpu_process_host.cc(960)] GPU process launch failed: error_code=18 [9132:0829/162657.573:ERROR:gpu_process_host.cc(960)] GPU process launch failed: error_code=18 [9132:0829/162657.610:ERROR:gpu_process_host.cc(960)] GPU process launch failed: error_code=18 [9132:0829/162657.628:ERROR:gpu_process_host.cc(960)] GPU process launch failed: error_code=18 [9132:0829/162657.647:ERROR:gpu_process_host.cc(960)] GPU process launch failed: error_code=18 [9132:0829/162657.666:ERROR:gpu_process_host.cc(960)] GPU process launch failed: error_code=18 [9132:0829/162657.687:ERROR:gpu_process_host.cc(960)] GPU process launch failed: error_code=18 [9132:0829/162657.707:ERROR:gpu_process_host.cc(960)] GPU process launch failed: error_code=18 [9132:0829/162657.707:FATAL:gpu_data_manager_impl_private.cc(451)] GPU process isn't usable. Goodbye.

After some research, setting the following Chromium flags make it work (confirmed with user): app.commandLine.appendSwitch( 'no-sandbox' ); app.commandLine.appendSwitch( 'disable-gpu' ); app.commandLine.appendSwitch( 'disable-software-rasterizer' ); app.commandLine.appendSwitch( 'disable-gpu-compositing' ); app.commandLine.appendSwitch( 'disable-gpu-rasterization' ); app.commandLine.appendSwitch( 'disable-gpu-sandbox' ); app.commandLine.appendSwitch( '--no-sandbox' );

I have uploaded an alternative 1.8.13 version with these switches: https://beta.freeso.org/FreeSO%20Launcher%20Setup-alt.exe

Launcher Version 1.8.13

To Reproduce Steps to reproduce the behavior (as reported by the user):

  1. Install FreeSO Launcher
  2. Run the program (preferably through cmd to see its output)
  3. Icon appears in taskbar, but immediately closes
  4. See errors above in cmd

I, personally, could not reproduce this.

Expected behavior The launcher should be able to run, as it is a supported Windows version.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information): Information provided by the user

This Windows version is fully supported by Electron with no known issues, but there's something about this particular system (the user's) that breaks the launcher. Discord (which is another Electron-based app), apparently works correctly on all the user's devices.

Additional context I've found some GitHub issues from other projects that have dealt with the same problem. No concrete explanation for the error, though. https://github.com/electron/electron/issues/32074 https://github.com/cypress-io/cypress/issues/19924 https://github.com/altair-graphql/altair/issues/1688

ItsSim commented 1 year ago

Cannot reproduce, will see if it comes up again