Forge install always fails

While running the getting started guide, I was executing forge deploy followed by forge install. After following the wizard I always end up with the same error:
Error: Forge apps must be deployed before installation. Deploy your app by running forge deploy -e development.
This while my forge deploy just finishes normally.

I use node.js 17.1.0 and forge 2.0.4.

What am I doing wrong?

Hi @JeffreyBindinga,

It seems like you are following the correct steps. I have two suggestions here

  1. There might be an issue where the deployment was into the wrong environment so I would try the suggested command forge deploy -e development

  2. There could be issues during our deployments so I would try running forge deploy --verbose to see all the requests being made to our services. I would suggest skimming through the requests to see if there are any errors. It would help us a tonne if you send us the Request ID (which is part of our API request) to track down the issues.

Thanks again and hope the issue doesn’t continue for you :slight_smile:

Hi Aryan,

thanks for getting back to me. I have ran forge deploy --verbose and got an error:

Error: Error at [object Promise], reason: Error: error:0308010C:digital envelope routines::unsupported

  Error: Error at [object Promise], reason: Error: error:0308010C:digital envelope routines::unsupported
    at process.<anonymous> (C:\Users\jbindinga\AppData\Roaming\npm\node_modules\@forge\cli\out\command-line\index.js:56:38)
    at process.emit (node:events:390:28)
    at emit (node:internal/process/promises:136:22)
    at processPromiseRejections (node:internal/process/promises:242:25)
    at processTicksAndRejections (node:internal/process/task_queues:97:32)
Full response
forge deploy --verbose
Deploying your app to the development environment.
Press Ctrl+C to cancel.

Running forge lint...
No issues found.

▶️  GraphQL https://api.atlassian.com/graphql
Query:
          query forge_cli_getMigrationKeys($id: ID!, $key: String!) {
            app(id: $id) {
              environmentByKey(key: $key) {
                id
                versions(first: 1) {
                  edges {
                    node {
                      isLatest
                      migrationKeys {
                        jira
                        confluence
                      }
                    }
                  }
                }
              }
              marketplaceApp {
                appKey
              }
            }
          }

Variables: {
  "id": "ari:cloud:ecosystem::app/2d7811c6-6560-44f9-82c9-109330907a8a",
  "key": "default"
}
◀️  GraphQL
Request ID: 6a8c524efe33ef74
Result: {
  "app": {
    "environmentByKey": {
      "id": "5d095aa2-4c89-4f35-be9b-0f3e75fad3dd",
      "versions": {
        "edges": [
          {
            "node": {
              "isLatest": true,
              "migrationKeys": null
            }
          }
        ]
      }
    },
    "marketplaceApp": null
  }
}
▶️  GraphQL https://api.atlassian.com/graphql
Query:
      query forge_cli_getApplicationInstallations($id: ID!) {
        app(id: $id) {
          environments {
            key
            installations {
              id
              installationContext,
              version {
                isLatest
              }
            }
          }
        }
      }

Variables: {
  "id": "ari:cloud:ecosystem::app/2d7811c6-6560-44f9-82c9-109330907a8a"
}
◀️  GraphQL
Request ID: a3d75d6a26100436
Result: {
  "app": {
    "environments": [
      {
        "key": "production",
        "installations": []
      },
      {
        "key": "staging",
        "installations": []
      },
      {
        "key": "default",
        "installations": []
      }
    ]
  }
}
Deploying your app to development...

i Packaging app files

Error: Error at [object Promise], reason: Error: error:0308010C:digital envelope routines::unsupported

  Error: Error at [object Promise], reason: Error: error:0308010C:digital envelope routines::unsupported
    at process.<anonymous> (C:\Users\jbindinga\AppData\Roaming\npm\node_modules\@forge\cli\out\command-line\index.js:56:38)
    at process.emit (node:events:390:28)
    at emit (node:internal/process/promises:136:22)
    at processPromiseRejections (node:internal/process/promises:242:25)
    at processTicksAndRejections (node:internal/process/task_queues:97:32)

Hi @JeffreyBindinga,

Thanks for sharing this error. We’ve actually seen this before, and it can be fixed by switching to an LTS version of Node (e.g. Node 16 or 14 or 12). The Forge CLI does not support non-LTS versions of Node at the moment.

2 Likes

I’ve created a ticket so we can track fixing this before it reaches Node 18 LTS.

1 Like

After downgrading to node 16 it works. Thanks for the support!

@kchan

On the note of using the wrong version of node with forge:

Speaking as a frequent user of nvm, it would be helpful if the Forge CLI could print a warning message on startup if it were being invoked with an unsupported version of node.

5 Likes

Thanks for the great suggestion @scott.dudley. I’ll create a ticket in our team’s backlog to do this.