question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Electron v8 deprecation warning

See original GitHub issue

Describe the bug This is not so much a bug but for versions 8 and above of Electron. I am using v8 and I get:

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

To Reproduce Use v8 and above of Electron.

Expected behavior I’m assuming that electron-tabs sends the webview event to main in the background. I can see the event using ‘will-attach-webview’ in main. I was trying to add src from there but still the same warning.

Please complete the following information

  • OS: Windows 10
  • electron-tabs version: 0.12.1
  • Electron version: 8

** Additionally ** Is there a reason that only ‘file’ protocol maybe used as opposed to a custom scheme protocol ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
brrdcommented, Apr 6, 2020

Demo runs fine.

So your issue is definitely not related to electron-tabs. I’m closing this thread.

Just a note, not shown here - to load my local html file (not for the webview) along with its assets I have a registerFileProtocol in main. However for the tab and webview using the custom scheme does not work. Like I can’t say in the tab configuration src: app://myfile.html, even though the scheme ‘app’ serves files. I had to use src: file://myfile.html.

electron-tab is using webview src attribute under the hood without any modification. Please ask your question in Electron forums since we do not deal with registerFileProtocol here.

// I set src and preload now in main, when will-attach-webview is called

This is not the recommended way to use electron-tabs. I can’t guarantee it will work as expected if you are using it this way.

webview.send(“open:tab”, [webview, tab]);

Not 100% sure, but your IPC warning is probably caused by this instruction, since webview.send() uses IPC and webview and tab contain DOM elements.

0reactions
stuartambientcommented, Apr 6, 2020

Thanks for the help on this one. Apologies as my webview.send() hadn’t crossed my mind earlier.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Breaking Changes | Electron
Deprecated: An API was marked as deprecated. The API will continue to function, but will emit a deprecation warning, and will be removed...
Read more >
Deprecation warning when building native addon since 5.x · Issue ...
When I build my native (C++) addon for Electron, using the latest node-gyp ... @logidelic These warnings are to be expected, V8 has...
Read more >
Electron v8.0.0 Release - GitClear
Added name of module to context-aware deprecation warning (#18397). · Fixed Linux console warning about gtk_disable_setlocale(). · Don't destroy active menus ...
Read more >
Command-line API | Node.js v19.3.0 Documentation
node --v8-options ... The v8.startupSnapshot API can be used to specify an entry point at snapshot building time, ... Silence deprecation warnings.
Read more >
Follow tutorial to make a helloworld vscode extension and get ...
(node:10929) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found