re-creation of main window shows blank page in electronjs

流过昼夜 提交于 2019-12-13 04:33:28

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!