App versioning issues / removing custom apps
Usually to remove a custom application you just need to:
- Open the App management app
- Go to custom apps
- Click the app you wish to uninstall
- Select uninstall
However sometimes there are multiple versions of an app installed ‘underneath’ one another, and the last version you upload might not be the version DHIS2 chooses to load when the server is restarted.
This can lead to the wrong versions of the apps loading up for users, after a restart or if they have a specific version cached.
There are two main approaches for fully removing a custom app.
User interface
Once removing the app using the process above
- Go the the System administrator app
- Go to the maintenance tab
- Select the clear application cache and reload apps maintenance tasks
- Clear your browser cache using the browser cache cleaner app or a browser extension
- Go back to the App management app and see if the app you have deleted has re-appeared!
- If it has then uninstall it again and repeat these steps until no app shows any more
Server operation
If the above user interface method does not work, the server team can delete the app folders from the server manually to make sure they are fully removed from the system.
- Create a ticket asking the server team to connect to the server and show the contents of the /opt/dhis2/files/apps directory, this is a list of all the app folders.
- From this list you should see the app causing the issue, potentially with multiple folders for different versions, for example if the issue was with an app called
Importer
you might see the following folders: Importer-1.2.0, Importer-1.2.1, Importer-1.3.2 ect. - Request the server team to delete all the files corresponding to the problem app and restart the server
- Once the server is back up, upload the new version of the app
If users are still seeing the old version of the app at this point then the caching is local to their system, they will need to run the browser cache cleaner app to request the latest version from DHIS2.