electron: error when html page with

some webpage omit the http prefix to minify the page, like http://taobao.com electron now can not recognize this kind of url, and will log error like this:

[22608:0521/234915:INFO:CONSOLE(0)] "Not allowed to load local resource: file://g.alicdn.com/kg/offline/3.0.1/index-min.js?t=20131121234724.js", source: http://www.taobao.com/ (0)

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 18 (5 by maintainers)

Most upvoted comments

In case you are here with the same problem using Webpack 2.x, React and/or Redux, there is a chance that this would solve your problem:

Search your project directory for “publicPath” and change its value from / to ./ with all the different available boilerplates this setting may be found in different locations, In my case using redux-cli which uses redux-starter-kit, it was in the project.config.js:

publicPath: './',

Also if you are building for Electron you may need to add/modify the Webpack target property. Stay Happy!! 😄

While looking for a solution for this bug, I just realized it can not be reproduced in 0.37.x anymore. It seems upgrading to Chrome 49 has fixed this.