<ul dir="auto">
<li>Output of <code class="notranslate">node_modules/.bin/electron --version</code>: v3.0.0</li>
<li>Operating System (Platform and Version): Win 10 x64<br>
I'm using VS code for developing.</li>
</ul>
<p dir="auto"><strong>Expected Behavior</strong><br>
Working without any error.</p>
<p dir="auto"><strong>Actual behavior</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[18244:0919/160757.998:ERROR:CONSOLE(22)] &quot;Empty response arrived for script 'chrome-devtools://devtools/remote/serve_file/@164c37e3f235134c88e80fac2a182cfba3f07f00/product_registry_impl/product_registry_impl_module.js'&quot;, source: chrome-devtools://devtools/bundled/shell.js (22)
[18244:0919/160757.999:ERROR:CONSOLE(106)] &quot;Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry&quot;, source: chrome-devtools://devtools/bundled/shell.js (106)"><pre class="notranslate"><code class="notranslate">[18244:0919/160757.998:ERROR:CONSOLE(22)] "Empty response arrived for script 'chrome-devtools://devtools/remote/serve_file/@164c37e3f235134c88e80fac2a182cfba3f07f00/product_registry_impl/product_registry_impl_module.js'", source: chrome-devtools://devtools/bundled/shell.js (22)
[18244:0919/160757.999:ERROR:CONSOLE(106)] "Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry", source: chrome-devtools://devtools/bundled/shell.js (106)
</code></pre></div>
<p dir="auto"><strong>To Reproduce</strong><br>
Clone electron-quick-start. Start project (npm start). Open chrome dev-tools (ctrl+shift+i), switch to Network tab and punch F5. And error will appears in terminal.</p>
<ul dir="auto">
<li>Electron version: 2.0.0-beta.1 &amp; 2.0.0-beta-2</li>
<li>Operating system: macOS High 10.13.3 (17D102)</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">Regardless of any security related options (and even when CSP is not set in head of the page) devtools should be able to download it's resources correctly.</p>
<p dir="auto">This might only apply when custom protocols are registered (and possible when used to load at least one resource not necessarily the actual page).</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Devtools stderrs this when first opened (⌘⌥I) after page loads without issues:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[50393:0308/191909.964381:ERROR:CONSOLE(0)] &quot;Failed to load https://chrome-devtools-frontend.appspot.com/serve_file/@7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33/product_registry_impl/product_registry_impl_module.js: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'chrome-devtools://devtools' is therefore not allowed access. The response had HTTP status code 404.&quot;, source: chrome-devtools://devtools/bundled/inspector.html?remoteBase=https://chrome-devtools-frontend.appspot.com/serve_file/@7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33/&amp;can_dock=true&amp;toolbarColor=rgba(223,223,223,1)&amp;textColor=rgba(0,0,0,1)&amp;experiments=true (0)
[50393:0308/191909.964523:ERROR:CONSOLE(22)] &quot;Empty response arrived for script 'https://chrome-devtools-frontend.appspot.com/serve_file/@7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33/product_registry_impl/product_registry_impl_module.js'&quot;, source: chrome-devtools://devtools/bundled/inspector.js (22)"><pre class="notranslate"><code class="notranslate">[50393:0308/191909.964381:ERROR:CONSOLE(0)] "Failed to load https://chrome-devtools-frontend.appspot.com/serve_file/@7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33/product_registry_impl/product_registry_impl_module.js: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'chrome-devtools://devtools' is therefore not allowed access. The response had HTTP status code 404.", source: chrome-devtools://devtools/bundled/inspector.html?remoteBase=https://chrome-devtools-frontend.appspot.com/serve_file/@7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33/&amp;can_dock=true&amp;toolbarColor=rgba(223,223,223,1)&amp;textColor=rgba(0,0,0,1)&amp;experiments=true (0)
[50393:0308/191909.964523:ERROR:CONSOLE(22)] "Empty response arrived for script 'https://chrome-devtools-frontend.appspot.com/serve_file/@7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33/product_registry_impl/product_registry_impl_module.js'", source: chrome-devtools://devtools/bundled/inspector.js (22)
</code></pre></div>
<p dir="auto">Then it constantly stderrs the same message when using devtools (possible just the console):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[50393:0308/191909.964873:ERROR:CONSOLE(105)] &quot;Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry&quot;, source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191909.965058:ERROR:CONSOLE(105)] &quot;Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry&quot;, source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191909.965236:ERROR:CONSOLE(105)] &quot;Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry&quot;, source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191909.965395:ERROR:CONSOLE(105)] &quot;Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry&quot;, source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191909.965453:ERROR:CONSOLE(105)] &quot;Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry&quot;, source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191915.876576:ERROR:CONSOLE(105)] &quot;Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry&quot;, source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191915.876628:ERROR:CONSOLE(105)] &quot;Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry&quot;, source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191915.876707:ERROR:CONSOLE(105)] &quot;Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry&quot;, source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191915.876741:ERROR:CONSOLE(105)] &quot;Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry&quot;, source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191915.876808:ERROR:CONSOLE(105)] &quot;Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry&quot;, source: chrome-devtools://devtools/bundled/inspector.js (105)"><pre class="notranslate"><code class="notranslate">[50393:0308/191909.964873:ERROR:CONSOLE(105)] "Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry", source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191909.965058:ERROR:CONSOLE(105)] "Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry", source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191909.965236:ERROR:CONSOLE(105)] "Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry", source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191909.965395:ERROR:CONSOLE(105)] "Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry", source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191909.965453:ERROR:CONSOLE(105)] "Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry", source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191915.876576:ERROR:CONSOLE(105)] "Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry", source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191915.876628:ERROR:CONSOLE(105)] "Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry", source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191915.876707:ERROR:CONSOLE(105)] "Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry", source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191915.876741:ERROR:CONSOLE(105)] "Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry", source: chrome-devtools://devtools/bundled/inspector.js (105)
[50393:0308/191915.876808:ERROR:CONSOLE(105)] "Uncaught (in promise) Error: Could not instantiate: ProductRegistryImpl.Registry", source: chrome-devtools://devtools/bundled/inspector.js (105)
</code></pre></div>
<h3 dir="auto">How to reproduce</h3>
<ul dir="auto">
<li>
<p dir="auto">Register custom protocol (ie protocol.registerStreamProtocol) doesn't matter if it includes a 'Access-Control-Allow-Origin=*' in response.</p>
</li>
<li>
<p dir="auto">Make sure there is no CSP meta tag in head of page.</p>
</li>
<li>
<p dir="auto">Load page either using loadFile or loadURL over custom protocol.</p>
</li>
</ul>