Connect App only shows one of two dynamicContentMacros after installation

Min Wang September 5, 2024

I'm developing a connect app for my company's Confluence. It's working when I'm developing in local with two dynamicContentMacros showing. However, when I deployed it to the staging environment, only one of the macros showed.

 

I'm developing locally with ngrok as the tunnel to my local server.
Staging server is hosted on the cloud.

 

I get two macros showing in local

Screenshot 2024-09-06 at 11.29.38 AM.png

But I only get one in staging

Screenshot 2024-09-06 at 11.29.53 AM.png

 

I've checked their keys are different and tried re-uploading the app several times.

Screenshot 2024-09-06 at 11.48.51 AM.png

Is there anything I'm missing?

 

 

 

 

The descriptor file from staging environment.

{
  "key": "internal-email-api-developermode-confluence",
  "name": "[STG] File Addon for Confluence Cloud",
  "description": "Listen on permission updated webhook, then send the payload for syncing permission updated for sharepoint",
  "vendor": {
    "name": "DEX Team",
    "url": "https://org/"
  },
  "baseUrl": "https://confluence.jarvis-stg.com/",
  "links": {
    "self": "https://confluence.jarvis-stg.com/atlassian-connect.json",
    "homepage": "https://confluence.jarvis-stg.com/atlassian-connect.json"
  },
  "authentication": {
    "type": "jwt"
  },
  "lifecycle": {
    "installed": "/installed"
  },
  "scopes": [
    "WRITE",
    "READ",
    "ACCESS_EMAIL_ADDRESSES"
  ],
  "apiMigrations": {
    "signed-install": true
  },
  "modules": {
    "dynamicContentMacros": [
      {
        "key": "insert-file",
        "name": {
          "value": "[STG] Insert File"
        },
        "url": "/view?fileKey={fileKey}&width={width}&height={height}&hideLink={hideLink}&hidePreview={hidePreview}&href={href}",
        "description": {
          "value": "Display a file"
        },
        "outputType": "inline",
        "bodyType": "none",
        "featured": true,
        "parameters": [
          {
            "identifier": "fileKey",
            "name": {
              "value": "fileKey"
            },
            "description": {
              "value": "fileKey."
            },
            "type": "string",
            "required": true
          },
          {
            "identifier": "width",
            "name": {
              "value": "Width"
            },
            "type": "string",
            "required": false
          },
          {
            "identifier": "height",
            "name": {
              "value": "Height"
            },
            "type": "string",
            "required": false
          },
          {
            "identifier": "hideLink",
            "name": {
              "value": "Hide Download Link"
            },
            "type": "boolean",
            "required": false
          },
          {
            "identifier": "hidePreview",
            "name": {
              "value": "Hide Preview"
            },
            "type": "boolean",
            "required": false
          },
          {
            "identifier": "href",
            "name": {
              "value": "Link"
            },
            "type": "string",
            "required": false
          }
        ],
        "editor": {
          "url": "/editor",
          "editTitle": {
            "value": "Edit file properties"
          },
          "insertTitle": {
            "value": "Insert file"
          },
          "width": "640px",
          "height": "370px",
          "chrome": false
        },
        "icon": {
          "width": 16,
          "height": 16,
          "url": "/images/tm-logo.png"
        }
      },
      {
        "key": "filelist",
        "name": {
          "value": "[STG] File List"
        },
        "description": {
          "value": "Display files
        },
        "url": "/filelist",
        "icon": {
          "width": 16,
          "height": 16,
          "url": "/images/tm-logo.png"
        }
      }
    ],
    "dialogs": [
      {
        "url": "/dialog?fileKey={fileKey}",
        "options": {
          "size": "fullscreen",
          "header": {
            "value": "Insert File Preview"
          }
        },
        "key": "insert-file-dialog"
      }
    ],
    "webhooks": [
      {
        "key": "insert-file-page-removed",
        "event": "page_removed",
        "url": "/page_removed"
      },
      {
        "key": "insert-file-blog-removed",
        "event": "blog_removed",
        "url": "/page_removed"
      },
      {
        "key": "insert-file-page-copied",
        "event": "page_copied",
        "url": "/page_copied"
      },
      {
        "key": "insert-file-page-moved",
        "event": "page_moved",
        "url": "/page_moved"
      }
    ]
  }
}

 

The descriptor file from local environment

 

