<p dir="auto">When packaging a Mac application for distribution, code signing with a valid Developer ID certificate, packaging fails as the bundled <code class="notranslate">Electron Framework.framework</code> contains an invalid symlink to <code class="notranslate">Libraries</code>. Packaging against the latest non-beta, v1.8.2, does not contain the symlink and passes validation.</p>
<ul dir="auto">
<li>Electron version: 2.0.0-beta.1 installed with <code class="notranslate">yarn</code></li>
<li>Operating system: macOS High Sierra 10.13.3</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">MacOS distributable should be signed with the specified Developer ID certificate when packaged.</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">An astray corrupted symlink to <code class="notranslate">Libraries</code> within <code class="notranslate">Electron Framework.framework/Versions/A/Libraries/</code> is causing code signing validation to fail. As mentioned above, this only happens when targeting the beta version of Electron.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Using <code class="notranslate">electron-builder</code>, build a distributable <code class="notranslate">.app</code> Electron application with code-signing enabled using a Developer ID certificate. You should see this output towards the end of execution:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="• signing file=&lt;path to .app&gt; identityName=&lt;certificate name&gt; identityHash=&lt;certificate hash&gt;
Error: Command failed: codesign --verify --deep --strict --verbose=2 &lt;path to .app&gt;
--prepared:&lt;path to .app&gt;/Contents/Library/LoginItems/Electron Login Helper.app
--prepared:&lt;path to .app&gt;/Contents/Frameworks/&lt;app name&gt; Helper.app
--validated:&lt;path to .app&gt;/Contents/Library/LoginItems/Electron Login Helper.app
--validated:&lt;path to .app&gt;/Contents/Frameworks/&lt;appname&gt; Helper.app
--prepared:&lt;path to .app&gt;/Contents/Frameworks/Squirrel.framework/Versions/Current/.
--prepared:&lt;path to .app&gt;/Contents/Frameworks/&lt;appname&gt; Helper NP.app
--validated:&lt;path to .app&gt;/Contents/Frameworks/Squirrel.framework/Versions/Current/.
--validated:&lt;path to .app&gt;/Contents/Frameworks/&lt;appname&gt; Helper NP.app
--prepared:&lt;path to .app&gt;/Contents/Frameworks/&lt;appname&gt; Helper EH.app
--validated:&lt;path to .app&gt;/Contents/Frameworks/&lt;appname&gt; Helper EH.app
--prepared:&lt;path to .app&gt;/Contents/Frameworks/Mantle.framework/Versions/Current/.
--validated:&lt;path to .app&gt;/Contents/Frameworks/Mantle.framework/Versions/Current/.
--prepared:&lt;path to .app&gt;/Contents/Frameworks/ReactiveCocoa.framework/Versions/Current/.
--validated:&lt;path to .app&gt;/Contents/Frameworks/ReactiveCocoa.framework/Versions/Current/.
--prepared:&lt;path to .app&gt;/Contents/Frameworks/Electron Framework.framework/Versions/Current/.
&lt;path to .app&gt;: No such file or directory"><pre class="notranslate"><code class="notranslate">• signing file=&lt;path to .app&gt; identityName=&lt;certificate name&gt; identityHash=&lt;certificate hash&gt;
Error: Command failed: codesign --verify --deep --strict --verbose=2 &lt;path to .app&gt;
--prepared:&lt;path to .app&gt;/Contents/Library/LoginItems/Electron Login Helper.app
--prepared:&lt;path to .app&gt;/Contents/Frameworks/&lt;app name&gt; Helper.app
--validated:&lt;path to .app&gt;/Contents/Library/LoginItems/Electron Login Helper.app
--validated:&lt;path to .app&gt;/Contents/Frameworks/&lt;appname&gt; Helper.app
--prepared:&lt;path to .app&gt;/Contents/Frameworks/Squirrel.framework/Versions/Current/.
--prepared:&lt;path to .app&gt;/Contents/Frameworks/&lt;appname&gt; Helper NP.app
--validated:&lt;path to .app&gt;/Contents/Frameworks/Squirrel.framework/Versions/Current/.
--validated:&lt;path to .app&gt;/Contents/Frameworks/&lt;appname&gt; Helper NP.app
--prepared:&lt;path to .app&gt;/Contents/Frameworks/&lt;appname&gt; Helper EH.app
--validated:&lt;path to .app&gt;/Contents/Frameworks/&lt;appname&gt; Helper EH.app
--prepared:&lt;path to .app&gt;/Contents/Frameworks/Mantle.framework/Versions/Current/.
--validated:&lt;path to .app&gt;/Contents/Frameworks/Mantle.framework/Versions/Current/.
--prepared:&lt;path to .app&gt;/Contents/Frameworks/ReactiveCocoa.framework/Versions/Current/.
--validated:&lt;path to .app&gt;/Contents/Frameworks/ReactiveCocoa.framework/Versions/Current/.
--prepared:&lt;path to .app&gt;/Contents/Frameworks/Electron Framework.framework/Versions/Current/.
&lt;path to .app&gt;: No such file or directory
</code></pre></div>
<p dir="auto">It seems to successfully validate, up to <code class="notranslate">Electron Framework.framework/Versions/Current/</code> where it is unable to continue after reaching the invalid symlink.</p>
<p dir="auto">Obviously, this version of Electron is a beta, so issues are understandable, but it'd obviously be good to get this checked out! Thank you! :)</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>&gt;= electron v7.0.0-beta.4</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>macOS 10.14.6</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>electron v7.0.0-beta.3</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Load all resources.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Doesn't load all resources.</p>
<h3 dir="auto">To Reproduce</h3>
<p dir="auto">For bugs that can be encapsulated in a small experiment, you can use Electron Fiddle (<a href="https://github.com/electron/fiddle">https://github.com/electron/fiddle</a>) to publish your example to a GitHub Gist and link it your bug report.</p>
<p dir="auto">Was created a web page with HTTP Basic to reproduce bug: <a href="https://urr8o0dc29gon6u1.prodoctor.net" rel="nofollow">https://urr8o0dc29gon6u1.prodoctor.net</a> with user and password equals urr8o0dc29gon6u1.</p>
<p dir="auto"><code class="notranslate">main.js</code></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const {app, BrowserWindow} = require('electron')

let mainWindow

function createWindow () {
  mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      nodeIntegration: true
    }
  })

  mainWindow.loadURL('https://urr8o0dc29gon6u1.prodoctor.net')

  mainWindow.on('closed', function () {
    mainWindow = null
  })
}

