<ul dir="auto">
<li>Electron version:<br>
ares: "1.10.1-DEV"<br>
atom-shell: "1.3.1"<br>
chrome: "52.0.2743.82"<br>
electron: "1.3.1"<br>
http_parser: "2.7.0"<br>
modules: "49"<br>
node: "6.3.0"<br>
openssl: "1.0.2h"<br>
uv: "1.9.1"<br>
v8: "5.2.361.43"<br>
zlib: "1.2.8"</li>
<li>Operating system: Windows 10 Pro</li>
</ul>
<p dir="auto">My Electron program runs successfully when I have a network connection. However, with no network connection available it crashes immediately upon startup.</p>
<p dir="auto">Here's what I see at the console:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; $ npm start
&gt; 
&gt; &gt; violetbug@1.0.0 start C:\ElectronProjects\violetbug
&gt; &gt; electron .
&gt; 
&gt; 
&gt; C:\ElectronProjects\violetbug\node_modules\electron-prebuilt\dist\electron.exe: c:\jenkins\workspace\electron-win-x64\vendor\node\src\cares_wrap.cc:1328: Assertion `(r) == (0)' failed.
&gt; 
&gt; npm ERR! Windows_NT 10.0.14366
&gt; npm ERR! argv &quot;C:\\Program Files\\nodejs\\node.exe&quot; &quot;C:\\Users\\John\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js&quot; &quot;start&quot;
&gt; npm ERR! node v6.3.1
&gt; npm ERR! npm  v3.9.3
&gt; npm ERR! code ELIFECYCLE
&gt; npm ERR! violetbug@1.0.0 start: `electron .`
&gt; npm ERR! Exit status 3
&gt; npm ERR!
&gt; npm ERR! Failed at the violetbug@1.0.0 start script 'electron .'.
&gt; npm ERR! Make sure you have the latest version of node.js and npm installed.
&gt; npm ERR! If you do, this is most likely a problem with the violetbug package,
&gt; npm ERR! not with npm itself.
&gt; npm ERR! Tell the author that this fails on your system:
&gt; npm ERR!     electron .
&gt; npm ERR! You can get information on how to open an issue for this project with:
&gt; npm ERR!     npm bugs violetbug
&gt; npm ERR! Or if that isn't available, you can get their info via:
&gt; npm ERR!     npm owner ls violetbug
&gt; npm ERR! There is likely additional logging output above.
&gt; 
&gt; npm ERR! Please include the following file with any support request:
&gt; npm ERR!     C:\ElectronProjects\violetbug\npm-debug.log
&gt; 
"><pre class="notranslate"><code class="notranslate">&gt; $ npm start
&gt; 
&gt; &gt; violetbug@1.0.0 start C:\ElectronProjects\violetbug
&gt; &gt; electron .
&gt; 
&gt; 
&gt; C:\ElectronProjects\violetbug\node_modules\electron-prebuilt\dist\electron.exe: c:\jenkins\workspace\electron-win-x64\vendor\node\src\cares_wrap.cc:1328: Assertion `(r) == (0)' failed.
&gt; 
&gt; npm ERR! Windows_NT 10.0.14366
&gt; npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\John\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
&gt; npm ERR! node v6.3.1
&gt; npm ERR! npm  v3.9.3
&gt; npm ERR! code ELIFECYCLE
&gt; npm ERR! violetbug@1.0.0 start: `electron .`
&gt; npm ERR! Exit status 3
&gt; npm ERR!
&gt; npm ERR! Failed at the violetbug@1.0.0 start script 'electron .'.
&gt; npm ERR! Make sure you have the latest version of node.js and npm installed.
&gt; npm ERR! If you do, this is most likely a problem with the violetbug package,
&gt; npm ERR! not with npm itself.
&gt; npm ERR! Tell the author that this fails on your system:
&gt; npm ERR!     electron .
&gt; npm ERR! You can get information on how to open an issue for this project with:
&gt; npm ERR!     npm bugs violetbug
&gt; npm ERR! Or if that isn't available, you can get their info via:
&gt; npm ERR!     npm owner ls violetbug
&gt; npm ERR! There is likely additional logging output above.
&gt; 
&gt; npm ERR! Please include the following file with any support request:
&gt; npm ERR!     C:\ElectronProjects\violetbug\npm-debug.log
&gt; 

