Forum

Error while using find method of webos.service.db

I want to use the find method of webos.service.db component.
when i try to use from the webapp,

,
the follwoing error comes,

may i know the reason? and how to rectify it?

Make sure your app has proper "requiredpermissions" such as "database.operation" group in appinfo.json file.

Hello, thank you for the help. If you don't mind, could you also provide any document that we can read to understand about it more?

You can refer Developing JS Services | webOS Open Source Edition
Refer section: Client Permission File
You have to create and update the file: <js service name>.perm.json.in
with the following for example:
"database", "database.internal", "database.operation",

Screenshot from 2021-08-02 20-00-56
I have added the following permissions, and the error i was getting earlier has not come, but,
Screenshot from 2021-08-02 19-55-17
this new error has come, can someone give a solution to this?

DB access permission denied.
Make sure your application has permission to access the kind.
you can set owner for the db during putkind.