4

Cordova build running on Quasar is giving error

Not allowed to load local resource: file:///data....

Added below to the config.xml

<allow-navigation href="file:///*" />
<access origin="file:///*" />

Also added the content-security-policy in index.html

<meta http-equiv="Content-Security-Policy" content="default-src *; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'; media-src *; img-src * filesystem: file:">
Anand Tripathi
  • 14,556
  • 1
  • 47
  • 52

1 Answers1

-2

this is due to some url be it image or configuration file is being used incorrectly for example

<image src = "/ logo.png" />

which is wrong and it should be so

<image src = ". logo.png" />

On the web it is not affected but on mobile it is.

check your layout and pages, especially App.vue in case you use preFetch

https://quasar.dev/quasar-cli/handling-assets

Manuel Temple
  • 703
  • 5
  • 5