Symptoms
Installation of APS-application instance fails with error in Control Panel:
'package' is invalid: Value is not within the range of values of enumeration
Cause
Metadata file APP-Meta.xml of the application has a resource limited by setting package ot type enum
Resource:
<resource class="item" id="package_id" limiting-setting="package">
<name>package_ID</name>
<description>Configuration variants 1-BASIC ,2-ADVANCED ,3-ENTERPRISE.</description>
</resource>
Limiting setting:
<setting type="enum" id="package" protected="true" default-value="1" track-old-value="true" visibility="hidden">
<name>Packages</name>
<choice id="1"></choice>
<choice id="2"></choice>
<choice id="3"></choice>
</setting>
In result limit of corresponding resource type in a subscription cannot exceed number of items in the limiting setting. In this example it is 3.
Resolution
Option 1: Set proper limit of relevant resource type in the subsciption and corresponding service plan
Option 2: Request application packager to modify the package