Create a 'Post Install Page' Module for Confluence Cloud connect app

I am trying to create a postInstallPage module for my Confluence Cloud connect app. This is how my descriptor looks like;

{
  "modules": {
     "webhooks": [
        {
            "event": "page_updated",
            "url": "/page_update"
        }
    ],
    "postInstallPage": {
      "url": "/install",
      "name": {
        "value": "My Post-Install Page"
      },
      "key": "my-post-install-page"
    }
  },
  "key": "<%= ENV['APP_KEY'] %>",
  "name": "<%= ENV['APP_NAME'] %>",
  "description": "<%= ENV['APP_DESCRIPTION'] %>",
  "vendor": {
    "name": "<%= ENV['APP_VENDOR_NAME'] %>",
    "url": "<%= ENV['SITE_URL'] %>"
  },
  "links": {
    "self": "<%= ENV['SITE_URL'] %>/confluence.json"
  },
  "lifecycle": {
    "installed": "/callback"
  },
  "baseUrl": "<%= ENV['SITE_URL'] %>",
  "authentication": {
    "type": "jwt"
  },
  "enableLicensing": <%= ENV['ENABLE_LICENSING'] %>,
  "scopes": [
    "read"
  ]
}

In the install.html , I have this

<html>
  <p>Let's get started</p>
</html>

The problem is, when I install the app and click on ā€œGet Startedā€, I get this error ā€œApp is not responding. Wait or Cancelā€ I have no idea what I am doing wrong. The app connects well with Atlassian on other modules like webhooks.

@ibuchanan any help on this will be appreciated

@HakeemBaba,

Are you using one of Atlassianā€™s Connect libraries like Express or Spring Boot? More specifically, Iā€™m curious how /install would redirect or route to install.html? Do you have logs from your app server to see what might be happening?

I am not using any connect library. I am building the connect app with Ruby on Rails. The /install just renders a install.html page as standard in Ruby on Rails MVC architecture. I get this in the logs (redacted)

"Parameters: {"xdm_e"=>"https://my-domain.atlassian.net", "xdm_c"=>"channel-my-app-key__my-post-install-page", "cp"=>"/wiki", "xdm_deprecated_addon_key_do_not_use"=>"my-app-key", "lic"=>"none", "cv"=>"cv_details", "jwt"=>"token_details"}"

I am wondering if it possible to provide an atlassian page url as the postInstallPage url. So instead of using /install I use something like ā€œhttps://mydomain.atlassian.net/wiki/spaces/DEV/pages/70778/get-startedā€.

I get this error ā€œApp is not responding. Wait or Cancelā€ I have no idea what I am doing wrong.

Sounds like you didnā€™t include the all.js file in your install page.

See About the Connect JavaScript API

1 Like

I just placed <script src="https://connect-cdn.atl-paas.net/all.js"></script> in the install page but I still get the same error

No. All Connect App modules must be satisfied by relative URLs to the Appā€™s Base URL.

Alright, Any idea what what the issue may be then? I can see any error in my logs

Itā€™ll be hard to know whatā€™s going on without a little more information. Is the base url youā€™re using an ngrok url? Did it update? If so did you reinstall the app?

I am using an ngrok for my test environment. I removed and re-installed the app

Can you check to see whatā€™s being requested at ngrokā€™s proxy?

What is your base url and what is the post install path in the descriptor?

Thanks

/Daniel

1 Like

I doubt it has to do with ngrok. I pushed my changes to a staging env with a ā€˜real domainā€™ and still had the same error. You can see the install path in the descriptor above

Can you share a generated connect descriptor json file? Iā€™m not seeing anything that might be a problem from what you shared. Itā€™s hard to know what might be happening with all of the environment variables in place though.

Other things to consider, is the /install right pointing to the view/html file correctly? Can you navigate to the url outside of Confluence?

This is the descriptor below. /install renders the right html content.

{
  "modules": {
     "webhooks": [
        {
            "event": "page_updated",
            "url": "/page_update"
        },
        {
            "event": "comment_created",
            "url": "/page_comment"
        },
        {
            "event": "blog_created",
            "url": "/blog_created"
        },
        {
            "event": "page_created",
            "url": "/page_created"
        }
    ],
    "postInstallPage": {
      "url": "/install",
      "name": {
        "value": "My Post-Install Page"
      },
      "key": "my-post-install-page"
    }
  },
  "key": "my-app-key-keem-testing",
  "name": "Keem App",
  "description": "A connect app that does something",
  "vendor": {
    "name": "My Company",
    "url": "https://9f23-2-105-183-199.ngrok.io"
  },
  "links": {
    "self": "https://9f23-2-105-183-199.ngrok.io/confluence.json"
  },
  "lifecycle": {
    "installed": "/callback"
  },
  "baseUrl": "https://9f23-2-105-183-199.ngrok.io",
  "authentication": {
    "type": "jwt"
  },
  "enableLicensing": false,
  "scopes": [
    "read"
  ]
}

This is an image of the error. I dont understand why it has a small box on the upper left screen.

Any idea on how to solve this @rwhitbeck ?