Failed to install app error for custom app built with App Platform

Hi @jetisco4u ,

As both are running in different machines, that shouldn’t be an issue.

Thanks,
Rithvik

ok thanks

@rithvik please what can cause the error Failed to install app: Missing manifest.webapp in zip when installing app manually. I can confirm that there is a manifest.webapp file included. Also the content is like the one I uploaded before. However, I didn’t build the app with d2 script.

I got the error from the docker log after following your suggestion above.

@jetisco4u ,

As per the code which is giving this error,

It is only checking for manifest.webapp file in the zip. Are you sure you are zipping the files properly? The zip should directly have files including manifest.webapp and not the folder and then files inside it.

Thanks,
Rithvik

I use Window to zip it. I right click the folder and send to zip archive.

@jetisco4u ,

If you have created the app in using “create-react-app”, you can have manifest.webapp in the root of the project folder and run “yarn run build” or “npm run build” to build the project.

Also I guess if you zip it the way you mentioned, it wouldn’t work. One way to verify this is, if you unzip the zip, you should see the files getting extracted and not the folder.

Thanks,
Rithvik

@jetisco4u can you expand on why you are not building with d2 app scripts ? This handles all of this for you.

Thanks for sharing @rithvik - to simplify this a bit, you can actually use d2 cluster to show the logs automatically - run d2 cluster logs <clustername> and it will stream all the logs from the cluster to your console. If you want only the logs from a specific container (just the dhis2-core container, for example) you can add the component name to the end of that command, i.e. d2 cluster logs <clustername> core

This is generated from the author field in package.json (and optionally overridden with the author field from d2.config.js). @jetisco4u it appears that you are specifying a string as the author override in d2.config.js which is not currently supported - you must use an author field object with explicit fields (i.e. { "name": "Webclick" }) - you can also instead remove this override and specify the author field in package.json as a string. With either of those fixes it should generate the proper developer field in manifest.webapp

@jetisco4u please open a separate topic on the community for this question, as it is unrelated to app installation. You can tag me and @Rene so that we can help you diagnose the problem - make sure also to include the logs from the server you are running and the command you use to start it so that we can help to identify the issue.

This is correct - the zip needs to be a “flat zip” without a top-level directory. Windows will automatically create that top-level directory for you, so you cannot use Windows built-in compress functionality to create DHIS2 application zip files.

Thank you very much @rithvik for helping to debug this issue!