Hi
I am running ACE with a Postgres DB. I have noticed some issues when running in development mode, however the production config works when deployed to a remote PM2 instance (I have verified the record is created in the AddonSettings table).
When running the local dev instance via ngrok I get the following error in the console:
Failed to register with host [redacted] The app host did not respond when we tried to contact it at “https://1f8388d7.ngrok.io//installed” during installation (the attempt timed out). Please try again later or contact the app vendor.
Note that it also works when I use the default sqlite/memory DB.
My ‘store’ object in config.json looks like this (development):
Hi @stevemac are you watching node logs while the /installed end point is hit, do you get any errors? Is your ngrok url registered in the app descriptor? Also, seems you have an extra / in the ngrok installed path.
Hi @biro
The only error I can see is the “Failed to register host” error above.
The DB is on a seperate server and this is in the url string. Not sure about the ngrok URL being registered in the app descriptor? The baseUrl in atlassian-connect.json looks like this
“baseUrl”: “{{localBaseUrl}}”,
I believe the “//” in the output is misleading. It looks like something in the “/installed” route processing is breaking down due to the database config in config.json.
From adding some logging, I can see the the post handler in lib/index.js is being invoked, but the verifyInstallation middleware function is failing somewhere.
There is a call to addon.settings.get(‘clientInfo’, clientKey) in lib/middleware/registration/verify-installation.js which is not returning a response. I presume this is the call to get the client details in the DB. So my take on it at this point is that the config for the Postgres DB in config.json is incorrect somehow.
Ah, it makes sense it uses a local DB @stevemac. We containerised our apps so we let Docker handle the db distribution. I’m glad you figured it out. If you’re interested, here’s our opensource boilerplate using ACE, Docker-compose, Apollo GraphQL and Sequelize: https://www.jexo.io/boilerplate