2

I have finished installing local notification from ionic components using angular but I'm receiving cannot get/

in the inspect element console :

Refused to load the image 'http://localhost:8100/favicon.ico' because it violates the following Content Security Policy directive: "default-src 'none'". Note that 'img-src' was not explicitly set, so 'default-src' is used as a fallback.

Here is the link and tutorial i used for installing local notification : https://ionicframework.com/docs/native/local-notifications

RaRa
  • 67
  • 11

1 Answers1

3

I also had a lot of problems with this error! It can come from several places from what I understand. In my case, the message in the chrome console was the following:

Refused to load the image because it violates the following Content Security Policy directive: "default-src 'none'". Note that 'img-src' was not explicitly set, so 'default-src' is used as a fallback.

and the WEB page simply displayed the message: Cannot Get /

there were still errors in my code but my IDE doesn't display them when I run "ionic serve". To solve the problem I did a build ("ionic build") and fixed the displayed problems. I hope this answer will help :)