问题
Issue: I'm trying to reopen my main window after network reconnect. But it not working properly. It just shows a white blank page.
What I found: I have enabled developer tools for the main window. And I found URL is not right.
Console tab
window.location.href
//showing "chrome-error://chromewebdata/" as url
And another thing is developer tools of the old main window is still there.
This error is getting even if I'm trying to reload the main window.
This error is not going even after if I'm creating the new main window again after on closed event of the main window
I'm doing this from main.js after re-connection
if (networkErrorWindow && connected) {
networkErrorWindow.close();
mainWindow.close();
createWindow();
}
来源:https://stackoverflow.com/questions/55969581/re-creation-of-main-window-shows-blank-page-in-electronjs