Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing permission to execute the native method: filesystem.readFile

Tags:

neutralinojs

I'm new in NeutralinoJS, I'm trying my first app and I need to read the content of a json file. I'm trying by using Neutralino.filesystem.readFile method, but it fails with error

{
  code: "NE_RT_NATPRME",
  message: "Missing permission to execute the native method: filesystem.readFile"
}

I've tried also by reading the status of the file with filesystem.getStats but it fails with the same error. How can I activate the permissions to run filesystem.readFile and other filestystem method?

like image 345
Raffaele Avatar asked Oct 15 '25 22:10

Raffaele


1 Answers

I was actually just coming across this same problem. Make sure in your neutralino.config.json you have filesystem.* in your nativeAllowList section like so:

  "nativeAllowList": [
    "app.*",
    "os.*",
    "filesystem.*",
    "debug.log"
  ],
like image 174
spikehd Avatar answered Oct 19 '25 00:10

spikehd