electron: IPC deprecation warnings do not appear for all necessary cases
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for an issue that matches the one I want to file, without success.
Issue Details
- Electron Version: 8.1.0
- Operating System: macOS 10.13.6
- Last Known Working Electron version: N/A
Expected Behavior
Sending a function over IPC should show deprecation warning on any OS.
DeprecationWarning: Passing functions, DOM objects and other non-cloneable JavaScript objects to IPC methods is deprecated and will throw an exception beginning with Electron 9.
Actual Behavior
Warning only appears on macOS.
To Reproduce
ipcRenderer.send('some-channel', () => {});
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (16 by maintainers)
@nornagon thanks for your reply.
Eventually I found that it seems to be caused by using
electron-log, specifically version3.x. Upgrading did resolve it.Whatever about the logger was triggering the errors - it didn’t produce warnings in
8.xeven on Linux/macOS.I tried for a long time to debug the issue directly like your suggestion but no call stacks or anything helpful no matter how much I searched for some place to get a foot in the door and find a way to debug this.
In retrospect, the fact it was our logger itself producing the problem did no favors for finding the resolution.
While there’s definitely a real issue in here with warnings not triggering somehow, I doubt it’s worth looking into any further unless someone else runs into the same issue.
Thanks again very much for your reply.
@Slapbox yes, remote uses the same serialization system as all other IPC.
Closing as I think this is working as expected, it’s just somewhat unintuitive owing to, as Jeremy said above, weirdness with
stdouton Windows systems.pretty sure this is just because of
stdoutbeing weird on windows. I don’t think it’s specific to this message.cc @nornagon