Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

Unable to use enableRemoteModule in #71

Open
thamara opened this issue Sep 6, 2020 · 1 comment
Open

Unable to use enableRemoteModule in #71

thamara opened this issue Sep 6, 2020 · 1 comment

Comments

@thamara
Copy link

thamara commented Sep 6, 2020

Electron 10 has a breaking change that is that enableRemoteModule now defaults to false. Although migrating out of the use of the remote module is the best (and suggested) practiced, electron apps might still rely on the remove module and because jest-electron-runner has no option to force enableRemoteModule, running tests with electron 10 becomes impossible.

I have changed locally jest-electron-runner to use force enableRemoteModule and my tests started to work as expected. So my suggestion would be to make a configuration for enabling it, but I'm not sure how to do, or if it should indeed be done. I'm willing to take this issue, but I would like to hear from you on the best way of doing this.

To be honest, I'm not sure if there are other options (besides not using remote module), that would allow me to upgrade my app to electron 10, and still be able to run my tests with jest-electron-runner. So, f you have any inputs on this, I would be very grateful. :)

@aguynamedben
Copy link
Contributor

Any details on the upgrade path people are finding helpful here would be appreciated.

We need to upgrade to Electron 11 due to this Electron bug that causes autoUpdater.quitAndInstall() to fail to relaunch on macOS Big Sur: electron/electron#25626.

With Electron 11, we've turned on the enableRemoteModule flag for our app until we can remove all usage, and our app runs fine on Electron 11, but tests fail because the flag is not flipped when tests are run.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants