title: win.reload showing showing blank white window in electron
body: <p>I need to reload my site/app after network re-connect. So, I'm using <a href="https://electronjs.org/docs/api/browser-window#winreload" rel="nofollow noreferrer">win.reload</a> after reconnect but after reloading it shows me a blank white screen </p>
  
  <p>I have tried to re-create the window but it gives me the same output. Another question reported <a href="https://stackoverflow.com/questions/55969581/re-creation-of-main-window-shows-blank-page-in-electronjs">here</a> by me.</p>
  
  <p>I found <code>window.location.href</code> is set to "chrome-error://chromewebdata/" after reload</p>
  
  <p>This sample code from is main.js</p>
  
  <pre class="lang-js prettyprint-override"><code>  let mainWindow = null;
    let offlineWindow = null;
    let loadingwindow = null;
    let mainWindowWidth = 1100;
    let mainWindowHeight = 650;
  
    var nativeApp = {
      appUrl: "https://google.com",
      connected: false
    }
  
    function createWindow () {
      // Create the browser window.
      mainWindow = new BrowserWindow({
        webPreferences: {
          nodeIntegration: false,
          preload: path.join(app.getAppPath(), 'preload.js')
        },
        minWidth: mainWindowWidth,
        width: mainWindowWidth,
        minHeight: mainWindowHeight,
        height: mainWindowHeight,
        show: false
      });
  
      createLoadingWindow();
  
      mainWindow.once('ready-to-show', () =&gt; {
        closeLoadingWindow();
        mainWindow.show();
      });
  
     mainWindow.setMenu(null);
     mainWindow.loadURL(nativeApp.appUrl);
     mainWindow.webContents.openDevTools();
   }
  
    function createLoadingWindow(){
      // codes to create the loading window
      // .....
    }
  
    function createOfflineWindow(){
      // codes to create the offline window
      //....
    }
  
    function checkAndConnect() {
      checkInternet(function (connected) {
        if (!connected) {
          if (!offlineWindow) { createOfflineWindow(); }
        } else {
          if (offlineWindow) {
            offlineWindow.close();
            mainWindow.reload();
          }
        }
        nativeApp.connected = connected;
      });
    }
  
    function checkInternet(callback) {
      if(navigator.onLine){
        return callback(true);
      }
      return callback(false);
    }
  </code></pre>
  
  <p>I need to reload my site/app after re-connection. Is there anything wrong in my code? or is it a bug by the electron?</p>