0

When I upload liquid-fire in my ember-cli project I get a white screen, here are the errors I get, I am running ember version 1.13.1, node.12.2, npm 2.12.1, liquid-fire 0.20.4, the second I uninstall liquid-fire it starts working perfectly fine, any ideas?

about:1 [Report Only] Refused to load the script'http://maps.googleapis.com/maps/api/js?v=3' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googleapis.com https://*.gstatic.com  data: localhost:35729 0.0.0.0:35729".

about:13 POST http://0.0.0.0:4200/csp-report net::ERR_ADDRESS_INVALID
js?v=3:8 [Report Only] Refused to load the script 'http://maps.gstatic.com/maps-api-v3/api/js/20/13/main.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googleapis.com https://*.gstatic.com  data: localhost:35729 0.0.0.0:35729".

js?v=3:8 POST http://0.0.0.0:4200/csp-report net::ERR_ADDRESS_INVALID
about:16 [Report Only] Refused to load the stylesheet 'http://fonts.googleapis.com/css?family=EB+Garamond' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' https://*.googleapis.com  data:".

about:16 [Report Only] Refused to load the stylesheet 'http://fonts.googleapis.com/css?family=Lily+Script+One' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' https://*.googleapis.com  data:".

about:16 POST http://0.0.0.0:4200/csp-report net::ERR_ADDRESS_INVALID
about:23 GET http://localhost:4200/assets/bootstrap.css.map 404 (Not Found)
velocity.js:660 [Report Only] Refused to load the font 'http://fonts.gstatic.com/s/ebgaramond/v7/kYZt1bJ8UsGAPRGnkXPeFY4P5ICox8Kq3LLUNMylGO4.woff2' because it violates the following Content Security Policy directive: "font-src 'self' https://*.gstatic.com  data:".

velocity.js:660 [Report Only] Refused to load the font 'http://fonts.gstatic.com/s/lilyscriptone/v4/uPWsLVW8uiXqIBnE8ZwGPCJccsb45t3MJKcv5BJtrIs.woff2' because it violates the following Content Security Policy directive: "font-src 'self' https://*.gstatic.com  data:".

ember.debug.js:48 Uncaught Error: Could not find module htmlbars-runtime
velocity.js:660 POST http://0.0.0.0:4200/csp-report net::ERR_ADDRESS_INVALID
about:1 [Report Only] Refused to load the font 'http://fonts.gstatic.com/s/ebgaramond/v7/kYZt1bJ8UsGAPRGnkXPeFY4P5ICox8Kq3LLUNMylGO4.woff2' because it violates the following Content Security Policy directive: "font-src 'self' https://*.gstatic.com  data:".

about:1 POST http://0.0.0.0:4200/csp-report net::ERR_ADDRESS_INVALID
bundle.js:1 init on: localhost
main.js:27 [Report Only] Refused to load the script 'http://maps.gstatic.com/maps-api-v3/api/js/20/13/common.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googleapis.com https://*.gstatic.com  data: localhost:35729 0.0.0.0:35729".

main.js:27 [Report Only] Refused to load the script 'http://maps.gstatic.com/maps-api-v3/api/js/20/13/util.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googleapis.com https://*.gstatic.com  data: localhost:35729 0.0.0.0:35729".

main.js:27 [Report Only] Refused to load the script 'http://maps.gstatic.com/maps-api-v3/api/js/20/13/stats.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googleapis.com https://*.gstatic.com  data: localhost:35729 0.0.0.0:35729".

main.js:27 POST http://0.0.0.0:4200/csp-report net::ERR_ADDRESS_INVALID
main.js:27 [Report Only] Refused to load the script 'http://maps.googleapis.com/maps/api/js/AuthenticationService.Authenticate?1…p%3A%2F%2Flocalhost%3A4200%2Fabout&5e1&callback=_xdc_._nayihi&token=102154' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googleapis.com https://*.gstatic.com  data: localhost:35729 0.0.0.0:35729".

main.js:27 POST http://0.0.0.0:4200/csp-report net::ERR_ADDRESS_INVALID
Carlos Guevara
  • 53
  • 1
  • 1
  • 4
  • You might need a different liquid-fire version: `ember.debug.js:48 Uncaught Error: Could not find module htmlbars-runtime` – runspired Jul 20 '15 at 04:46
  • for some reason the app had emberjs 1.11 and it was reading 1.13, switched versions and everything is working fine, – Carlos Guevara Jul 23 '15 at 01:37

1 Answers1

0

Your issue might be related to content security policy. You need to configure your environment.js in config/environment.js, for script-src and font-src.

module.exports = function(environment) {
  var ENV = {
    contentSecurityPolicy: {
      'default-src': "'none'",
      'script-src': "'self' 'unsafe-inline' 'unsafe-eval'   maps.googleapis.com maps.gstatic.com",
      'font-src': "'self' data: fonts.gstatic.com",
      ....
    },

};
ramesh
  • 2,296
  • 4
  • 19
  • 29