HTTP code 500 when reinstalling a Jira Plugin

I deployed my Jira cloud plugin application (ACE) on Heroku and installed the plugin manually through the ‘Upload app’ link inside the ‘Manage apps’.

It was working fine until today. Today I uninstalled the app on the ‘Manage app’ page and tried to install the app using the ‘Upload app’ link. I provided the same descriptor url without any change in the descriptor file but I am getting an error

The app host returned HTTP response code 500 when we tried to contact it during installation. Please try again later or contact the app vendor.

If I look at the logs, I see the below message.

Failed to update app plugin.5664118365095310146.atlassian-connect.json (atlassian-connect.json)	

Can anybody help me to figure out the root cause, please.

Thanks,

Ahmad Qarshi

I managed to find the solution. After I uninstalled the plugin in Jira, the auto-created table AddonSettings was deleted.

The table was recreated after I redeployed my plugin on Heroku and then after that when I tried to upload the plugin app through Jira using the descriptor URL, it worked.