</code></pre></div>
<p dir="auto">Here is C:\ElectronProjects\violetbug\npm-debug.log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\John\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start' ]
2 info using npm@3.9.3
3 info using node@v6.3.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle violetbug@1.0.0~prestart: violetbug@1.0.0
6 silly lifecycle violetbug@1.0.0~prestart: no script for prestart, continuing
7 info lifecycle violetbug@1.0.0~start: violetbug@1.0.0
8 verbose lifecycle violetbug@1.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle violetbug@1.0.0~start: PATH: C:\Users\John\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\ElectronProjects\violetbug\node_modules\.bin;C:\Program Files\nodejs;C:\Users\John\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\John\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Python27;C:\Users\John\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Programs;C:\Users\John\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Git\cmd;C:\Program Files (x86)\Brackets\command;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Programs\ffmpeg\bin;C:\Program Files\nodejs;C:\Program Files (x86)\Google\google_appengine;C:\Users\John\AppData\Local\atom\bin;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\John\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Users\John\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
10 verbose lifecycle violetbug@1.0.0~start: CWD: C:\ElectronProjects\violetbug
11 silly lifecycle violetbug@1.0.0~start: Args: [ '/d /s /c', 'electron .' ]
12 silly lifecycle violetbug@1.0.0~start: Returned: code: 3  signal: null
13 info lifecycle violetbug@1.0.0~start: Failed to exec start script
14 verbose stack Error: violetbug@1.0.0 start: `electron .`
14 verbose stack Exit status 3
14 verbose stack     at EventEmitter.&lt;anonymous&gt; (C:\Users\John\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:245:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.&lt;anonymous&gt; (C:\Users\John\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:852:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid violetbug@1.0.0
16 verbose cwd C:\ElectronProjects\violetbug
17 error Windows_NT 10.0.14366
18 error argv &quot;C:\\Program Files\\nodejs\\node.exe&quot; &quot;C:\\Users\\John\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js&quot; &quot;start&quot;
19 error node v6.3.1
20 error npm  v3.9.3
21 error code ELIFECYCLE
22 error violetbug@1.0.0 start: `electron .`
22 error Exit status 3
23 error Failed at the violetbug@1.0.0 start script 'electron .'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the violetbug package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     electron .
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs violetbug
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls violetbug
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
"><pre class="notranslate"><code class="notranslate">0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\John\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start' ]
2 info using npm@3.9.3
3 info using node@v6.3.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle violetbug@1.0.0~prestart: violetbug@1.0.0
6 silly lifecycle violetbug@1.0.0~prestart: no script for prestart, continuing
7 info lifecycle violetbug@1.0.0~start: violetbug@1.0.0
8 verbose lifecycle violetbug@1.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle violetbug@1.0.0~start: PATH: C:\Users\John\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\ElectronProjects\violetbug\node_modules\.bin;C:\Program Files\nodejs;C:\Users\John\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\John\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Python27;C:\Users\John\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Programs;C:\Users\John\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Git\cmd;C:\Program Files (x86)\Brackets\command;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Programs\ffmpeg\bin;C:\Program Files\nodejs;C:\Program Files (x86)\Google\google_appengine;C:\Users\John\AppData\Local\atom\bin;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\John\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Users\John\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
10 verbose lifecycle violetbug@1.0.0~start: CWD: C:\ElectronProjects\violetbug
11 silly lifecycle violetbug@1.0.0~start: Args: [ '/d /s /c', 'electron .' ]
12 silly lifecycle violetbug@1.0.0~start: Returned: code: 3  signal: null
13 info lifecycle violetbug@1.0.0~start: Failed to exec start script
14 verbose stack Error: violetbug@1.0.0 start: `electron .`
14 verbose stack Exit status 3
14 verbose stack     at EventEmitter.&lt;anonymous&gt; (C:\Users\John\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:245:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.&lt;anonymous&gt; (C:\Users\John\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:852:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid violetbug@1.0.0
16 verbose cwd C:\ElectronProjects\violetbug
17 error Windows_NT 10.0.14366
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\John\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
19 error node v6.3.1
20 error npm  v3.9.3
21 error code ELIFECYCLE
22 error violetbug@1.0.0 start: `electron .`
22 error Exit status 3
23 error Failed at the violetbug@1.0.0 start script 'electron .'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the violetbug package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     electron .
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs violetbug
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls violetbug
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

</code></pre></div>
<ul dir="auto">
<li>Electron version: <code class="notranslate">electron-v1.2.6-win32-x64</code></li>
<li>Operating system: <code class="notranslate">Windows 10 Home (version 1511; build 10586.420)</code></li>
</ul>
<p dir="auto">As reported from <a href="https://github.com/Microsoft/vscode/issues/7570" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/7570/hovercard">here</a> - I came across the issue while trying to launch Visual Studio Code without an internet connection.</p>
<p dir="auto">I also confirmed the behaviour with versions of Electron as far back as <code class="notranslate">electron-v0.37.6-win32-x64</code> (the one that VS Code currently uses)</p>