question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not work with electron@14 since `enableRemoteModule` removed

See original GitHub issue

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 😃

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
artus9033commented, Sep 1, 2021

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.

1reaction
kku39commented, Sep 1, 2021

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

enableRemoteModule is missing from Electron v14 ...
I've upgraded to Electron 14, refactored my project to accomodate for the "Removed: remote module" breaking change, but I'm unable to compile it...
Read more >
Breaking Changes
In Electron 14, worldSafeExecuteJavaScript will be removed. There is no alternative, please ensure your code works with this property enabled. It has been ......
Read more >
Electron's 'remote' module considered harmful | by Jeremy Rose
When a renderer process accesses a remote object, for example to read a property or call a function, the renderer process sends a...
Read more >
electron/remote
electron/remote` is an [Electron](https://electronjs.org) module that bridges JavaScript objects from the main process to the renderer ...
Read more >
electron/remote: Versions
2.0.0 (2021-09-14) Bug Fixes. change enableRemoteModule to .enable() for electron@14 (#72) (4bf63f8). BREAKING CHANGES. This removes the enableRemoteModule ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found