github
github copied to clipboard
Attempting to call a function in a renderer window that has been closed or released. Function provided here: Object.<anonymous>
Description
When Atom is closed an error is printed to the CLI it was launched from about an attempt to call to a renderer window that has been closed.
Steps to Reproduce
- Open Atom
- Close Atom
Expected behavior:
No errors printed to the terminal.
Actual behavior:
The following error stack is printed to the terminal:
Attempting to call a function in a renderer window that has been closed or released. Function provided here: Object.<anonymous> (C:\Temp\atom\out\Atom x64\resources\app\node_modules\github\lib\worker.js:65:20.
Error: Attempting to call a function in a renderer window that has been closed or released. Function provided here: Object.<anonymous> (C:\Temp\atom\out\Atom x64\resources\app\node_modules\github\lib\worker.js:65:20.
at WebContents.callIntoRenderer (C:\Temp\atom\out\Atom x64\resources\electron.asar\browser\rpc-server.js:190:19)
at emitOne (events.js:101:20)
at WebContents.emit (events.js:188:7)
Reproduces how often:
100% of the time, whether in safe mode or not.
Versions
Windows 10 x64
Build from https://github.com/atom/atom/pull/14372/commits/4cbff3044604988e2c2553af0d78e71c13c25696.
Atom : 1.18.0-dev-4cbff3044 x64 Electron: 1.3.15 Chrome : 52.0.2743.82 Node : 6.5.0
[email protected] (bundled in the build)
Additional Information
Whether the github panel is opened or not doesn't seem to matter. The project that was open had 2 changed files.
This is only when you quit Atom, not when only closing a single window, correct?
Correct.
Okay. This is a race down in Electron's RPC code. I'll provide some more context tomorrow but I'm not sure of an easy fix yet.
@Arcanemagus Just confirming — you said that this was fixed for you, right?
I wasn't seeing it on a build based on https://github.com/atom/atom/pull/14372/commits/30ee14bd1317c5d15568d4cfae08bb4eb46a0a23, although you pointed out seeing a similar message in the build from that commit here.
Hmmm, this is actually back on a build of https://github.com/atom/atom/pull/14372/commits/fb9fd2fbfcf2f6fa07f43efcde20d4ee109df6a4.
Stack trace has changed slightly:
Attempting to call a function in a renderer window that has been closed or released. Function provided here: Object.<anonymous> (C:\Temp\atom\out\Atom x64\resources\app\node_modules\github\lib\worker.js:70:22.
Error: Attempting to call a function in a renderer window that has been closed or released. Function provided here: Object.<anonymous> (C:\Temp\atom\out\Atom x64\resources\app\node_modules\github\lib\worker.js:70:22.
at WebContents.callIntoRenderer (C:\Temp\atom\out\Atom x64\resources\electron.asar\browser\rpc-server.js:190:19)
at emitOne (events.js:101:20)
at WebContents.emit (events.js:188:7)
Here's a stack trace from a build based on merging the Electron 1.6 and Node.js 7 branches into master:
Attempting to call a function in a renderer window that has been closed or released.
Function provided here: Object.<anonymous> (C:\Temp\atom\out\Atom x64\resources\app\node_modules\github\lib\worker.js:70:22
Remote event names: destroyed, crashed
Looks like it might have a tad more information, likely due to the Electron update.
Interestingly on the released Atom v1.18.0-beta0 I don't see a message from this, but if I build the same commit I see the stack trace from https://github.com/atom/github/issues/769#issuecomment-300633172 so there must be some sort of wrapper in the installer version that is hiding that message.
Having the same issue.. Did you ever resolve it?
I had the same error. My trick is to change the rights for the ~/.atom/nohub.out file.
$ sudo chown username ~/username/.atom/nohup.out
Hope it helps.
In the settings, there's an option "Restore Previous Windows on Start". If you set it to "no", it will fix the problem, at least for me. Hope this would help.
@pachevalier Hi, I'm getting same error message and I'm not able to solve it. @anonymousrice solution didn't work for me. Could you explain it in more detail please? I'm sorry to bother with a (probably) newbie question but I'm jut starting with all of this. Thank you
Exactly same error for me with electron 3.0.10 on macOS Mojave.
electron Attempting to call a function in a renderer window that has been closed or released.
Function provided here: makePdf.js:150:13
Remote event names: closed
I had the same error. My trick is to change the rights for the ~/.atom/nohub.out file.
$ sudo chown username ~/username/.atom/nohup.out
Hope it helps.
yes that is the solution. Although you are being redundant ~/username/.atom/nohup.out best to give whole path and recursive to clean up stuff
sudo chown -R USERNAME /home/USERNAME/.atom
Linking to a bunch of places
Issues with the same name: https://github.com/atom/atom/issues/19161 https://github.com/electron/electron/issues/24772 https://github.com/atom/github/issues/954
In the wild: https://github.com/atom/atom/issues/22872 https://github.com/search?p=1&q=Attempting+to+call+a+function+in+a+renderer+window+that+has+been+closed+or+released&type=Code
There's also two versions of this error, not windows...
Attempting to call a function in a renderer window that has been closed or released.
Function provided here: worker.js:60:22
Remote event names: crashed, destroyed
and windows
Attempting to call a function in a renderer window that has been closed or released.
Function provided here: Object.<anonymous> (D:\a\github\github\lib\worker.js:60:22
Remote event names: crashed, destroyed