Error 400 at app installation

Hi all,

I can’t install an app in development stage on a Jira cloud instance: error message is (see snapshot):

The app host returned HTTP response code 400 when we tried to contact it during installation

What causes this error code to be fired by the app host? Actually the app I’m developing was installing OK. I guess I must have introduced a regression, but I don’t know what can be the root cause… Any idea?

Thanks a lot,

Fred

You’ll need to look at your access logs. Your app returned a http status of 400 either while fetching the descriptor or the installation Webhook. Note: that if you have proxies (such as ngrok) - they might also have returned it.

I’m using ngrok actually. What I see in the logs is that the app responds with a 200 code when requested the descriptor for the /installed hook, I don’t see any 400 code fired (at least on the screen logs). Wondering if this could be caused by wrong token in local DB (actually I don’t know how to reset this DB)…

26
38

@frederictardieu
Similar thing happened to me, the issue usually was with DB. I had already client key in my DB and it somehow messed up installation. Reset your DB and then try to install again…
If that does not work, here are some things that also happen to me:

Jira will install only from https, http will throw an error.
Your tunnel is not working/enabled
I used Serveo for a period of time and it happened that serveo service was down for a whole day
Your DB is not running
Your username/password for DB are not set correctly

Also I recommend sometimes clearing browser cache (especially for those working on confluence) and using credentials.json file.
Cheers :smiley:

1 Like

@Mcobanov thank you for the tip!

How to reset the DB? At development stage (where I have the problem) I’m using the mode from atlassian-connect new add-on (nodejs)…

Cheers

Well depends which DB you are using…
I usually navigate to localhost and manually delete the row with client Key from my DB(I use phpmyadmin). Or you can do it through terminal also…
Easiest thing to do would be to truncate DB, so if you are using sql that would be:

TRUNCATE TABLE table_name;

:smiley:

1 Like

I’m using the default dev DB (I started dev with atlassian-connect new app tutorial), looks like an in-memory DB, but not sure how to connect it to truncate it.

Nevertheless, I tried an installation of the same app on another Jira cloud instance, and it’s OK. So, looks like there is a remaining entry in the DB related to the previous Jira instance, which is not OK.

Thank you!

@frederictardieu Yeah, thats why it is smarter to use DB, and it is really easy to setup in config.js… Also I think I had something similar to your issue and when I deleted browser cache/history it was ok… At least you got it working somewhere, good luck :grinning:

1 Like