Issue 1:
Output of node_modules/.bin/electron --version: v3.0.0

Operating System (Platform and Version): Win 10 x64

I'm using VS code for developing.

Expected Behavior

Working without any error.

Actual behavior

[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)

To Reproduce

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.

Issue 2:
Electron version: 2.0.0-beta.1 & 2.0.0-beta-2

Operating system: macOS High 10.13.3 (17D102)

Expected behavior

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.

This might only apply when custom protocols are registered (and possible when used to load at least one resource not necessarily the actual page).

Actual behavior

Devtools stderrs this when first opened (⌘⌥I) after page loads without issues:

[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/&can_dock=true&toolbarColor=rgba(223,223,223,1)&textColor=rgba(0,0,0,1)&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)

Then it constantly stderrs the same message when using devtools (possible just the console):

[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)

How to reproduce

Register custom protocol (ie protocol.registerStreamProtocol) doesn't matter if it includes a 'Access-Control-Allow-Origin=*' in response.

Make sure there is no CSP meta tag in head of page.

Load page either using loadFile or loadURL over custom protocol.