YunoHost-Apps / dolibarr_ynh

Dolibarr ERP & CRM is a modern software to manage your organization's activity. This is an integration of Dolibarr in YunoHost
https://www.dolibarr.org/
GNU Affero General Public License v3.0
12 stars 18 forks source link

Error deleting dolibarr (before restoration) #58

Closed farvardin closed 2 years ago

farvardin commented 3 years ago

Describe the bug

We can't directly delete and then restore dolibarr in a simple way.

Context

I already had this error on a previous instance of this server, and I've erased it because of this error, I though my installation was broken :(

Steps to reproduce

removing dolibarr will give this log:

SUCCESS - dolibarr removed DEBUG - Permission 'dolibarr.main' deleted Uhoh, unknown permission dolibarr.main ? (Maybe we're in the process or deleting the perm for this app...)

we'll no longer see the dolibarr app in the yunohost interface.

But when trying to restore a backup (or install a new instance) we'll get this error:

Les applications suivantes ne peuvent pas être restaurées car elles sont déjà installées : dolibarr

So from the command line I've run a second time the uninstaller:

yunohost app remove dolibarr

Success! dolibarr removed Info: The operation 'Remove the 'dolibarr' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20210629-181927-app_remove-dolibarr' to get help

so I got a second time this same error with the dolibarr.main permission.

Here is the log: https://paste.yunohost.org/raw/wemobizuvu

But this time if try to remove it again, I got:

Could not find dolibarr in the list of installed apps

Then only this time I could restore dolibarr from my backup!

Expected behavior

Dolibarr should delete without error and restore from backup without having to delete it two times from the command line.

Logs

https://paste.yunohost.org/raw/wemobizuvu

mastereur commented 3 years ago

Hello,

The dolibarr.main permission is created automatically by Yunohost. I tried to reproduce the problem with the latest version of Yunohost (v 4.2.6.1). The installation and restoration worked.

Can you redo the scenario with the latest version of Yunohost and give me the result?

Thanks

farvardin commented 3 years ago

Sorry for the late reply.

I think I understand why it did that. It happens if you try to restore dolibarr (or another app) without deleting / uninstalling it first. Then after this first warning, if you uninstall dolibarr, there will be this kind of error.

mastereur commented 2 years ago

Sorry for the delay. There is a new version that has redesigned the installation system to be consistent with the Yunohost requirements.

Is it possible to do a test?