Hi, I am creating a new forge app with storage for Jira Cloud. In this new app, i am trying to use the new approach kvs.entity as per the documentation.
I am getting the “entity“ is undefined error when i try to access by kvs.entity
Console error message is, “r.g.forge_fetch is not a function”.
Why i am getting this error message and how to resolve it?
May I ask for further details of your implementation? For example, are you trying to access kvs.entity from the @forge/kvs package from the frontend of your app?
The @forge/kvs Storage APIs cannot be accessed directly from the frontend, as they must go through the lambda. I would suggest ensuring you have defined a resolver (backend function) that accesses the kvs functionality, which can then be invoked from your frontend.
Please let me know if you have further questions. Thank you!
Hi Cherry, Thank you for your response. I am getting the below error in my terminal when i use “invoke“ in the frontend.
invocation: a8e3608e53f543c691ef57936aaa7f85 index.handler
ERROR 11:26:33.620 5122f5bc-68a5-4bfa-a026-06a500327a7d ReferenceError: window is not defined
at getCallBridge (webpack://jira-global-page-ui-kit/node_modules/@forge/bridge/out/bridge.js:9:1)
at Object.9332 (webpack://jira-global-page-ui-kit/node_modules/@forge/bridge/out/invoke/invoke.js:7:1)
at webpack_require (webpack://jira-global-page-ui-kit/webpack/bootstrap:19:1)
at Object.8350 (webpack://jira-global-page-ui-kit/node_modules/@forge/bridge/out/invoke/index.js:4:22)
at webpack_require (webpack://jira-global-page-ui-kit/webpack/bootstrap:19:1)
at Object.2321 (webpack://jira-global-page-ui-kit/node_modules/@forge/bridge/out/index.js:7:22)
at webpack_require (webpack://jira-global-page-ui-kit/webpack/bootstrap:19:1)
at C:\GC\RQGit\ilavenil\Resource-Management-Control.forge\tunnel-output\index.cjs:4343:11
at getDefinitions (webpack://jira-global-page-ui-kit/src/backend/index.js:30:49)
at Object. (webpack://jira-global-page-ui-kit/src/backend/index.js:30:49)
requestJira is available from the frontend via the bridge and is also available from the resolvers via the @forge/api package. That also has a requestJira function.