Error on forge resolver calling - forge on connect

Hello,

I am trying to use forge from connect feature. The idea is to gradually move our connect app to forge. So we are trying to use forge for our new features. We are using ‘globalPage’. We require to use forge storage. However getting error on resolver call.

Manifest file for reference:

modules:
  jira:globalPage:
    - key: app-key
      icon: https://app-icon.png
      title: App title
      resource: main
      layout: basic
      resolver:
        function: storage-resolver
      displayConditions:
        or:
          isAdmin: true
          isSiteAdmin: true

  function:
    - key: storage-resolver
      handler: index.handler

resources:
  - key: main
    path: views/app/build
    tunnel:
      port: 3001

Error on browser console :

{
    "data": {
        "invokeExtension": {
            "success": false,
            "response": null,
            "contextToken": null,
            "errors": [
                {
                    "message": "There was an error invoking the function - _forge_resolver__WEBPACK_IMPORTED_MODULE_0__ is not a constructor",
                    "extensions": {
                        "errorType": "FUNCTION_ERROR_HOSTED_APP_CODE",
                        "statusCode": 400,
                        "__typename": "GenericMutationErrorExtension"
                    },
                    "__typename": "MutationError"
                }
            ],
            "__typename": "InvokeExtensionResponse"
        }
    },
    "extensions": {
        "gateway": {
            "request_id": "1b7fab4c7f17423db75a791e4bdbeea4",
            "crossRegion": false,
            "edgeCrossRegion": false
        }
    }
}
1 Like

Hi @UmeshChaudhary , can you please provide us with a sample of your Forge function resolver code?

Hey @BoZhang ,

Actually i figured this out. It wasn’t the resolver issue rather the package.json of connect app can’t be used for forge app. So we had to seperate connect from forge and make sepearte package.json for forge itself.
Thank you!

This topic was automatically closed after 30 days. New replies are no longer allowed.