Forge Storage "Request principal is not authorized to use storage resource"

I am working on an app to try to get our service back to where it was before we migrated to cloud.
I have an app that needs to store some meta data on the env during install. (webhook URLs,field ids etc.)
Storage was working with set and get then it started to fail. I created another test app and it also fails.
The errors where authorisation errors.

ERROR   10:24:28.411  64fbb417a9412a1b  Request principal is not authorized to use storage resource
Error: Request principal is not authorized to use storage resource
    at Function.forErrorCode (webpack://jira-admin-page-ui-kit/node_modules/@forge/storage/out/errors.js:33)
    at assertNoErrors (webpack://jira-admin-page-ui-kit/node_modules/@forge/storage/out/global-storage.js:9)
    at GlobalStorage.mutation (webpack://jira-admin-page-ui-kit/node_modules/@forge/storage/out/global-storage.js:94)
    at async GlobalStorage.set (webpack://jira-admin-page-ui-kit/node_modules/@forge/storage/out/global-storage.js:59)
    at async /tmp/tunnel7fJyktNjR3Qpw/index.js:30415:67
    at async /tmp/tunnel7fJyktNjR3Qpw/index.js:1656:21
    at async asyncMap (webpack://jira-admin-page-ui-kit/node_modules/@forge/ui/out/reconcile.js:12)
    at async /tmp/tunnel7fJyktNjR3Qpw/index.js:1608:29
    at async /tmp/tunnel7fJyktNjR3Qpw/index.js:1076:31

The manifest is:

modules:
  jira:adminPage:
    - key: tempapp-hello-world-admin-page
      function: main
      title: tempapp
  function:
    - key: main
      handler: index.run
app:
  id: ari:cloud:ecosystem::app/bf5db236-028c-4e48-bdce-62e6b755eaed
permissions:
  scopes:
    - storage:app

Has my storage privilages been revoked?
I am admin for the sight.
The site is a sandbox: cccswisskrono-sandbox-529.atlassian.net

Hi @RobertW,

Could you let me know if this app had storage privileges before and at what date you started seeing this issue if that is the case? I am checking internally in the meantime.

Cheers

Hi Rodrigo

Thanks for getting back to me.

I have a test app that is now working. The app we are developing is (from the manifest file) app:

id: ari:cloud:ecosystem::app/797f34dc-0920-40d8-8130-ee395861a9a7

I am trying to set some meta data on install into storage so I do not have to repeat constantly the queries.

Things like insight IDs, custom field IDs and workspace IDs.

I have an event listener listening for the app install event and call set on storage.

It was working and now it has stopped. There does seem to be some problem that looks like the scopes I have defined are not being read. At close of play last night I could not get the on install event handler to trigger again (new problem).

Is it possible you could let me know what permission scopes I need to use both the storage and listen to on install events?

I have deployed , installed and executed the app hundreds of times in the last 3 days.

I am confident the problem will be something I am doing wrong :blush: Please help :blush:.

Also I am used to doing browser side dev in frameworks like Angular and React.

Could you recommend testing tools for TDD in Atlassian forge app development?

Let me know if I can provide more detail.

Many thanks

Rob

~WRD0000.jpg

HI Rodrigo

Here is a screenshot of the install and the manifest. The install output does not mention the storage:app scope.

Rob