Hello!
I am developing a Dashboard Gadget for Jira Cloud using Atlassian Connect Express, following this Atlassian Connect Jira Example.
We ended up using ACE version ^4.2.0, where everything works as expected and it builds fine on Heroku and could be installed as a privately listed app on the Atlassian Marketplace.
However when trying to upgrade to ACE version ^7.4.0 and above, the installation times out and there is a 503 when trying to get a response from the /installed route, but it builds without error on Heroku. I’ve also tried both having a custom /installed route and without, neither approach addresses the time out during installation.
The installation error in Jira shows:
The app host did not respond when we tried to contact it at “https://app-key.herokuapp.com/installed” during installation (the attempt timed out). Please try again later or contact the app vendor.
While in Heroku the following is logged:
2023-06-09T18:21:44.179927+00:00 heroku[router]: at=error code=H12 desc=“Request timeout” method=POST path=“/installed” host=app-key.herokuapp.com request_id=227a94e1-068c-4766-b636-1b18cb589193 fwd=“18.234.32.224” dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https
2023-06-09T18:21:44.180889+00:00 app[web.1]: ::ffff:10.1.25.214 - - [09/Jun/2023:18:21:44 +0000] “POST /installed HTTP/1.1” - - “-” “Atlassian HttpClient unknown / JIRA-1001.0.0-SNAPSHOT (100225) / Atlassian-Connect/1001.0.0-SNAPSHOT”
These were the settings for the following before upgrading (where it would successfully install):
config.json
{
...
"production": {
"port": "$PORT",
"errorTemplate": true,
"localBaseUrl": "https://app-key.herokuapp.com",
"store": {
"dialect": "postgres",
"url": "$DATABASE_URL",
"dialectOptions": {
"ssl": {
"require": true,
"rejectUnauthorized": false
}
}
},
"whitelist": [
"*.jira-dev.com",
"*.atlassian.net",
"*.atlassian.com",
"*.jira.com"
]
},
"product": "jira"
}
atlassian-connect.json
{
...
"baseUrl": "{{localBaseUrl}}",
"authentication": {
"type": "jwt"
},
"lifecycle": {
"installed": "/installed"
},
...
}
package.json
{
...
"engines": {
"node": "12.16.1"
},
"scripts": {
"start": "node -r esm app.js",
"lint": "eslint app.js routes"
},
"dependencies": {
"atlassian-connect-express": "^4.2.0",
"body-parser": "^1.19.0",
"compression": "^1.7.4",
"cookie-parser": "^1.4.4",
"errorhandler": "^1.5.1",
"esm": "^3.2.22",
"express": "^4.16.4",
"express-hbs": "^2.3.0",
"helmet": "^3.21.2",
"morgan": "^1.9.1",
"pg": "^6.1.0",
"sequelize": "^5.21.2"
},
...
}
And here are the same files when attempting the upgrade:
config.json
{
...
"production": {
"port": "$PORT",
"errorTemplate": true,
"localBaseUrl": "https://app-key.herokuapp.com",
"store": {
"type": "postgres",
"url": "$DATABASE_URL",
"ssl": true,
"dialect": "postgres",
"dialectOptions": {
"ssl": {
"require": true,
"rejectUnauthorized": false
}
}
},
"whitelist": [
"*.jira-dev.com",
"*.atlassian.net",
"*.atlassian.com",
"*.jira.com"
]
},
"signed-install": "enable",
"product": "jira"
}
atlassian-connect.json
{
...
"baseUrl": "{{localBaseUrl}}",
"apiMigrations": {
"signed-install": true
},
"authentication": {
"type": "jwt"
},
"lifecycle": {
"installed": "/installed"
},
...
}
package.json
{
...
"engines": {
"node": "v18.12.1",
"npm" : "9.2.0"
},
"scripts": {
"start": "node -r esm app.js",
"lint": "eslint app.js routes"
},
"dependencies": {
"atlassian-connect-express": "^7.4.0",
"body-parser": "^1.19.0",
"compression": "^1.7.4",
"cookie-parser": "^1.4.4",
"errorhandler": "^1.5.1",
"esm": "^3.2.22",
"express": "^4.16.4",
"express-hbs": "^2.3.0",
"helmet": "^3.21.2",
"morgan": "^1.9.1",
"pg": "^7.10.0",
"sequelize": "^5.21.2"
},
...
}
We are using Heroku Postgres as the database addon on Heroku, and it seems like no new entries are made to the table when an install attempt is made. Aside from these changes to the following files, is there anything else that should be done to facilitate the upgrade?
Thanks!!