{
  "key": "DEV-file-addon-test",
  "name": "[DEV]Confluence Content Addon",
  "description": "Listen on permission updated webhook, then send the payload for syncing permission updated for sharepoint",
  "vendor": {
    "name": "DEX Team",
    "url": "https://org/"
  },
  "baseUrl": "https://sturgeon-becoming-mostly.ngrok-free.app",
  "links": {
    "self": "https://sturgeon-becoming-mostly.ngrok-free.appatlassian-connect.json",
    "homepage": "https://sturgeon-becoming-mostly.ngrok-free.appatlassian-connect.json"
  },
  "authentication": {
    "type": "jwt"
  },
  "lifecycle": {
    "installed": "/installed"
  },
  "scopes": [
    "READ",
    "WRITE"
  ],
  "apiMigrations": {
    "signed-install": true
  },
  "modules": {
    "dynamicContentMacros": [
      {
        "key": "dev-insert-file",
        "name": {
          "value": "[DEV] Insert File"
        },
        "url": "/view?fileKey={fileKey}&width={width}&height={height}&hideLink={hideLink}&hidePreview={hidePreview}&href={href}",
        "description": {
          "value": "Display a file"
        },
        "outputType": "inline",
        "bodyType": "none",
        "featured": true,
        "parameters": [
          {
            "identifier": "fileKey",
            "name": {
              "value": "fileKey"
            },
            "description": {
              "value": "fileKey."
            },
            "type": "string",
            "required": true
          },
          {
            "identifier": "width",
            "name": {
              "value": "Width"
            },
            "type": "string",
            "required": false
          },
          {
            "identifier": "height",
            "name": {
              "value": "Height"
            },
            "type": "string",
            "required": false
          },
          {
            "identifier": "hideLink",
            "name": {
              "value": "Hide Download Link"
            },
            "type": "boolean",
            "required": false
          },
          {
            "identifier": "hidePreview",
            "name": {
              "value": "Hide Preview"
            },
            "type": "boolean",
            "required": false
          },
          {
            "identifier": "href",
            "name": {
              "value": "Link"
            },
            "type": "string",
            "required": false
          }
        ],
        "editor": {
          "url": "/editor",
          "editTitle": {
            "value": "Edit file properties"
          },
          "insertTitle": {
            "value": "Insert file"
          },
          "width": "640px",
          "height": "370px",
          "chrome": false
        },
        "icon": {
          "width": 16,
          "height": 16,
          "url": "/images/tm-logo.png"
        }
      },
      {
        "key": "dev-filelist",
        "name": {
          "value": "[DEV] File List"
        },
        "description": {
          "value": "Display files you have uploaded"
        },
        "url": "/filelist",
        "icon": {
          "width": 16,
          "height": 16,
          "url": "/images/tm-logo.png"
        }
      }
    ],
    "dialogs": [
      {
        "url": "/dialog?fileKey={fileKey}",
        "options": {
          "size": "fullscreen",
          "header": {
            "value": "Insert File Preview"
          }
        },
        "key": "insert-file-dialog"
      }
    ],
    "webhooks": [
      {
        "key": "insert-file-page-removed",
        "event": "page_removed",
        "url": "/page_removed"
      },
      {
        "key": "insert-file-blog-removed",
        "event": "blog_removed",
        "url": "/page_removed"
      },
      {
        "key": "insert-file-page-copied",
        "event": "page_copied",
        "url": "/page_copied"
      },
      {
        "key": "insert-file-page-moved",
        "event": "page_moved",
        "url": "/page_moved"
      }
    ]
  }
}

 

1 answer

0 votes
marc -Collabello--Phase Locked-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 6, 2024

Hi @Min Wang ,

In order to help you, we'd need more information about your descriptor.  The screenshots only show a single macro in the descriptor.

Min Wang September 8, 2024

I've uploaded my descriptor files from both staging and local environments. Thank you so much for pointing this out!

marc -Collabello--Phase Locked-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 9, 2024

One thing you can check:  After setting up staging with a new version, have you done a new install (i.e. uninstall and then install) on your staging instance?  This is required to reload atlassian-connect.json into an instance.

Min Wang September 9, 2024

I've tried uninstalling and installing staging app but it didn't work. By the way, what do you mean by setting up staging with a new version?

marc -Collabello--Phase Locked-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 9, 2024

With a new version I meant:  when atlassian-connect.json changes, this counts as a new version of the addon.

Min Wang September 9, 2024

I see. I though I missed some settings. Anyway, thank you for helping out!
I'll keep trying!

Min Wang October 7, 2024

it worked after several days of trying. I didn't change anything so I'm assuming it probably has something to do with caching?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events