Development v.s. production Atlassian Cloud add-on

@Ivana1

HTTP 404 status in the error message indicates that your server doesn’t answer to your Jira Cloud instance when it tries to confirm installation by attempting to load https://<baseUrl>/installed

  • Navigate to your atlassian-connect.json URL and check what value is set for baseUrl
  • Confirm that your HTTPS certificates are valid and not expired
  • Check the web-server logs to confirm that there are attempts logged to access atlassian-connect.json and /installed (and check for any errors)

Additional things you could try:

  • check your app’s config.json and confirm if it has production section, then check the values set in localBaseUrl and port (this is the URL:PORT that your app is running on, where web-server would usually proxy requests to it)
  • as suggested earlier try to use some HTTP client to send POST to https://<baseUrl>/installed (see sample POST payload below)
  • /installed endpoint is expected to respond with 201 or 204 HTTP status, check if you have a custom route in your code for /installed endpoint (usually there is no need to define custom one, since ACE will define one during bootstrapping, I have found it better than my custom one)

Sample POST payload for /installed:

{
    "key": "<application-key-from-ace-descriptor>",
    "clientKey": "<unique-id-for-your-cloud-instance>",
    "publicKey": "<public-key-for-auth>",
    "sharedSecret": "<shared-secret-for-auth>",
    "serverVersion": "100166",
    "pluginsVersion": "1001.0.0-SNAPSHOT",
    "baseUrl": "<your-cloud-instance-url>",
    "productType": "<product-value-from-config-json-or-default>",
    "description": "Atlassian JIRA at <your-cloud-instance-url> ",
    "eventType": "installed"
}

Could you please provide more details on how you’re starting the application on the server?

  • Is it manually launching npm start or through systemd service or nodemon app.js or in some other way?
  • Can you confirm that NODE_ENV is actually set to production? You could set it explicitly with NODE_ENV=production node <main-script>.js
    • where <main-script>.js is your entry script which loads express.js, bootstraps ACE, defines routes and starts HTTP server to listen for connections
    • command expects node to be in your $PATH, if it is not then instead of node type in full path to the binary (e.g. NODE_ENV=production /usr/local/bin/node <main-script>.js
  • Can you start your app with DEBUG enabled and check if all endpoints are set up during launch (or catch any other errors)? Use DEBUG=express:* node <main-script>.js

Hope that something from above will help. Good luck and patience.

3 Likes