app.on('login', (event, webContents, request, authInfo, callback) =&gt; {
  callback('urr8o0dc29gon6u1', 'urr8o0dc29gon6u1');
})

app.on('ready', createWindow)

app.on('window-all-closed', function () {
  app.quit()
})

app.on('activate', function () {
  if (mainWindow === null) {
    createWindow()
  }
})"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span>app<span class="pl-kos">,</span> BrowserWindow<span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'electron'</span><span class="pl-kos">)</span>

<span class="pl-k">let</span> <span class="pl-s1">mainWindow</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">800</span><span class="pl-kos">,</span>
    <span class="pl-c1">height</span>: <span class="pl-c1">600</span><span class="pl-kos">,</span>
    <span class="pl-c1">webPreferences</span>: <span class="pl-kos">{</span>
      <span class="pl-c1">nodeIntegration</span>: <span class="pl-c1">true</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-kos">.</span><span class="pl-en">loadURL</span><span class="pl-kos">(</span><span class="pl-s">'https://urr8o0dc29gon6u1.prodoctor.net'</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-k">function</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-c1">null</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</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">'login'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">event</span><span class="pl-kos">,</span> <span class="pl-s1">webContents</span><span class="pl-kos">,</span> <span class="pl-s1">request</span><span class="pl-kos">,</span> <span class="pl-s1">authInfo</span><span class="pl-kos">,</span> <span class="pl-s1">callback</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
  <span class="pl-s1">callback</span><span class="pl-kos">(</span><span class="pl-s">'urr8o0dc29gon6u1'</span><span class="pl-kos">,</span> <span class="pl-s">'urr8o0dc29gon6u1'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</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">'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">'window-all-closed'</span><span class="pl-kos">,</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</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-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-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</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></pre></div>