Error: Attempting to call a function in a renderer window that has been closed or released


page A code:

const electron = nodeRequire('electron'); const remote = electron.remote; const ipcMain = remote.ipcMain;

ipcMain.on('picker-list-update', function(event, arg) { console.log('fffff'); });

page B code:

const electron = nodeRequire('electron') const ipc = electron.ipcRenderer ipc.send("picker-list-update");

when i refresh page A then run page B renderer process code

and show error:

How to solve it?