I've created an application using ionic-react and used capacitor to build an electron app. I'm using electron forge to package and distribute my application.
I've configured my app to run in the background and create a window when user needs to see a particular set of data. So I'm invoking a function periodically on the electron code to check the database every 2 hours if this particular set of data is present for the user. When the user puts their system in sleep this function is still running is what I believe. So after 2 days of user putting their laptop on sleep and reopening it, the app window is created and all the functionalities are working fine but the 'Close' function which I had written on the electron code and bridged it to my UI using ipc main and ipc renderrer process doesn't seem to work. I checked the memory consumption of the app on Mac and the virtual memory was 1.4TB but this seems to be normal with electron apps and the other one was shared memory which was usually around 40mb but when the app was not working it was around 150mb. I'm trying to narrow down the issue but I'm not really able to understand what exactly is happening here