#I have a question. My electron user opens the page and no UI appears.
21 messages · Page 1 of 1 (latest)
This one of mine is open and works normally but the user Can't open and a window like this appears.
Share code, config, errors, details....
function Test {
const win = new BrowserWindow({
width: 990,
height: 730,
resizable: false,
frame: false,
transparent: true,
webPreferences: {
preload: path.join(__dirname, "preload.js"),
nodeIntegration: true,
contextIsolation: false,
enableRemoteModule: true,
devTools: false,
},
});
win.loadFile("interface/index.html");
ipc.on('closeX', () => {
cmd.exec('taskkill /IM "FiveM.exe" /F', (err, stdout, stderr) => {
})
win.close()
})
ipc.on('minimize', () => {
win.minimize()
})
ipc.on('openWebsite', (e, url) => {
cmd.exec("start " + url.toString(), (err, stdout, stderr) => {
if (err) {
cmd.exec('start '+ url.toString())
}else{
return;
}
});
});
}
app.whenReady().then(() => {
Test()
})
app.on('window-all-closed', () => {
cmd.exec('taskkill /IM "FiveM.exe" /F', (err, stdout, stderr) => {
console.log(stdout)
})
if (process.platform !== 'darwin') app.quit()
})
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) createWindow()
})
@simple hornet
it is not full code
this full code
In which part?
Yes, the program icon shows up and pops out.
or run application from command line
error gpu process code 18
The error_code=18 suggests that the GPU process has crashed, which is causing the Chrome browser to crash as well. This is likely due to a compatibility issue between the version of Chrome and the GPU driver on your new laptop. You could try updating the GPU driver on your new laptop to see if that resolves the issue.
This involves using Older version of "electron": "^19.0.8" ?