Error attempting to call function in renderer window that has been closed
See original GitHub issueIssue Description
I have a head.html file which is imported into all my other html files, inside the head.html file is a script with the following code
const customTitlebar = require('custom-electron-titlebar');
new customTitlebar.Titlebar({
backgroundColor: customTitlebar.Color.fromHex('#262626')
});
Although whenever I interact with my application I get this error
Attempting to call a function in a renderer window that has been closed or released. Function provided here: Titlebar.registerListeners (D:\Projects\electron-app\node_modules\custom-electron-titlebar\lib\titlebar.js:50:28
It only appears in the console however so does not actually affect my app but I want to know why it is erroring.
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Error: Attempting to call a function in a renderer window that ...
Electron version:v1.2.3 Operating system:Mac OS X 10.11.5 page A code: const electron = nodeRequire('electron'); const remote ...
Read more >Uncaught exception: Attempting to call a function in a renderer ...
... app I get the following error: Uncaught Exception: Attempting to call a function in a renderer window that has been closed or...
Read more >Attempting to call a function in a renderer window that has ...
Attempting to call a function in a renderer window that has been closed or released. Function provided here: undefined.
Read more >BrowserWindow | Electron
If a BrowserWindow is created with show: false , the initial visibility state will be visible despite the window actually being hidden.
Read more >Call JavaScript functions from .NET methods in ASP.NET Core ...
Learn how to invoke JavaScript functions from . ... To call window. ... If you were rendering a list of map elements from...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi. I get this same error, but I can assure you that my code only executes once, as it is in Index.html:
const customTitlebar = require(‘custom-electron-titlebar’); new customTitlebar.Titlebar({ backgroundColor: customTitlebar.Color.fromHex(‘#444’), icon: ‘./assets/icon.png’ });
See screenshot
Got the same issue, using version 3.1.0.
It happens i.e. when my app lost focus and then gets focus again. Resulting output:
so from
registerListeners
.