electron/remote

Not work with electron@14 since `enableRemoteModule` removed

kku39 opened this issue ยท 6 comments

kku39 commented

I am testing electron@14.0.0-beta.23 with my project, also using @electron/remote@1.2.1.

It raises error:

electron/js2c/renderer_init.js:81 Error: @electron/remote is disabled for this WebContents. Set {enableRemoteModule: true} in WebPreferences to enable it.

, though I already set enebleRemoteModule: true and it works well with electron@13.

I guess this may already be being addressed for the standard release, but I wanted to report it just in case, thanks :)

14.0.0 stable is now released

kku39 commented

Thanks for informing.

I tried with electron@14.0.0 and same issue occurred.

The error raises and the app not works.

Could you guys check it out again, please?

Indeed, the issue exists in v14. Turns out there is no way to enable the remote module for now - the enableRemoteModule option has been removed, although @electron/remote requires it to be enabled.

After experimentally checking the approach, it seems like simply disabling the enableRemoteModule check fixes the issue on electron@14. I added a PR with conditionally disabled check in case of electron >= 14.

๐ŸŽ‰ This issue has been resolved in version 2.0.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€