Describe the bug
Starting in Electron version 10, the electron remote module is disabled by default. You have to manually enable it, and the Electron docs recommend moving away from using it (For many reasons see this article).
As we are using the launchdarkly-electron-client-sdk in an Electron version greater than 10, we had to enable remote module to use it. I was wondering if there are any plans to upgrade the code and move away from the remote module.
To reproduce
- Import
launchdarkly-electron-client-sdk in Electron renderer process, with Electron version 10+.
(In our case, we are using it in the renderer preload script)
- Renderer fails to load, and can see error messages that electron
remote is undefined
Workaround:
- Add
enableRemoteModule: true to webPreferences of BrowserWindow
- Or: implement custom IPC methods to communicate from main to renderer and don't use
launchdarkly-electron-client-sdk in the renderer.
Expected behavior
Importing launchdarkly-electron-client-sdk without enableRemoteModule: true should work without errors.
Logs


SDK version
1.6.3
Language version, developer tools
Electron: 13.6.3, Typescript: 4.6.0
OS/platform
macOS 11.6
Describe the bug
Starting in Electron version 10, the electron
remotemodule is disabled by default. You have to manually enable it, and the Electron docs recommend moving away from using it (For many reasons see this article).As we are using the launchdarkly-electron-client-sdk in an Electron version greater than 10, we had to enable remote module to use it. I was wondering if there are any plans to upgrade the code and move away from the remote module.
To reproduce
launchdarkly-electron-client-sdkin Electron renderer process, with Electron version 10+.(In our case, we are using it in the renderer preload script)
remoteis undefinedWorkaround:
enableRemoteModule: truetowebPreferencesofBrowserWindowlaunchdarkly-electron-client-sdkin the renderer.Expected behavior
Importing
launchdarkly-electron-client-sdkwithoutenableRemoteModule: trueshould work without errors.Logs


SDK version
1.6.3
Language version, developer tools
Electron: 13.6.3, Typescript: 4.6.0
OS/platform
macOS 11.6