Forge Deployment Fails with Error

Hi, my Forge deploy Is failing with the following error:

Validating manifest
  Upload URL is valid
  Found manifest file
  Manifest is a valid YAML
  Manifest validation failed
Validation errors: {
  "validationResult": {
    "tid": "-",
    "code": 400,
    "type": "UpsertEnvironmentRequestInvalidError",
    "message": "Upsert Environment Request body is invalid. Details "
  }
}

My Manifest.yml is

modules:
  jira:issuePanel:
    - key: myco-gitlab-mr-extension-hello-world-panel
      function: main
      title: myco-gitlab-mr-extension
      icon: https://developer.atlassian.com/platform/forge/images/icons/issue-panel-icon.svg
  function:
    - key: main
      handler: index.run
      providers:
        auth:
          - gitlab
app:
  id: ari:cloud:ecosystem::app/-

remotes:
  - key: mycodev-gitlab-server
    baseUrl: https://cd.mycodev.com

permissions:
  scopes:
    - read:jira-work
  external:
    fetch:
      backend:
        - "https://cd.mycodev.com"

providers:
  auth:
    - key: gitlab
      name: Gitlab
      scopes:
        - 'profile'
        - 'read_api'
      type: oauth2
      clientId: 123456
      remotes:
        - mycodev-gitlab-server
      bearerMethod: authorization-header
      actions:
        authorization:
          remote: mycodev-gitlab-server
          path: /oauth/authorize
        exchange:
          remote: mycodev-gitlab-server
          path: /oauth/token
        revokeToken:
          remote: mycodev-gitlab-server
          path: /oauth/token
        retrieveProfile:
          remote: mycodev-gitlab-server
          path: /oauth2/v1/userinfo
          resolvers:
            id: id
            displayName: email
            avatarUrl: picture
3 Likes

We are also having this problem. Does anyone from Atlassian know what is going on?

Hi @ByronSakiadis and @paul,

Can you try to wrap the clientId value with quotation marks and let us know if that’s still failing?

So like this from the example above:
clientId: '123456'

@paul if you are not using an external provider so have a different field, let us know.

Thanks,
Caterina

1 Like

Thanks for that Caterina, I’ll let my colleague know (@EmmanuelGilbert )

Regards
Paul

Hi @ccurti, I and my colleagues have the same problem, it has been there for a few days now:

Our manifest:

modules:
  jira:adminPage:
    - key: admin-page
      resource: custom-ui-resource
      resolver:
        function: custom-ui-resolver
      title: Admin Page
      layout: basic
      displayConditions:
        isAdmin: true
  jira:issuePanel:
    - key: issue-panel
      resource: custom-ui-resource
      resolver:
        function: custom-ui-resolver
      title: Issue Panel
      icon: https://developer.atlassian.com/platform/forge/images/issue-panel-icon.svg
  function:
    - key: custom-ui-resolver
      handler: index.customUIResolver
resources:
  - key: custom-ui-resource
    path: static/build
    tunnel:
      port: 3000
permissions:
  scopes:
    - 'storage:app'
    - 'read:jira-work'
    - 'read:jira-user'
  content:
    styles:
      - 'unsafe-inline'
app:
  id: ari:cloud:ecosystem::app/xxxxxx-xxxx-xxxx-xxxx-xxxxxxx

Thanks @nhac.tat.nguyen, yeah this cannot be related to the clientId field then.

Let me run a few checks and we’ll get back to you.

Hi @ccurti,
In my project, this problem occurs only when I add displayCondition in jira:projectSettingsPage. Manifest without displayCondition or with displayCondition in jira:issuePanel deploys the application without errors.

I tried to add issuePanel with key issue-panel. Results:

  • With displayCondition: Error: Deployment failed
  • Without displayCondition: :heavy_check_mark: Deployed

good luck with finding the cause!

4 Likes

Hi @ByronSakiadis, @paul, @ccurti,

I can confirm that the deployment is success after I removed the displayCondition from my module, thanks to the suggestion from @MateuszKorczyski

Regards

2 Likes

Same problem, no displayCondition in the manifest, still fails.

Hi Caterina, there is no clientId in our manifest.yml. With a bit of trial and error we found that removing viewportSize: xlarge resolved the error.

Hi @EmmanuelGilbert ,

Thanks for the details. Can you share which module was this for?

Caterina

@IgorAndriushchenkp would it be possible to share the manifest.yml here as well as the output of the forge deploy --verbose command which shows the deployment Id before the error message?

It will look like this:

  Manifest is a valid YAML
  Manifest validation failed
Validation errors: {
  "validationResult": {
    "tid": "e2fc7cdecc388bd1",
    "code": 400,
    "type": "UpsertEnvironmentRequestInvalidError",
    "message": "Upsert Environment Request body is invalid. Details "
  }
}

Thanks,
Caterina

Thanks @MateuszKorczyski for this!

We are following up to understand what’s happening and I can confirm that I can reproduce it when using a "jira:adminPage" module with the isAdmin displayCondition.

Just to be sure, did it work previously in your environment and it stopped working recently or was this a recent change?

Thanks,
Caterina

Hi @ccurti, It did work well previously (with the isAdmin there for a long time) and just stopped working recently, more than a week ago I would say.

Thanks for the investigating.

Hi @nhac.tat.nguyen,

Thank YOU for all the details here.

We found a problem and a fix has been deployed. According to our tests, the deployment is working again.
Can you try adding the isAdmin back and let us know if everything is working for you?

If anybody still see a problem or can confirm that everything is working again, please let us know.

Thanks,
Caterina

2 Likes

I can confirm, works well for me. Thanks for fixing it :slight_smile:

We were encountering this forge deploy error also since last Wednesday. It is now working again after your fix with no changes from us. Thank you @ccurti

Thanks for confirming that. The timeline matches what we also saw internally.