Forge deployment failed with unknown error

Hello everyone,

I’m encountering an issue when trying to deploy my Forge app to production. The deployment fails with the error message:

ℹ Validating manifest
  Deployment failed with unknown error

Error: Deployment failed (requestId: 912c26ca7ec4460686845bf9bd519fb2)

Error: Deployment failed (requestId: 912c26ca7ec4460686845bf9bd519fb2)
    at ArtifactDeployer.handleErrorEvent (/home/ilyassmabrouk/.npm-global/lib/node_modules/@forge/cli/out/deploy/deployer/deployer.js:198:15)
    at ArtifactDeployer.pollAndCheckEvents (/home/ilyassmabrouk/.npm-global/lib/node_modules/@forge/cli/out/deploy/deployer/deployer.js:96:18)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ArtifactDeployer.monitorDeployment (/home/ilyassmabrouk/.npm-global/lib/node_modules/@forge/cli/out/deploy/deployer/deployer.js:107:28)
    at async ArtifactDeployer.deploy (/home/ilyassmabrouk/.npm-global/lib/node_modules/@forge/cli/out/deploy/deployer/deployer.js:70:9)
    at async PackageUploadDeployCommand.execute (/home/ilyassmabrouk/.npm-global/lib/node_modules/@forge/cli/out/deploy/package-upload-deploy.js:27:9)
    at async CommandLineUI.displayProgress (/home/ilyassmabrouk/.npm-global/lib/node_modules/@forge/cli/node_modules/@forge/cli-shared/out/ui/command-line-ui.js:59:28)
    at async DeployView.reportDeploymentProgress (/home/ilyassmabrouk/.npm-global/lib/node_modules/@forge/cli/out/command-line/view/deploy-view.js:86:24)
    at async DeployController.run (/home/ilyassmabrouk/.npm-global/lib/node_modules/@forge/cli/out/command-line/controller/deploy-controller.js:198:27)
    at async /home/ilyassmabrouk/.npm-global/lib/node_modules/@forge/cli/out/command-line/register-deployment-commands.js:29:9
    at async Command.actionProcessor (/home/ilyassmabrouk/.npm-global/lib/node_modules/@forge/cli/out/command-line/command.js:252:28)
    at async Command.parseAsync (/home/ilyassmabrouk/.npm-global/lib/node_modules/@forge/cli/node_modules/commander/lib/command.js:936:5)
    at async Command.parse (/home/ilyassmabrouk/.npm-global/lib/node_modules/@forge/cli/out/command-line/command.js:154:13)
    at async main (/home/ilyassmabrouk/.npm-global/lib/node_modules/@forge/cli/out/command-line/index.js:51:5)

Below is my manifest.yml file for the app:

app:
  id: ari:cloud:ecosystem::app/${APP_ID}
  runtime:
    name: nodejs18.x

modules:
  jira:issueAction:
    - key: action
      function: main
      title: 'Process content'
      description: 'Process content'

  trigger:
    - key: trigger
      function: main
      events:
        - avi:jira:created:issue

  function:
    - key: main
      handler: index.run

permissions:
  scopes:
    - write:jira-work
    - read:jira-work

environment:
  variables:
    - APP_ID
    - OPENAI_KEY

I am running the following command to deploy:

forge deploy --verbose

Versions

@forge/cli: 10.5.0

Any suggestions on what might be causing this deployment failure or how to resolve it would be greatly appreciated.

Thanks in advance!

Hello gamingstate,

I’ve had a look at this error and the reason for the failed app deployments is: “Attempting to deploy a non-forge app”.

Looking at the logs, the logs indicate this app may have been created via the Developer Console as an ‘OAuth 2.0 Integration’ app, not a Forge app. I’m not certain that happened, but it’s what the logs indicate.
If you have a look at your Developer Console I would expect this app to appear as a ‘OAuth 2.0’ app.

How to resolve this?

I’m assuming you would like this app to function as a Forge app, not a OAuth 2.0 app.
I also see that this app is only installed to a single site, which appears related to your user name.

Taking this into account, the easy solution is to use the Forge CLI ‘forge register’ command to create a new app. Bear in mind that this will be a brand new app. So the app will need to be re-installed and any data associated with the app will be lost.

If creating a new Forge app (which is essentially what ‘forge register’ does) is not acceptable we can try to think of an alternative solution.

3 Likes

Thanks a lot. It solve my problem, i really appreciate it!

1 Like