Window won't load unless Dev Tools are toggled


I’m just getting started with electron and just trying to load up a simple webview of YouTube.


var app = require('app');
  const BrowserWindow = require('electron').BrowserWindow;
  var win = new BrowserWindow({ width: 800, height: 600});
  win.on('closed', function() {
    win = null;
  win.loadURL('file://' + __dirname + '/index.html');
  win.toggleDevTools(); // If I remove this, it doesn't load;


<!DOCTYPE html>
    <meta charset="UTF-8">
    <title>Hello World!</title>
    <link rel="stylesheet" href="clatch.css" />
    <div id="views">
      <webview class="view active" src=""></webview>

If I don’t have the devTools toggled, it won’t load. I can close them and the webview is still fine. Any idea? Thanks.


I can make a short video to exhibit this if need be. Literally just deleting that line makes the webview not load.