Skip to content

Example app manifest is invalid json #559

@rrowlands

Description

@rrowlands

In this documentation:

https://docs.dhis2.org/2.34/en/dhis2_developer_manual/apps.html#creating-apps

The example code for the 'manifest.webapp' file is invalid json. The "authorities" array ends with a curly bracket, when it should instead be an array bracket.

The DHIS2 server throws this error:

Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected close marker '}': expected ']' (for Array starting at [Source: (ZipFileInflaterInputStream); line: 23, column: 20])

When parsing.

This can be easily tested by pasting this example json into an online json formatter (such as https://jsonformatter.org/).

Finally, the DHIS2 server presents this message:

"Failed to install app: app could not be installed on the file system"

to the user uploading an app with this manifest file in it, which is incredibly misleading. You would expect something more like "invalid app manifest file".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions