<h2 dir="auto">Description</h2>
<p dir="auto">When trying to boot an electron application with electron command (directly or indirectly) electron does not boot the app, it simply exits without word, reason or logs, there are no exceptions thrown, there are no logs output, there is no indication of what is actually happening.  This was initially discovered when our tests started timing out and the ChromeDriver logs also have no details of what is going on.</p>
<ul dir="auto">
<li>Operating system: Ubuntu 16.04 x64.</li>
<li>Electron version: v1.2.4</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="doctor@who ~/development/envygeeks/easy-electron-base (master +) → 
node_modules/.bin/electron app/entry.js --enable-logging --debug --verbose"><pre class="notranslate"><code class="notranslate">doctor@who ~/development/envygeeks/easy-electron-base (master +) → 
node_modules/.bin/electron app/entry.js --enable-logging --debug --verbose
</code></pre></div>
<ol dir="auto">
<li>
<p dir="auto">Window does not load.</p>
</li>
<li>
<p dir="auto">Contents:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="require(&quot;babel-register&quot;)
require(&quot;./win&quot;)
"><pre class="notranslate"><span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"babel-register"</span><span class="pl-kos">)</span>
<span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"./win"</span><span class="pl-kos">)</span></pre></div>
</li>
<li>
<p dir="auto">Contents of win.js:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import Config from &quot;./config&quot;
import { default as electron, BrowserWindow } from &quot;electron&quot;
import AppMenu from &quot;./menu&quot;
import Dev from &quot;./dev&quot;

// --

let mainWindow
const app = electron.app
const config = global.appConfig = new Config(app)
new AppMenu(app, config).enable()

/*
* Create the main application window.
*/
function createWindow() {
mainWindow = new BrowserWindow({
  width: 1280,
  minWidth: 1024,
  minHeight: 768,
  height: 720
})

// So that electron-connect doesn't disrupt.
if (config.nodeEnv == &quot;development&quot;)
  mainWindow.minimize()

mainWindow.loadURL(`file://${__dirname}/index.html`)
mainWindow.on(&quot;closed&quot;, () =&gt; mainWindow = null)
new Dev(config, BrowserWindow, mainWindow).
  possiblyEnable()
}

// --

app.on(&quot;ready&quot;, createWindow)
app.on(&quot;activate&quot;, () =&gt; {
if (mainWindow === null) {
  createWindow()
}
})

// --

app.on(&quot;window-all-closed&quot;, () =&gt; {
if (process.platform !== &quot;darwin&quot;) {
  config.saveUserConfig(() =&gt; {
    app.quit()
  })
}
})"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">Config</span> <span class="pl-k">from</span> <span class="pl-s">"./config"</span>
<span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">default</span> <span class="pl-k">as</span> <span class="pl-s1">electron</span><span class="pl-kos">,</span> <span class="pl-v">BrowserWindow</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"electron"</span>
<span class="pl-k">import</span> <span class="pl-v">AppMenu</span> <span class="pl-k">from</span> <span class="pl-s">"./menu"</span>
<span class="pl-k">import</span> <span class="pl-v">Dev</span> <span class="pl-k">from</span> <span class="pl-s">"./dev"</span>

<span class="pl-c">// --</span>

<span class="pl-k">let</span> <span class="pl-s1">mainWindow</span>
<span class="pl-k">const</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-s1">electron</span><span class="pl-kos">.</span><span class="pl-c1">app</span>
<span class="pl-k">const</span> <span class="pl-s1">config</span> <span class="pl-c1">=</span> <span class="pl-s1">global</span><span class="pl-kos">.</span><span class="pl-c1">appConfig</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Config</span><span class="pl-kos">(</span><span class="pl-s1">app</span><span class="pl-kos">)</span>
<span class="pl-k">new</span> <span class="pl-v">AppMenu</span><span class="pl-kos">(</span><span class="pl-s1">app</span><span class="pl-kos">,</span> <span class="pl-s1">config</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">enable</span><span class="pl-kos">(</span><span class="pl-kos">)</span>

<span class="pl-c">/*</span>
<span class="pl-c">* Create the main application window.</span>
<span class="pl-c">*/</span>
<span class="pl-k">function</span> <span class="pl-en">createWindow</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
<span class="pl-s1">mainWindow</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">BrowserWindow</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
  <span class="pl-c1">width</span>: <span class="pl-c1">1280</span><span class="pl-kos">,</span>
  <span class="pl-c1">minWidth</span>: <span class="pl-c1">1024</span><span class="pl-kos">,</span>
  <span class="pl-c1">minHeight</span>: <span class="pl-c1">768</span><span class="pl-kos">,</span>
  <span class="pl-c1">height</span>: <span class="pl-c1">720</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>

<span class="pl-c">// So that electron-connect doesn't disrupt.</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">config</span><span class="pl-kos">.</span><span class="pl-c1">nodeEnv</span> <span class="pl-c1">==</span> <span class="pl-s">"development"</span><span class="pl-kos">)</span>
  <span class="pl-s1">mainWindow</span><span class="pl-kos">.</span><span class="pl-en">minimize</span><span class="pl-kos">(</span><span class="pl-kos">)</span>

<span class="pl-s1">mainWindow</span><span class="pl-kos">.</span><span class="pl-en">loadURL</span><span class="pl-kos">(</span><span class="pl-s">`file://<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">__dirname</span><span class="pl-kos">}</span></span>/index.html`</span><span class="pl-kos">)</span>
<span class="pl-s1">mainWindow</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">"closed"</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">mainWindow</span> <span class="pl-c1">=</span> <span class="pl-c1">null</span><span class="pl-kos">)</span>
<span class="pl-k">new</span> <span class="pl-v">Dev</span><span class="pl-kos">(</span><span class="pl-s1">config</span><span class="pl-kos">,</span> <span class="pl-v">BrowserWindow</span><span class="pl-kos">,</span> <span class="pl-s1">mainWindow</span><span class="pl-kos">)</span><span class="pl-kos">.</span>
  <span class="pl-en">possiblyEnable</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span>

<span class="pl-c">// --</span>

<span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">"ready"</span><span class="pl-kos">,</span> <span class="pl-s1">createWindow</span><span class="pl-kos">)</span>
<span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">"activate"</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">mainWindow</span> <span class="pl-c1">===</span> <span class="pl-c1">null</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-en">createWindow</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span>

<span class="pl-c">// --</span>

<span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">"window-all-closed"</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
<span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">platform</span> <span class="pl-c1">!==</span> <span class="pl-s">"darwin"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-s1">config</span><span class="pl-kos">.</span><span class="pl-en">saveUserConfig</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">quit</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
</li>
</ol>
<h2 dir="auto">Important Notes:</h2>
<ul dir="auto">
<li>This does not happen on v1.2.2 (installed system-wide) or v1.2.3 (what it was before an hour ago).</li>
<li>We have not tested this on macOS or Windows and have only tested on Fedora and Ubuntu.</li>
</ul>
<ul dir="auto">
<li>Electron version: 1.2.4</li>
<li>Operating system: Linux xxx 4.2.0-38-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="17570403" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/45" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/45/hovercard" href="https://github.com/electron/electron/issues/45">#45</a>~14.04.1-Ubuntu SMP Thu Jun 9 09:27:51 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux</li>
</ul>
<p dir="auto">I was trying to set 1.2.2 - 1.2.3 versions and works fine. When updating to 1.2.4 app.on('ready'...) never works. No errors output on console.<br>
Trying "Quick start" from electron. <a href="https://github.com/electron/electron-quick-start">https://github.com/electron/electron-quick-start</a></p>