This can happen if the user duplicating the app only has read access.
Please see a reply from Qlik Support on this very issue:
App can be duplicated successfully by another user but the script is empty in the script editor.
A user that has read access to a app and to the related sections in the QMC will be able to duplicate an app but if he does not have full access, then the script will not be duplicated. This is working as design and below is the statement from R&D regarding this: "Another user is not supposed to be able to duplicate the script, but the rest of the App should be able to be duplicated. This is due to the fact that you can otherwise load data that you should not have access to removing the section access inside the script." The reason why no error is output and the app can be duplicated successfully is because the user should still be able to duplicate the rest of the App, without the script. If full rights to the App and its App objects are given to the user, he will be able to duplicate the whole App including the script.