I was attempting to upgrade our electron app from 5.0.10 to 6.0.3 and I’ve run into an odd issue. When closing the app the main renderer process (we use multiple BrowserWindows) sticks around after the app has quit.
We are using a frameless window and rendering our own titlebar with close button. The close button calls
remote.getCurrentWindow().close() from within the renderer process itself. Closing the app via the system tray seems to work correctly (right click and close or hover and close via the preview), and changing the window to no longer be frameless works as well (closing via the built in close button or from file->exit).
Since the default exit option from the built in menu seemed to work correctly I attempted to copy it’s click handler and invoke it when we wanted to close the app (this unfortunately didn’t work).
I’ve been able to narrow down the “cause” of the issue to a single line of code (commenting out that line fixes the problem). However copying that line of code into the electron starter doesn’t repro the issue so it has to be something else we are doing in combination with that particular line of code. The line in question is initialization of the pendo io library https://developers.pendo.io/docs/ .
What seems odd to me is electron seems to think it has fully shutdown even though the process remains. I subscribed to the
quit events and all three are called in the correct order. The process doesn’t consume any cpu but does use up memory.
At this point I have exhausted all ideas I have and am hoping to get some guidance on how to solve/debug this issue.