New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DeprecationWarning with Electron 8.0.0 #180
Comments
Thank you for the detailed report, I'll investigate it a bit later. |
getting same error when used local html file path to |
@BVSPHari Could you provide a code example which produces such a warning? |
This still happens with test.js const { app, BrowserWindow } = require('electron');
const log = require('electron-log').scope('main');
let win;
app.once('ready', () => {
win = new BrowserWindow({
webPreferences: {
nodeIntegration: true,
},
});
log.info('Created window!');
win.loadURL(`file:///${__dirname}/index.html`);
}); index.html <!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Test</title>
</head>
<body>
<h1>Hello</h1>
<script>
require('electron-log').scope('renderer').info('Hello!');
</script>
</body> |
Thank you for the example @raphinesse, I'll try to fix that on this week. |
Thanks for your quick fix. Works great for me! 🏅 |
Hi,
a deprecation warning is being shown when electron-log is used with Electron 8.0.0 and
webPreferences: { nodeIntegration: true }
is set.(node:69267) 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.
The problem seems to be these 2 lines
https://github.com/megahertz/electron-log/blob/master/src/transports/ipc.js#L28
https://github.com/megahertz/electron-log/blob/master/src/electronApi.js#L123
related to this change electron/electron#20214
Steps to reproduce
test.js
index.html
The text was updated successfully, but these errors were encountered: