4

Trying to setup Electron on my computer, to setup .exe files for my HTML/CSS/JS projects

I'm currently developing on Windows and got this:

[3088:0525/235414.074:ERROR:gpu_process_host.cc(991)] GPU process launch failed: error_code=18 [3088:0525/235414.145:ERROR:gpu_process_host.cc(991)] GPU process launch failed: error_code=18 [3088:0525/235414.157:ERROR:gpu_process_host.cc(991)] GPU process launch failed: error_code=18

[3088:0525/235414.161:ERROR:gpu_process_host.cc(991)] GPU process launch failed: error_code=18
[3088:0525/235414.163:ERROR:gpu_process_host.cc(991)] GPU process launch failed: error_code=18
[3088:0525/235414.165:ERROR:gpu_process_host.cc(991)] GPU process launch failed: error_code=18
[3088:0525/235414.171:ERROR:gpu_process_host.cc(991)] GPU process launch failed: error_code=18
[3088:0525/235414.173:ERROR:gpu_process_host.cc(991)] GPU process launch failed: error_code=18
[3088:0525/235414.176:ERROR:gpu_process_host.cc(991)] GPU process launch failed: error_code=18
[3088:0525/235414.176:FATAL:gpu_data_manager_impl_private.cc(448)] GPU process isn't usable. Goodbye.


I'm installing and setting up the framework and was expecting a simple "Hello from Electron with Bulma CSS" displayed on a web page

Current directory is: C:\proyectos\electron\testapp

package.json file:

{
  "name": "testapp",
  "version": "1.0.0",
  "description": "My Electron test app",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "electron ."
  },
  "author": "Enrique Sifontes",
  "license": "BSD-2-Clause",
  "devDependencies": {
    "electron": "^30.0.8"
  }
}

Index.html file:

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
    <!-- CSP is a PITA ;). Disabled, don't try this at home!-->
    <meta http-equiv="Content-Security-Policy" content="">
    <!-- include bulma css -->
    <link rel="stylesheet" href="bulma/css/bulma.min.css">
    <title>My Test App</title>
    <script>
        window.addEventListener('load', (event) => {
            document.querySelector(".hello").textContent = "Hello from Electron with bulma css!";
        });
    </script>
</head>

<body>
    <section class="section">
        <div class="container">
            <div class="notification is-warning has-text-centered hello">
                
            </div>
        </div>
    </section>
    <script defer src="./index.js"></script>
</body>

</html>

index.js file:

//This is the way to include modules with Node.js, in this case the 
//Electron module.
//You can learn more about importing modules by searching
//information about "CommonJS" modules on the internet
const { app, BrowserWindow } = require('electron')

//Create our main windows, here you can set the initial size.
const createWindow = () => {
  const win = new BrowserWindow({
    width: 800,
    height: 600
  })
  //The HTML file that will be shown, we will create this file in the next section.
  win.loadFile('index.html')
}

//This is our starting event, once "Ready", create our main window.
app.whenReady().then(() => {
  createWindow()
})
4
  • Really??? Nobody?
    – easr97
    Commented Jun 5 at 19:58
  • Facing the same issue while trying to run vscode on ubuntu. The `--verbose`` option returns the same error ending by Goodbye. Commented Jun 6 at 0:21
  • check out the Q about the recent similar crashes on linux: stackoverflow.com/q/78584630/6041933 See if the solutions there will help
    – Kukuster
    Commented Jun 6 at 19:57
  • Dear Kukuster. As you might see there are only 2 coincidences, nothing more: [3088:0525/235414.176:ERROR:gpu_process_host.cc(991)] GPU process launch failed: error_code=18 [3088:0525/235414.176: FATAL:gpu_data_manager_impl_private.cc(448)] GPU process isn't usable. Goodbye. [19814:0606/134456.415235:WARNING:gpu_process_host.cc(1364)] The GPU process has crashed 6 time(s) [19814:0606/134456.415243: FATAL:gpu_data_manager_impl_private.cc(448)] GPU process isn't usable. Goodbye. But thanks for the shot.
    – easr97
    Commented Jun 7 at 2:42

0

Browse other questions tagged or ask your own question.