Skip to Content
Documentation

Validation codes

Every problem the manifest's validator reports, by its stable code, from the SDK itself.

One validator checks a manifest everywhere: songstress check, a server installing, a listing being submitted. It works in four stages, and a stage runs only when the ones before found nothing:

  1. Reader: the size, the depth, that the text is UTF-8 JSON, and that no object names a key twice.
  2. Schema: the shape the JSON Schema describes.
  3. Rules: what a schema can't say. The install profile ends here.
  4. Listing: what the official list and the Marketplace ask on top, for the listing profile only.

Each problem has a stable code, a JSON Pointer to where it is, and a sentence. The code and the pointer are the contract, the same for every implementation; the sentence is for people and may be reworded. A server also knows where a manifest came from, which the validator isn't told: from a GitHub link or a file it refuses the publisher songstress with ID_RESERVED.

Every code

Read from the SDK's own list, MANIFEST_ERROR_CODES in songstress/manifest:

CodeStageWhat it means
MANIFEST_TOO_LARGEReaderThe manifest is larger than 256 KiB.
MANIFEST_TOO_DEEPReaderThe manifest nests objects and lists more than 16 levels deep.
JSON_INVALIDReaderThe text is not UTF-8 JSON, or holds a number too large to read or a damaged character.
JSON_DUPLICATE_KEYReaderAn object names the same key twice. The pointer names the key.
THEME_FILE_TOO_LARGEReaderA theme file is larger than 16 KiB.
SCHEMA_TYPESchemaA value is of the wrong type (keyword: type).
SCHEMA_REQUIREDSchemaA required field is missing (keyword: required). The pointer names the missing field.
SCHEMA_UNKNOWN_PROPERTYSchemaA field the manifest does not know (keyword: additionalProperties). The pointer names the field.
SCHEMA_ENUMSchemaA value is not one of the allowed ones (keyword: enum).
SCHEMA_CONSTSchemaA value is not the one value allowed (keyword: const).
SCHEMA_PATTERNSchemaText is not in the form asked (keyword: pattern).
SCHEMA_LENGTHSchemaText is too short or too long (keywords: minLength, maxLength).
SCHEMA_RANGESchemaA number is too small or too large (keywords: minimum, maximum, exclusiveMinimum).
SCHEMA_ITEM_COUNTSchemaA list has too few or too many items (keywords: minItems, maxItems).
SCHEMA_DUPLICATE_ITEMSchemaA list names the same item twice (keyword: uniqueItems). The pointer names the list.
SCHEMA_PROPERTY_COUNTSchemaAn object has too few fields (keyword: minProperties).
TEXT_UNSAFERulesText holds a control, invisible or direction-changing character.
ID_RESERVEDRulesThe id's publisher is a name Songstress keeps for its own API.
VERSION_INVALIDRulesversion is not a semantic version.
ENGINE_RANGE_INVALIDRulesengines.songstress is not a range the specification allows.
ENGINE_UNSUPPORTEDRulesengines.songstress leaves out the extension API of the host that is checking.
PATH_OUTSIDE_PACKAGERulesA file path is not a plain path inside the package.
BANNER_NOT_16_9RulesThe banner's declared size is not 16:9.
ENTRY_REQUIREDRulesSomething needs code in an entry the manifest does not declare.
ENTRY_UNUSEDRulesAn entry is declared but nothing in the manifest would ever start it.
PERMISSION_REQUIREDRulesSomething needs a permission the manifest does not ask for.
PERMISSION_UNUSEDRulesA permission is asked for that nothing in the manifest can use.
NETWORK_LOCAL_NOT_PRIVATERulesA network.local target is an address outside the private and loopback ranges.
DUPLICATE_IDRulesTwo contributions of one kind share an id or a key, or a menu names one command twice. The pointer names the later one.
MENU_COMMAND_UNKNOWNRulesA menu item names a command the manifest does not declare.
ROUTE_DUPLICATERulesTwo routes answer the same method and path. The pointer names the later one.
LINK_PATTERN_TOO_BROADRulesA link pattern would claim every web link.
PROVIDER_PLAY_NEEDS_SEARCHRulesA play provider has no search provider of the same id whose results it could play.
PROVIDER_MISMATCHRulesOne source is given two names or two groups under different kinds. The pointer names the later one.
SETTING_DEFAULT_INVALIDRulesA setting's default is not a value the setting itself would accept.
SETTING_RANGE_INVALIDRulesA number setting's minimum is above its maximum.
SETTING_OPTION_DUPLICATERulesTwo options of a select setting share a value. The pointer names the later one.
THEME_LOOKSRulesA theme's looks are not the ones its appearance names, or are written both in the manifest and in its file.
THEME_COLORRulesA theme's colour is not one a theme may write, or a part of it is out of its range.
THEME_COLOR_ALPHARulesA theme's colour is translucent where only border and surface.hover may be.
WHEN_INVALIDRulesA when condition is not written in the grammar every app reads.
WHEN_KEY_UNKNOWNRulesA when condition names a key no app knows where it stands, or a setting it may not read.
LISTING_FIELD_REQUIREDListingA field the official list requires is missing. The pointer names the field.
LISTING_LICENSEListingThe licence is not one the official list accepts.
LISTING_REPOSITORYListingrepository is not a GitHub repository address.
LISTING_SCREENSHOTSListingThe official list asks for three to six screenshots.

songstress check also holds each theme to the rules the apps hold a look to, and reports a look that fails as THEME_CONTRAST or THEME_LUMINANCE, with the ratio it reaches. See Themes.

On this page