Clients are unable to install an app after restoring a backup

Lately we have received some bug reports that clients are unable to install our app due to 401 status. For every reported case I found logs like this one:

c.a.c.s.i.lifecycle.LifecycleController : Installation request was not properly authenticated, but we have already installed the add-on for host [clientKey: clientKey_xxx, baseUrl: https://client_url.atlassian.net. Subsequent installation requests must include valid JWT. Returning 401.

Currently, the only possibility is to remove a row from AtlassianHost table. I read that atlassian.connect.allow-reinstall-missing-host configuration flag will also help with this case but I am not sure if it safe to enable it on production environment.

The problem is reproducible in following steps:

  1. Create instance backup
  2. Install app
  3. Restore instance from backup
  4. Try to install app again - failed

How to encounter it? Monitoring logs to react quickly when someone has a problem with the app installation is ridiculous and doesn’t always solve the problem (a potential client may not retry installation process).

3 Likes

Please read Ensuring your Atlassian Connect app handles customer site imports and let me know if that helps.

Can you tell me what app framework and version you are using, if any?

1 Like

We are using Atlassian Connect Spring Boot in version 2.1.2.

The article which you sent looks like promising, but propably something is missing in my app configuration. Probably flag “allow-reinstall-missing-host” set on “true” is crucial for properly reinstalling with new clientKey. Am I understood it well?

1 Like

this thread doesn’t explain too much :slight_smile:
Our customer more and more often comes to us with requests like:

"We had to restore our Jira Instance from Backup and now we want to re-enable the Addon Requirements and Test Management Cloud.

Unfortunately, we get an error message, every time we want to add the Addon.

We already contacted Atlassian support, but they told us, that we have to contact the vendor.
"
In this case, we are forced to edit and delete the production data.
This case with Jira Cloud backups should be supported and properly handled in atlassian-connect-spring-boot .