Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 升级Electron v29后渲染进程ipcRender报错 #467

Closed
fisheep01 opened this issue Feb 20, 2024 · 4 comments
Closed

[Bug] 升级Electron v29后渲染进程ipcRender报错 #467

fisheep01 opened this issue Feb 20, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@fisheep01
Copy link

今天Electron更新了29.0.0版本,我在项目中同步升级了一下,导致了渲染进程报错,具体报错如图
image

@fisheep01 fisheep01 added the bug Something isn't working label Feb 20, 2024
@RSS1102
Copy link
Member

RSS1102 commented Feb 20, 2024

image

可能是electron安装失败,可以参考配置:https://github.com/electron-vite/electron-vite-react/blob/main/.npmrc#L6

@fisheep01
Copy link
Author

image

可能是electron安装失败,可以参考配置:https://github.com/electron-vite/electron-vite-react/blob/main/.npmrc#L6

electron安装是正常的,只是渲染进程的ipcRenderer会报错,应该是框架中自带的preload.ts的实现有问题,如下图部分
image
作者只是遍历了自有属性,而从Electron29开始,不知道什么原因,ipcRenderer的方法是由上层原型继承而来,从而导致了遍历不到方法

@koumoe
Copy link

koumoe commented Feb 20, 2024

今天 nuc 后出现了 同样的问题.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants