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:
- Create instance backup
- Install app
- Restore instance from backup
- 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).