<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>5.0.x</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>macOS 10.14.5</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Electron does not crash at exit.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">The notifications are sent well, i use the close() function to avoid persistence in Notification Center.</p>
<p dir="auto">By doing this every time I quit the application I have a message that warns me that the application did not stop properly.</p>
<h3 dir="auto">To Reproduce</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const notif = new Notification({title: title, body: body, silent: true})
notif.on('click', () =&gt; appEvent.emit('show-window'))
notif.show()
setTimeout(() =&gt; notif.close(), 10000)"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">notif</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Notification</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">title</span>: <span class="pl-s1">title</span><span class="pl-kos">,</span> <span class="pl-c1">body</span>: <span class="pl-s1">body</span><span class="pl-kos">,</span> <span class="pl-c1">silent</span>: <span class="pl-c1">true</span><span class="pl-kos">}</span><span class="pl-kos">)</span>
<span class="pl-s1">notif</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'click'</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">appEvent</span><span class="pl-kos">.</span><span class="pl-en">emit</span><span class="pl-kos">(</span><span class="pl-s">'show-window'</span><span class="pl-kos">)</span><span class="pl-kos">)</span>
<span class="pl-s1">notif</span><span class="pl-kos">.</span><span class="pl-en">show</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-en">setTimeout</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">notif</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-c1">10000</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">After sending notification(s), close application (app.quit()) and the error will appear.</p>
<p dir="auto">To no longer have the error after quitting app, i do not use the function close () but my application generates a lot of notifications and I would have preferred to handle that.</p>
<h3 dir="auto">Preflight Checklist</h3>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>6.0.0-beta3</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>macOS 10.13.6 10.14.4 / Windows 7 --&gt;</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>:
<ul dir="auto">
<li>5.0.1</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Clicked download link in renderer process, then show Save as dialog.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Clicked download link in renderer process, then Electron app creshed.</p>
<h3 dir="auto">To Reproduce</h3>
<ol dir="auto">
<li>Clone and start sample app</li>
</ol>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ git clone https://github.com/agata/crash-electron-with-download-link.git
$ cd ./crash-electron-with-download-link
$ npm install
$ npm start"><pre class="notranslate">$ git clone https://github.com/agata/crash-electron-with-download-link.git
$ <span class="pl-c1">cd</span> ./crash-electron-with-download-link
$ npm install
$ npm start</pre></div>
<ol start="3" dir="auto">
<li>Click a download link in the app -&gt; Crash electron app</li>
</ol>
<h3 dir="auto">Screenshots</h3>
<h4 dir="auto">Electron 5.0.1</h4>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/40473/57963469-8adb6980-795f-11e9-8cf6-1e58b8358e5f.png"><img width="1260" alt="Electron-5 0 1" src="https://user-images.githubusercontent.com/40473/57963469-8adb6980-795f-11e9-8cf6-1e58b8358e5f.png" style="max-width: 100%;"></a></p>
<h4 dir="auto">Electron 6.0.0-beta.3</h4>
<p dir="auto">Screencast: <a href="https://github.com/electron/electron/files/3193560/Electron-6.0.0-beta.3.mov.zip">Electron-6.0.0-beta.3.mov.zip</a></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">If using <a href="https://github.com/sindresorhus/electron-dl">electron-dl</a>, it does not happen this problem.  Electron-dl don't show Save As dialog with default mode.</p>