Win10电子错误:不支持直通,GL被禁用,角度为 [英] Win10 Electron Error: Passthrough is not supported, GL is disabled, ANGLE is

查看:18
本文介绍了Win10电子错误:不支持直通,GL被禁用,角度为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个电子回忆录(https://github.com/MartinBarker/RenderTune),当运行命令提示符时,它在Windows10上运行得很好。几个月后,我回到了一台安装了NVIDIA图形处理器的全新Windows 10机器上,电子应用程序在启动时在窗口中打印了一个错误:

Uncaught TypeError: Cannot read properties of undefined (reading 'getCurrentWindow')

运行ffmpeg外壳命令也会导致错误,并且在命令提示符终端中会输出以下消息:

[14880:1207/145651.085:ERROR:gpu_init.cc(457)] Passthrough is not supported, GL is disabled, ANGLE is

我检查了我的其他Windows笔记本电脑,运行与我的repo主分支完全相同的代码,它在本地运行时运行得非常好。

这似乎是最近出现的问题?我发现它在不同的论坛上都有讨论: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1944468

https://www.reddit.com/r/electronjs/comments/qdauhu/passthrough_is_not_supported_gl_is_disabled_angle/

我尝试将我的Global Electronics NPM程序包升级到较新的版本:Electronics@16.0.4,但仍然出现错误。

推荐答案

您可以尝试使用app.disableHardwareAcceleration()(See the docs)关闭硬件加速。不过,我不认为这是一个解决办法,它只是让我的信息消失了。


用法示例

main.js

import { app, BrowserWindow } from 'electron'
import isDev from 'electron-is-dev'

app.disableHardwareAcceleration()

let win = null

async function createWindow() {
  win = new BrowserWindow({
    title: 'My Window'
  })

  const winURL = isDev
    ? 'http://localhost:9080'
    : `file://${__dirname}/index.html`
  win.loadURL(url)

  win.on('ready-to-show', async () => {
    win.show()
    win.maximize()
  })
}

app.whenReady().then(createWindow)

app.on('window-all-closed', () => {
  win = null
  if (process.platform !== 'darwin') {
    app.quit()
  }
})

这篇关于Win10电子错误:不支持直通,GL被禁用,角度为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