huawei-mobile-servicesappgallery-connect

How to solve permission denied error on Huawei Cloud DB


I implemented the Huawei's Cloud DB and Auth Service into my project. After i create my Cloud DB Zone and Object Types i tried to use the executeUpsert() function of Cloud DB. But i got an error message that says "Permission Denied". Program executes all database operations after user authenticated. And authenticated users has permission to update the table. I don't know how to solve this permission problem. Does anyone have opinion?

Error Message; enter image description here


Solution

  • I talked to some employees who are authorized in Huawei's Cloud DB and they helped me to find the cause of the problem. When i was getting the error, as you see in the screenshot below, the instance when user gets authentication and the instance when i initialize the AGConnectCloudDB were different.

    enter image description here

    after i defined the instance object globally and use the same instance when i am getting the auth and also initializing the AGConnectCloudDB object as you see in the below picture, the problem is solved! enter image description here