You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
We do plan to revisit the Electron SDK code and update it for more modern Electron versions. We don't have a time frame for that yet— it has been a low priority because we haven't had much demand for Electron— but we expect that our next release will be a major version release that will revise the architecture to address issues like this, and will also drop support for EOL versions of Electron (which currently would mean all versions below 14).
We're using electron 18.2.4. The client works fine on the main process, but fails on the renderer on this call:
functiongetMainEntryPoints(){// See mainEntryPointsFromRenderer.jsreturnelectron.remote.require('launchdarkly-electron-client-sdk/src/mainEntryPointsFromRenderer');}
It seems like electron 18 doesn't expose a remote method anymore, even if I specify enableRemoteModule: true on my BrowserWindow's webPreferences,
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
launchdarkly-electron-client-sdk
in Electron renderer process, with Electron version 10+.(In our case, we are using it in the renderer preload script)
remote
is undefinedWorkaround:
enableRemoteModule: true
towebPreferences
ofBrowserWindow
launchdarkly-electron-client-sdk
in the renderer.Expected behavior
Importing
launchdarkly-electron-client-sdk
withoutenableRemoteModule: 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
The text was updated successfully, but these errors were encountered: